首页 > Web开发 > 详细

web crawling(plus3) errors solution

时间:2017-10-02 17:12:41      阅读:238      评论:0      收藏:0      [点我收藏+]

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!