I am working on my pet project and have chosen www.pythonanywhere.com for hosting
to implement some functionality, I need to take information from sitesbut when I execute the following code
import requestsresponse = requests.get("https://example.com", proxies={"http":"http://162.120.71.11:80"}, headers={"User-Agent": "Opera/9.80 (X11; Linux x86_64; U; de) Presto/2.2.15 Version/10.00"} )print( response.text )
I'm getting an error
raise ProxyError(e, request=request)requests.exceptions.ProxyError: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))
I tried changing user agents and proxies but nothing changed
and also I tried to make a request to different sites and for some sites it worked but not for those that I need