网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 生活知识 知识问答

使用selenium在chrome打开网页报错

时间:2026-02-15 08:39:29

1、下载chrome driver

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

使用selenium在chrome打开网页报错

使用selenium在chrome打开网页报错

2、代码中手动设置chrome driver的路径:

from selenium import webdriver

import os

chromeDriver = "D:\...\chromedriver_win32\chromedriver.exe"

os.environ["webdriver.chrome.driver"] = chromeDriver

brower = webdriver.Chrome(chromeDriver)

brower.get("https://www.baidu.com")

© 2026 一点知道
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com