【发布时间】:2019-03-05 14:56:46
【问题描述】:
我支持代理设置,代理设置上的环境变量设置正确。例如,在进行 pip 安装时,环境变量可以正常工作。我使用 getproxies 方法检索代理设置,我检查并返回了正确的 dict。
我正在尝试以下方法: 导入请求 导入urllib
r = requests.get('http://www.nu.nl', proxies=urllib.request.getproxies())
我得到的错误信息:
ProxyError: HTTPSConnectionPool(host='www.nu.nl', port=443): Max retries
exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.',
OSError('Tunnel connection failed: 407 authenticationrequired',)))
我在这里错过了什么?
【问题讨论】:
标签: python http proxy python-requests