I am making several http requests to a particular host using python's urllib2 library. Each time a request is made a new tcp and http connection is created which takes a noticeable amount of time. Is there any way to keep the tcp/http connection alive using urllib2?
http://stackoverflow.com/questions/1037406/python-urllib2-with-keep-alive
Mirko Nasato
2010-01-05 21:55:52
This seems to work, but urlgrabber's keepalive does not really work with python 2.6. I think I fixed it by modifying keepalive.py. Here is the diff:163< class HTTPResponse(httplib.HTTPResponse):---> class HTTPResponse(urllib2.addinfourl):
speedplane
2010-01-08 00:02:52