We can access cookies from the response, if they exist:
>>> url = 'http://somewebsite/some/cookie/setting/url' >>> r = requests.get(url) >>> r.cookies['some_cookie_name'] 'some_cookie_value'
We can send our own cookies, as shown in the following example:
>>> url = 'http://httpbin.org/cookies' >>> cookies = dict(cookies_are='working') >>> r = requests.get(url, cookies=cookies) >>> r.text '{"cookies": {"cookies_are": "working"}}'
3.129.26.108