Python 使用浏览器进行代理身份验证

Python 使用浏览器进行代理身份验证,python,authentication,proxy,automation,web-crawler,Python,Authentication,Proxy,Automation,Web Crawler,我有代理身份验证,我想将其添加到chrome webdriver后台模式有什么想法吗? proxy = req.ProxyHandler({'http': f'http://{usr}:{pw}@{new_proxy}', 'https': f'https://{usr}:{pw}@{new_proxy}'}) auth = req.HTTPBasicAuthHandler() opener = req.build_opener(proxy, auth, req.HTTPHandler) req

我有代理
身份验证
,我想将其添加到chrome webdriver后台模式有什么想法吗?

proxy = req.ProxyHandler({'http': f'http://{usr}:{pw}@{new_proxy}', 'https': f'https://{usr}:{pw}@{new_proxy}'})
auth = req.HTTPBasicAuthHandler()
opener = req.build_opener(proxy, auth, req.HTTPHandler)
req.install_opener(opener)
conn = req.urlopen('http://www.google.com/', timeout=1)