I am trying to set some proxies using the Firefox webdriver geckodriver, but it keeps throwing this error InvalidArgumentError: Since Firefox 90 'ftpProxy' is no longer supported
.
I've tried many different things, in this one the code break throwing the exception:
firefox_capabilities = webdriver.DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
firefox_capabilities['proxy'] = {
"proxyType": "MANUAL",
"httpProxy": PROXY,
"ftpProxy": PROXY,
"sslProxy": PROXY
}
driver = webdriver.Firefox(executable_path=path,options=options,capabilities=firefox_capabilities)
In this one the code runs but I've tested the IP and it is using my own IP instead of proxy (to make sure that the proxy is working I've ran it using chromedriver and it is working):
from selenium.webdriver.common.proxy import Proxy, ProxyType
proxy = Proxy({
'proxyType': ProxyType.MANUAL,
'httpProxy': PROXY,
'ftpProxy': PROXY,
'sslProxy': PROXY,
'noProxy': '' # set this value as desired
})
driver = webdriver.Firefox(executable_path=path,options=options,proxy=proxy )
Could you guys help me setting this up?
I just realized that this is the right code, my problem was because I was using a proxy library and the proxies weren't good.
from selenium.webdriver.common.proxy import Proxy, ProxyType
proxy = Proxy({
'proxyType': ProxyType.MANUAL,
'httpProxy': PROXY,
'ftpProxy': PROXY,
'sslProxy': PROXY,
'noProxy': '' # set this value as desired
})
driver = webdriver.Firefox(executable_path=path,options=options,proxy=proxy )