python urllib2 请求521

86码记 2016-05-31 03:22:25
Traceback (most recent call last):
File "D:/Users/work/proxy_text/myproxy.py", line 17, in <module>
r = urllib2.urlopen(req)
File "C:\Python27\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 437, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 475, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 521:

Process finished with exit code 1
...全文
294 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
oyljerry 2017-10-25
  • 打赏
  • 举报
回复
521 Web Server Is Down The origin server has refused the connection from CloudFlare.
songbaiyiran 2017-10-25
  • 打赏
  • 举报
回复
5作为开头的是服务器执行的时候报错,可能是urlopen的参数不对,可能是url里的参数,也可能是post的参数,header也有可能,总之是你写的urlopen里面的值有问题

37,722

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧