Forums

Proxy error when scraping to IMDB.com Tunnel connection failed: 403 Forbidden

Hello, I developped a code in my pyhton IDE to scrape my whatchlist on IMDB. This was working correctly in the IDE. Now i cannot get it to work when passing it to pythonanywhere. I get this error : OSError: Tunnel connection failed: 403 Forbidden and then this HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /user/ur70527211/watchlist (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

I tried using an agent with no success : headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36', } Any idea is welcome :) Thanks !

Internet access is restricted to our allowlist for free users