seleniumwire.py投掷err_tunnel_connection_failed使用代理时
我一直在尝试将身份验证的代理添加到我的硒代码中。经过很多研究,我遇到了硒电线。当我运行时,它会给我带来这个错误吗?
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED
(Session info: headless chrome=102.0.5005.115)
import seleniumwire
from seleniumwire import webdriver
import time
options = {
'proxy': {
'https': 'https://proxy.proxyverse.io:443',
'http': 'http://proxy.proxyverse.io:443',
}
}
# other chrome options
op = webdriver.ChromeOptions()
op.add_argument("window-size=1920,1080")
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_argument("--headless")
op.add_experimental_option('useAutomationExtension', False)
op.add_argument("start-maximized")
driver = webdriver.Chrome("path/chromedriver.exe" ,options=op,seleniumwire_options=options)
driver.get("https://google.com/")
我需要知道是什么原因造成的,因为没有代理人驾驶员工作正常。 谢谢
I have been trying to add authenticated proxies to my selenium code. I came across selenium wire after alot of research. When I ran the can it threw me this error?
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED
(Session info: headless chrome=102.0.5005.115)
import seleniumwire
from seleniumwire import webdriver
import time
options = {
'proxy': {
'https': 'https://proxy.proxyverse.io:443',
'http': 'http://proxy.proxyverse.io:443',
}
}
# other chrome options
op = webdriver.ChromeOptions()
op.add_argument("window-size=1920,1080")
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_argument("--headless")
op.add_experimental_option('useAutomationExtension', False)
op.add_argument("start-maximized")
driver = webdriver.Chrome("path/chromedriver.exe" ,options=op,seleniumwire_options=options)
driver.get("https://google.com/")
I need to know what is causing this because without proxies the driver is working fine.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Seleniumwire具有代理网络:
我不建议Seleniumwire,因为有一个未解决的 TLS指纹的问题,驱动器将被Cloudflare迅速检测到。普通的硒软件包具有代理配置的方法,但它仅与“主机:端口”代理使用:
上面的配置不适用于代理网络端点方法(“ https://proxy.proxy.proxyverse) .io:443“),似乎没有当前的解决方案。
有关更多详细信息和当前跟踪: python selenium proxy网络
SeleniumWire with Proxy Network:
I would not recommend SeleniumWire as there is an unresolved issue with the TLS fingerprint and the driver will be quickly detected by CloudFlare. The normal Selenium package has a method of proxy configuration but it only works with "host:port" proxies:
The above configuration does NOT work with the proxy network endpoint method ("https://proxy.proxyverse.io:443") and there seems to be no current solution.
For more detail and current tracking: Python Selenium Proxy Network