urllib2.urlopen设置超时,可以解决read方法阻塞的问题 urllib2.urlopen(‘xxx’,timeout=30) 转载于:https://www.cnblogs.com/clyskyblue/p/3572418.html