urllib3.ProxyManager выдает ошибку аутентификации - PullRequest
0 голосов
/ 27 сентября 2019

Я пытаюсь отправить запрос https с помощью urllib3.ProxyManager.Мой код выглядит примерно так

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')))

Спасибо, Ятрик

...