urllib2.urlopen超时

urllib2.urlopen设置超时,可以解决read方法阻塞的问题

urllib2.urlopen(‘xxx’,timeout=30)

posted @ 2014-02-27 21:26  anexplore  阅读(480)  评论(0编辑  收藏  举报