I'm just wondering how you would go about setting a specific proxy for each request?!
The following block quote is the only thing the documentation says about this. Also, the documentation only provides an example for Java...
Firefox version 48 and newer - GeckoDriver
Firefox maintains its proxy configuration in a profile. You can preset the proxy in a profile and use that Firefox Profile or you can set it on profile that is created on the fly as is shown in the following example. With GeckoDriver the proxy has to be passed through the required capabilities.
Any advice would be appreciated!
FirefoxOptions options = new FirefoxOptions(); FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("network.proxy.type", 1); profile.setPreference("network.proxy.http", "localhost"); profile.setPreference("network.proxy.http_port", 6565); profile.setPreference("network.proxy.ssl", "localhost"); profile.setPreference("network.proxy.ssl_port", 6565); options.setProfile(profile); setWebDriver(new FirefoxDriver(options));
– Disfeatureprofile = FirefoxProfile() myProxy = "localhost:3456" proxy = Proxy({ 'proxyType': ProxyType.MANUAL, 'httpProxy': myProxy, 'ftpProxy': myProxy, 'sslProxy': myProxy, 'noProxy': '' }) profile.set_proxy(proxy) driver = webdriver.Firefox(firefox_profile=profile) driver.get("https://www.google.com") driver.quit()
. – Disfeaturefrom selenium import webdriver from selenium.webdriver import Firefox from selenium.webdriver.common.proxy import Proxy, ProxyType from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
– Disfeature