There is something wrong with my proxy configuration? when I execute an error:
selenium.common.exceptions.WebDriverException: Message: connection refused
app.py
from selenium.webdriver.firefox.options import Options
from selenium import webdriver
from selenium.webdriver.common.proxy import *
myProxy = "46.52.141.46:8080"
options = Options()
options.add_argument('-headless')
proxy = Proxy({
'proxyType': ProxyType.MANUAL,
'httpProxy': myProxy,
'ftpProxy': myProxy,
'sslProxy': myProxy,
'noProxy': '' # set this value as desired
})
driver = webdriver.Firefox(proxy=proxy, executable_path='/usr/local/bin/geckodriver', options=options)
caps = webdriver.DesiredCapabilities.FIREFOX.copy()
proxy.add_to_capabilities(caps)
driver = webdriver.Remote(desired_capabilities=caps)
driver.get('http://ping.eu')
driver.quit()
I have tried many ways but the error remains the same, please help