在使用selenium写爬虫时打开chrome时不能正常打开网址,地址栏出现data:;
![图片[1]-记录一下selenium打开chrome提示data:;解决方法-吾爱博客](https://img.ayfre.com/2022/05/27/9fe9371a6a050373b6566d39ea428721.png)
解决方法
options = webdriver.ChromeOptions()
options.add_argument("--remote-debugging-port=9222")
options.binary_location = r"D:\\Chrome\\Chrome.exe"
chrome_driver_path = r"D:\\Chrome\\chromedriver.exe"
driver = webdriver.Chrome(executable_path=chrome_driver_path, options=options)
driver.get(url)
![图片[2]-记录一下selenium打开chrome提示data:;解决方法-吾爱博客](https://img.ayfre.com/2022/05/27/722d25b313feb9a4a5ec594b085d2d3c.png)
© 版权声明
吾爱博客|AYFRE.COM 版权所有,转载请标明出处。
THE END
请登录后查看评论内容