Selenium webdriver.Remote driver does not work with tor proxy(webdriver.Chrome does)

前端 未结 2 2029
谎友^
谎友^ 2021-01-03 13:00

I\'m trying to use socks5 proxy on my remote driver which is hosted as a docker container on port 4444.

here is code-sample:

from selenium import we         


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 14:00

    I suggest you to add the configuration of your proxy in docker config.json file:

    {
     "proxies":
     {
       "default":
       {
         "httpProxy": "socks5://127.0.0.1:9050",
         "httpsProxy": "socks5://127.0.0.1:9050"
       }
     }
    }
    

    and remove it from your python script

提交回复
热议问题