O
O
Oleg2020-09-10 11:35:55
Python
Oleg, 2020-09-10 11:35:55

How to navigate through pages after authorization (python requests)?

Good afternoon.
With the help of requests I go through authorization on the site, in this part OK.
Then I need to go to another page. After the transition, I get the answer "Message": "Authorization has been denied for this request".
I would be grateful if you could suggest which direction to look in order to go to another page after authorization.

import requests

with requests.Session() as session:
    session.post(login_url, data=data)
    page =  session.get(url)
    print(page.content)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-09-10
@SoreMix

See how the site determines authorization. In addition to the cookies that the session can store, there is authorization in the request headers. See what headers are sent to the pages you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question