超全chrome和driver的对应链接
https://raw.githubusercontent.com/GoogleChromeLabs/chrome-for-testing/main/data/latest-patch-versions-per-build-with-downloads.json
从这个链接中直接找对应的chrome和driver
复制链接下载。
注意最新版的在一些文章里的链接是找不到的!
附上代码:
from selenium.webdriver.chrome.service import Service
from selenium import webdriver
import time
# 创建一个WebDriver实例
service = Service(executable_path="D:/tools/chromedriver.exe")
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
time.sleep(10)