Selenium3+python自动化66-Chrome您使用的是不受支持的命令行标记:--ignore-certificate-errors

转自:https://www.cnblogs.com/yoyoketang/p/6789537.html?utm_source=itdadao&utm_medium=referral

chromedriver下载页:http://chromedriver.storage.googleapis.com/index.html

本人随便点击下载了个chromedriver,然后python运行Selenium报错

from selenium import webdriver
# from selenium.webdriver.chrome.options import Options

# chrome_options = Options()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
driver = webdriver.Chrome(chrome_options=chrome_options,executable_path="D:\\开发\chromedriver_win32\\chromedriver")
driver.get("https://s.taobao.com/search/?")
driver.get_screenshot_as_file("C:\\Users\\Administrator\\Desktop\\test.png")
driver.close()


执行谷歌浏览器弹出报错


原因是chromedriver的版本和本机安装的chrome版本对不上

查看chrome版本号-》设置-》关于



chrome版本是66,因为谷歌浏览器是最新版本,所以我也去重新下载最新版本的chromedriver


chromedriver2.38是最新的版本,下载后,解压重新运行selenium,一切正常

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值