How to use the library requests (in python) after a request
requests
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests bot = requests.session
This will do the job:
session.cookies = LWPCookieJar('cookies.txt')
The CookieJar API requires you to call load() and save() manually though. If you do not care about the cookies.txt format, I have a ShelvedCookieJar implementation that will persist on change.