未发现的Chromedriver如何使用用户名/密码添加代理?
我以这种方式添加Chrome选项,如果使用代理IP身份验证,它可以正常工作。
options = webdriver.ChromeOptions()
options.headless = True
options.add_argument('--proxy-server=92.128.165.143:3399')
driver = uc.Chrome(options=options)
但是,我有一个以这种格式进行身份验证的代理:
http://用户名:
如果我添加它
options.add_argument('--proxy-server=http://username:[email protected]:3399')
不起作用。如何使用用户名/密码添加它?这仅适用于未发现的铬驱动器。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不幸的是,目前只有一种方法可以通过未发现的ChromeDriver进行身份验证。
Unfortunately at the moment there is only one way to authenticate with an undetected chromedriver.
我认为香港专业教育学院已经在Selenium Wire的帮助下实现了它,但它与Kivy Gui无法使用,因此可以拼写,但是如果您想与Kivy一起使用,那么您肯定会出现错误
I think Ive achieved it already by the help of selenium wire but it didnt work with kivy gui so for scripting you can carryon like this but if you wanna use with kivy then definitely you will get error
使用以下代码添加用户名和密码添加代理:
编辑:
我找到了此如何在硒中使用身份验证来设置代理?
Use the following code to add proxy with username and password:
edit:
I found this how to set proxy with authentication in selenium chromedriver python?