Closed deedy5 closed 7 months ago
That's the solution I went for before v0.5.8, but it does not work well for many edge cases. See the lengthy discussion in #55.
To summarize it, we have to activate libcurl's cookie engine to make it work.
To mimick the requests' interface with cookiejar, the cookies have to be synced between libcurl and python. Another way is simply interact with libcurl's cookie engine, which will require almost no overhead.
There is a possibility to remove the big overhead and make cookie setting a single call to c.setopt()
BaseSession()._set_curl_options()
: ...Before:
Sample code after the improvement: