Selenium (Python) - Changing Proxy During Runitime?
You will have to re-launch the browser instance in order to achieve this. Wherever you want to change the proxy insert the following code:
driver.quit()chrome_options = webdriver.ChromeOptions()chrome_options.add_argument('--proxy-server=<new proxy>')driver = webdriver.Chrome(chrome_options=chrome_options)
This will close the current browser and launch a new one with the new proxy.