【转】判断URL是否能够访问时间:2023-03-09 08:44:00 import urllib2 def file_exists(url): request = urllib2.Request(url) request.get_method = lambda : 'HEAD' try: response = urllib2.urlopen(request) return True except: return False 原文地址:http://mysrc.sinaapp.com/view_note/?id=395