I have a django webapp and authentificate via the requests module
import requests
payload = {
'action': 'login',
'username': "username",
'password': "password"
}
r = requests.post('https://example.org/auth', data=payload)
print r.headers
print r.text
print r.cookies
That works fine. But how can I make the session persistent in the browser, i.e. I want to open another tab of example.org and be already signed in?
Edit: I know about You can easily create a persistent session using:
s = requests.session()
The question is rather about how to make the session persistent between several requests or browser tabs, i.e. how to store the cookie jar in the browser.