【发布时间】:2019-09-27 09:21:18
【问题描述】:
我正在尝试使用 urllib3.ProxyManager 发送 https 请求。 我的代码看起来像这样
default_headers = urllib3.util.make_headers(proxy_basic_auth='user:passwd')
http = urllib3.ProxyManager(proxyUrl, headers=default_headers, ca_certs=certifi.where())
http.request('GET', url)
我遇到了错误 -
MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='clinicaltrials.gov', port=443): Max retries exceeded with url: /ct2/results?term=Lilly&displayxml=true&count=5000 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
谢谢, 亚特里克
【问题讨论】:
-
你试过这个解决方案了吗? stackoverflow.com/a/11763340/2652091