How to Setup Private Proxy with Selenium?

前端 未结 3 1448
陌清茗
陌清茗 2021-01-16 18:03

I\'ve been trying for days to setup a private proxy (with authentication) in Selenium using Firefox. However, no matter what I do I\'v been unsuccessful.

Currently,

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-16 18:38

    Find solution:

    proxy = Proxy({
        'proxyType': ProxyType.MANUAL,
        'httpProxy': PROXY_HOST,
        'socksUsername': 'name',
        'socksPassword': 'pass'
        })
    
    driver = webdriver.Firefox(proxy=proxy)
    

提交回复
热议问题