无法在代理链上运行selenium python脚本

无法在代理链上运行selenium python脚本,python,selenium,proxy,Python,Selenium,Proxy,导言 我用Python3编写了一个小脚本,它可以打开GeckoWebDriver并打开任意网站。然后我添加了一些其他功能,比如能够在循环中多次打开窗口 错误 脚本在正常运行时可以使用: Python3 run.py 但是当使用proxychains运行相同的东西时,我会得到错误“Denied”。 下面的所有脚本逻辑和错误消息 脚本-正在运行 driver = webdriver.Firefox(firefox_profile=profile) driver.get("https://www.yo

导言 我用Python3编写了一个小脚本,它可以打开GeckoWebDriver并打开任意网站。然后我添加了一些其他功能,比如能够在循环中多次打开窗口

错误 脚本在正常运行时可以使用:

Python3 run.py

但是当使用proxychains运行相同的东西时,我会得到错误“Denied”。 下面的所有脚本逻辑和错误消息

脚本-正在运行

driver = webdriver.Firefox(firefox_profile=profile)
driver.get("https://www.youtube.com/")
time.sleep(delay_time)
driver.close()
脚本-旋转

for x in range(rotations):
        print(f"Session: {x} started")
        run_driver(delay) # function for running driver
ProxyChains-3.1 (http://proxychains.sf.net)
Loading useragent file .. 

Session: 0 started
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
^Z
[1]+  Stopped                 proxychains python3 run.py --num 1 --delay 1 --ripper 0
代理链上的错误

for x in range(rotations):
        print(f"Session: {x} started")
        run_driver(delay) # function for running driver
ProxyChains-3.1 (http://proxychains.sf.net)
Loading useragent file .. 

Session: 0 started
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
|DNS-request| localhost 
|R-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| localhost is 127.0.0.1
|R-chain|-<>-127.0.0.1:9050-<><>-127.0.0.1:46985-<--denied
^Z
[1]+  Stopped                 proxychains python3 run.py --num 1 --delay 1 --ripper 0
ProxyChains-3.1(http://proxychains.sf.net)
正在加载useragent文件。。
会话:0已启动

|R-chain |--127.0.0.1:9050--127.0.0.1:46985-欢迎来到SO。请花时间阅读stackoverflow.com/help/how-to-ask。它将帮助你设计出可靠的问题,希望能得到有用的答案。但这是一个很好的第一个问题。