Answer the question
In order to leave comments, you need to log in
The lxml library creates its own request and does not store the session?
When requesting a site via Session(), I store cookies. Then, using lxml, I parse the received page text for the token specified in the request form.
So in this way I collect all the data for a subsequent request.
But as it turned out, when parsing the page through lxml, it gives me a new token.
It turns out that lxml creates its own request and it does not pay attention to the session declared above?
No matter how much I searched for information on sessions of the lxml library, I could not find anything.
Answer the question
In order to leave comments, you need to log in
I just wrote an answer:
https://qna.habr.com/q/1119656
there are no sessions, they don’t exist, this is an abstraction : at the physical level there are POST / GET requests and cookies
for their development came up with POSTMAN (well, other insomnia) , practice
yes, there are "sessions" in requests and bs, for convenience, syntactic sugar, magic - no need to rely on this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question