from selenium import webdriver
from selenium.webdriver.chrome.service import Service
chrome_path = r'D:\下载\Win_x64_941148_chrome-win\chrome-win\Chrome.exe'
driver_path = r'D:\下载\Win_x64_941148_chromedriver_win32\chromedriver_win32\chromedriver.exe'
service = Service(executable_path=driver_path)
options = webdriver.ChromeOptions()
options.binary_location = chrome_path
web = webdriver.Chrome(service=service, options=options)
web.get("http://www.baidu.com")
新版本的Selenium
于 2023-09-25 18:28:27 首次发布