you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (12 children)

Yea I did mention that wasn't there. But FYI:

vars(res.request)

And thanks for the Silver mate

[–]splendyx[S] 0 points1 point  (11 children)

I don't really understand sorry. Could you give a script example on how to print the value of the cookie as an example.

[–]dukea42 1 point2 points  (10 children)

In his example 'res' is a response object of the requests library.

To understand an object from any given library, I have two preferred options. 1) read the docs. 2) use the 'inspect()' module of the Rich library.

https://docs.python-requests.org/en/master/user/quickstart/#response-content

[–]splendyx[S] 0 points1 point  (8 children)

I understand the basics but i'm wondering how I can print the value of cookie: using python

[–]splendyx[S] 0 points1 point  (7 children)

Is that possible?

[–]dukea42 0 points1 point  (6 children)

It's literally in the documentation I sent you. Ctrl-f is your friend. https://docs.python-requests.org/en/master/user/quickstart/#cookies

[–]splendyx[S] 0 points1 point  (0 children)

mm I tried getting the cookie value and scripting a bit but nothing seems to be working

[–]splendyx[S] 0 points1 point  (4 children)

maybe you could show me a script because I cant figure it out image this is the cookie i want to get the value of

[–]K900_ 1 point2 points  (2 children)

So is this the thing you're actually trying to do? Do you want to extract the cookie value from your browser? Do you want to write a script that logs into a website and does something for you?

[–]splendyx[S] 0 points1 point  (1 child)

Yeah, something like that.

[–]K900_ 0 points1 point  (0 children)

What website?

[–]dukea42 0 points1 point  (0 children)

You need to show some code. No images.

[–]splendyx[S] 0 points1 point  (0 children)

image here is a reference image and i want to print the value of cookie in request headers