Python中Selenium ChromeDriver遇URL无法获取、访问被拒问题求助
问题:Selenium初始化Chrome时触发代理访问拒绝错误
环境信息
- Python 3.12
- Selenium版本:4.18.1
- urllib3版本:2.2.1
- ChromeDriver版本:96.0.4664.45
代码示例
from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service(executable_path=chrome_driver_path) options = webdriver.ChromeOptions() options.add_argument(f'--proxy-server={http_proxy}') driver = webdriver.Chrome(service=service, options=options)
错误信息
selenium.common.exceptions.WebDriverException: Message:
ERROR: The requested URL could not be retrieved
相关产品推荐
相关产品推荐

