How to save requests (python) cookies to a file?
There is no immediate way to do so, but it’s not hard to do. You can get a CookieJar object from the session with session.cookies, and use pickle to store it to a file. A full example: import requests, pickle session = requests.session() # Make some calls with open(‘somefile’, ‘wb’) as f: pickle.dump(session.cookies, f) Loading … Read more