301 moved permanently
302 found
303 not modified
400 bad request
401 unauthorized
403 forbidden
404 not found
500 internal server error
501 not implementedh
URLError >HTTPError
URLError: not linked the internal server: no web connection; remote url not exit; HTTPError
******************************************
import urllib.error
import urllib.request
try:
urllib.request.urlopen("http://blog.cssdn.net")
except urllib.error.URLError as e:
if hasattr(e,"code"):
print(e.code)
if hasattr(e,"reason"):
print(e.reason)
web crawling(plus3) errors solution
原文:http://www.cnblogs.com/rabbittail/p/7620347.html