S
S
Stepan Sidorov2020-08-18 16:50:48
Python
Stepan Sidorov, 2020-08-18 16:50:48

How to update cookies for a request via requests?

Hey!
I have a program that uses requests to send requests to a website.
I copied COOKIES and XSRF-TOKEN from the browser, but there is a problem with them:
every week the program stops working, due to 401, and 403, I.E. due to unauthorized and invalid csrf token.
How can I update the data so that such errors do not occur?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-08-18
@bacon

Why did you create a new ak? How to update x-xsrf-token for subsequent request?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question