How do I set a proxy for phantomjs/ghostdriver in python webdriver?
I'm trying to figure out how to route my requests through an HTTP proxy. I'm initializing webdriver like this: user_agent = 'my user agent 1.0' DesiredCapabilities.PHANTOMJS['phantomjs.page.settings.userAgent'] = user_agent driver = webdriver.PhantomJS() I've gone through the docs and the source and can't seem to find a way to use a proxy server with phantomjs for through webdriver. Any suggestions? Below is the example of how to set proxy for PhantomJs in Python. You may change proxy type: socks5/http. service_args = [ '--proxy=127.0.0.1:9999', '--proxy-type=socks5', ] browser = webdriver