Python urllib3 and how to handle cookie support?

后端 未结 5 890
野趣味
野趣味 2020-12-06 16:55

So I\'m looking into urllib3 because it has connection pooling and is thread safe (so performance is better, especially for crawling), but the documentation is... minimal to

5条回答
  •  不思量自难忘°
    2020-12-06 17:32

    You're correct, there's no immediately better way to do this right now. I would be more than happy to accept a patch if you have a congruent improvement.

    One thing to keep in mind, urllib3's HTTPConnectionPool is intended to be a "pool of connections" to a specific host, as opposed to a stateful client. In that context, it makes sense to keep the tracking of cookies outside of the actual pool.

    • shazow (the author of urllib3)

提交回复
热议问题