Reputation: 19780
How do you use cookiejar with urllib3?
According to Python urllib3 and how to handle cookie support? from 2010 it wasn't supported then. However, in the change log for urllib3 1.22 (2017-07-20) there's mention of a compatibility fix for cookiejar.
Fixed compatibility for cookiejar. (Issue #1229)
So it sounds like some support has been added. But I have been unable to find any mention about cookiejar or even cookies in urllib3's documentation.
Upvotes: 5
Views: 545
Reputation: 2027
According to the test suite, CookieJar
's extract_cookies
method can be used to populate a CookieJar
from an instance of urllib3
's HTTPResponse
class:
cookiejar.extract_cookies(response, request)
Upvotes: 1