【发布时间】:2011-03-11 05:41:20
【问题描述】:
我有这个检查网站的程序,我想知道如何通过 Python 中的代理检查它...
这是代码,只是举例
while True:
try:
h = urllib.urlopen(website)
break
except:
print '['+time.strftime('%Y/%m/%d %H:%M:%S')+'] '+'ERROR. Trying again in a few seconds...'
time.sleep(5)
【问题讨论】: