为了账号安全,请及时绑定邮箱和手机立即绑定

使用HTTP PROXY - Python

使用HTTP PROXY - Python

慕哥6287543 2019-09-19 16:45:29
我很熟悉我应该将HTTP_RPOXY环境变量设置为代理地址。一般urllib工作正常,问题是处理urllib2。>>> urllib2.urlopen("http://www.google.com").read()回报urllib2.URLError: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>要么urllib2.URLError: <urlopen error [Errno 11004] getaddrinfo failed>额外信息:urllib.urlopen(....)工作正常!只是urllib2正在玩耍...我试过@Fenikso的答案,但我现在收到这个错误:URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or establishedconnection failed because connected host has failed to respond>      有任何想法吗?
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 1048 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信