Answer the question
In order to leave comments, you need to log in
When executing a request in python through proxies, this error appears, what could be the problem?
When executing this code, an
equests.exceptions.SSLError error appears: HTTPSConnectionPool(host='beru.ru', port=443): Max retries exceeded with url: some link (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))
time.sleep(t_sleep)
print(t_sleep)
url = f'{values_ya_link}'
headers = {"User-Agent" : str(useragent),
"Accept" : " text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q= 0.9"}
req = requests.get(url, headers=headers,proxies=proxyDict)
conn = http.client.HTTPConnection("ifconfig.me")
ip = conn.request("GET", "/ip")
ip = conn.getresponse().read()
print(ip)
src = req.text
Answer the question
In order to leave comments, you need to log in
If this is an http proxy, then explicitly specifying the proxy address via http for the https protocol can help
proxies={
'https': 'http://IP:PORT',
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question