- 帖子
- 14
- 精华
- 0
- 积分
- 276
- 阅读权限
- 30
- 注册时间
- 2014-3-1
- 最后登录
- 2014-9-9
|
crossin先生 发表于 2014-5-19 12:53
一直不可以?
你在代码里输出url看看,是不是因为笔误或者编码导致url不对了。
如果确认正确,那可能对方 ...
Traceback (most recent call last):
File "E:/python/Python project/python code of IDLE/qiubai.py", line 47, in <module>
if_qb()
File "E:/python/Python project/python code of IDLE/qiubai.py", line 40, in if_qb
for_qb()
File "E:/python/Python project/python code of IDLE/qiubai.py", line 29, in for_qb
qiubai(page)
File "E:/python/Python project/python code of IDLE/qiubai.py", line 13, in qiubai
html = urllib2.urlopen(url).read()
File "D:\Python27\lib\urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "D:\Python27\lib\urllib2.py", line 410, in open
response = meth(req, response)
File "D:\Python27\lib\urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "D:\Python27\lib\urllib2.py", line 448, in error
return self._call_chain(*args)
File "D:\Python27\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "D:\Python27\lib\urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 502: Bad Gateway |
|