I have a strange bug when trying to urlopen
a certain page from Wikipedia. This is the page:
http://en.wikipedia.org/wiki/OpenCola_(drink)
This is the shell session:
>>> f = urllib2.urlopen('http://en.wikipedia.org/wiki/OpenCola_(drink)')
Traceback (most recent call last):
File "C:Program FilesWing IDE 4.0srcdebugserver\_sandbox.py", line 1, in <module>
# Used internally for debug sandbox under external interpreter
File "c:Python26Liburllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "c:Python26Liburllib2.py", line 397, in open
response = meth(req, response)
File "c:Python26Liburllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "c:Python26Liburllib2.py", line 435, in error
return self._call_chain(*args)
File "c:Python26Liburllib2.py", line 369, in _call_chain
result = func(*args)
File "c:Python26Liburllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
This happened to me on two different systems in different continents. Does anyone have an idea why this happens?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…