看代码;
利用urlopen中的超时参数设立一个循环
while True:
try:
page = urllib.request.urlopen(url, timeout=3)
break
except:
tracebake.print_exc()
转载于:https://www.cnblogs.com/Blaxon/p/4466336.html
原文链接:https://blog.csdn.net/weixin_30342827/article/details/99632824
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
还没有人抢沙发呢~