使用selenium在chrome打开网页报错

时间:2024-10-12 03:24:53

1、下载chrome driverchromedriver下载地址:https://sites.google.com/a/chromium.org/chromedriver/downloads

使用selenium在chrome打开网页报错
使用selenium在chrome打开网页报错

2、代码中手动设置chrome driver的路径:from selenium import webdriverimport oschromeDriver = "D:\...\chromedriver_win32\chromedriver.exe"os.environ["webdriver.chrome.driver"] = chromeDriverbrower = webdriver.Chrome(chromeDriver)brower.get("https://www.baidu.com")

© 手抄报圈