Не работает прокси в python requests. Выводит ошибки:
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ramziv.com', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))))
requests.exceptions.ProxyError: HTTPSConnectionPool(host='ramziv.com', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))))
Решения по поводу SSL не подходят. Код:
for i in range(0, count):
proxy = {
'http': http[i],
'https': https[i]
}
print(f'Domain: {domain}')
print(proxy)
response = requests.get(domain, verify=False, proxies=proxy)
print(response.text)