|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- >>> a=urllib.request.urlopen("http://www.bilibili.com")
- Traceback (most recent call last):
- File "<pyshell#6>", line 1, in <module>
- a=urllib.request.urlopen("http://www.bilibili.com")
- File "F:\python\lib\urllib\request.py", line 222, in urlopen
- return opener.open(url, data, timeout)
- File "F:\python\lib\urllib\request.py", line 531, in open
- response = meth(req, response)
- File "F:\python\lib\urllib\request.py", line 641, in http_response
- 'http', request, response, code, msg, hdrs)
- File "F:\python\lib\urllib\request.py", line 563, in error
- result = self._call_chain(*args)
- File "F:\python\lib\urllib\request.py", line 503, in _call_chain
- result = func(*args)
- File "F:\python\lib\urllib\request.py", line 755, in http_error_302
- return self.parent.open(new, timeout=req.timeout)
- File "F:\python\lib\urllib\request.py", line 531, in open
- response = meth(req, response)
- File "F:\python\lib\urllib\request.py", line 641, in http_response
- 'http', request, response, code, msg, hdrs)
- File "F:\python\lib\urllib\request.py", line 563, in error
- result = self._call_chain(*args)
- File "F:\python\lib\urllib\request.py", line 503, in _call_chain
- result = func(*args)
- File "F:\python\lib\urllib\request.py", line 755, in http_error_302
- return self.parent.open(new, timeout=req.timeout)
- File "F:\python\lib\urllib\request.py", line 531, in open
- response = meth(req, response)
- File "F:\python\lib\urllib\request.py", line 641, in http_response
- 'http', request, response, code, msg, hdrs)
- File "F:\python\lib\urllib\request.py", line 569, in error
- return self._call_chain(*args)
- File "F:\python\lib\urllib\request.py", line 503, in _call_chain
- result = func(*args)
- File "F:\python\lib\urllib\request.py", line 649, in http_error_default
- raise HTTPError(req.full_url, code, msg, hdrs, fp)
- urllib.error.HTTPError: HTTP Error 403: Forbidden
复制代码 |
|