When I try to set the proxy with the selenium official examples
from selenium import webdriver
PROXY = "34.91.135.38:80"
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
"httpProxy": PROXY,
"ftpProxy": PROXY,
"sslProxy": PROXY,
"proxyType": "MANUAL",
}
with webdriver.Firefox() as driver:
# Open URL
driver.get("https://selenium.dev")
I get the following error:
Traceback (most recent call last):
File "test.py", line 14, in <module>
driver.get("https://selenium.dev")
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//selenium.dev/&c=UTF-8&d=We%20can%E2%80%99t%20connect%20to%20the%20server%20at%20selenium.dev.
I tried many different ways and different proxy, but still, get the same error message. Am I made a mistake in this approach? Thank you