这个错误是什么意思?我怎样摆脱这个问题?
Traceback (most recent call last):
File "bestcodeever.py", line 16, in <module>
html=urllib2.urlopen('http://' + fulllink).read()
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 503: Service Unavailable
答案 0 :(得分:1)
HTTP 503状态代码表示您尝试联系的Web服务器不可用(可能是出于维护原因)。它仍然能够使用此代码做出最低限度的响应,因此它不会脱机并且正在侦听请求,它只是暂时不返回您想要的服务:稍后再试。
如果您最近对Python脚本的要求太高,那么您的IP地址也可能被服务器列入黑名单......