close
本篇出自:GaryLee
import urllib2
def IsConnectionFailed(url):
"""
檢查連線是否失敗。
"""
try:
urllib2.urlopen(url)
except urllib2.HTTPError, e:
return False
return True
全站熱搜