1

I am trying to connect to a website using Selenium in Python. The script works perfectly when I don't use any proxy. However, when I try to re-run the script again with Proxy then I get ERR_TUNNEL_CONNECTION_FAILED and the page isn't displayed. Below is the code:

from selenium import webdriver
webdriver.DesiredCapabilities.CHROME['proxy']={
    "httpProxy":PROXY,
    "ftpProxy":PROXY,
    "sslProxy":PROXY,

    "proxyType":"MANUAL",

}
browser = webdriver.Chrome(executable_path='../chromedriver.exe')
browser.get('https://www.facebook.com')

Is there a solution to get past this error code? The only thing new that is added is the webdriver.DesiredCapabilities.CHROME where PROXY is added. If I don't use this then the script works just fine. I am unable to understand what I may be doing wrong here.

3
  • How do you the proxy is actually working or not? You should manually configure the proxy and see if it actually works for you or not Commented May 21, 2020 at 5:58
  • 1
    I am using this to get the proxies: free-proxy-list.net Commented May 21, 2020 at 6:17
  • 2
    Lot of those proxies don't work. So test then using some online tester like hidemy.name/en/proxy-checker Commented May 21, 2020 at 6:21

1 Answer 1

1

The error you are getting indicates that the proxy doesn't work. Best way is to make sure you test your proxies with an online proxy test tool

One such tool is below

https://hidemy.name/en/proxy-checker/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.