开发者

How to speed up read method call of object returned by urllib2.urlopen

开发者 https://www.devze.com 2022-12-28 05:52 出处:网络
I have following code. req = urllib2.Request(url,\'\',txheaders) f = urllib2.urlopen(req) data = f.read(开发者_Go百科)

I have following code.

 req = urllib2.Request(url,'',txheaders)
 f = urllib2.urlopen(req)
 data = f.read(开发者_Go百科)
 f.close()

In the above code, the read function takes 1-2 minutes when response is of 58KB. How can I make this faster.

0

精彩评论

暂无评论...
验证码 换一张
取 消