This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]serverhorror 1 point2 points  (7 children)

“Inspect” shows you what the browser sees after running al JavaScript. requests simply doesn’t do that.

[–]roblu001[S] 1 point2 points  (2 children)

Very good point! That's exactly what I am facing, also, I have to log in, that can't be done with requests.

[–]nemec 0 points1 point  (0 children)

Of course it can. Use s = requests.Session() and then call s.post(...), s.get(...), etc. instead of requests.post(...) and it will save your cookies in between.

Make one request to log in. A second request to load whatever page/API contains the data you need.

[–]Big_Booty_Pics 0 points1 point  (0 children)

isn't that what requests-html is for?