Answer the question
In order to leave comments, you need to log in
How to convert cookies to requests-friendly format?
Hello, I have cookies in .pkl format that I collect through selenium.
Then I need to use these cookies in requests.
Simply connecting cookies as a file or dictionary does not work.
Tell me how to convert them to the desired format.
Answer the question
In order to leave comments, you need to log in
import pickle
with open('filename.pkl', 'rb') as fd:
data = pickle.load(fd)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question