固然你得先下載谷歌驅動chromedriver.exe,安裝seleniumweb
from selenium import webdriverchrome
from selenium.webdriver.chrome.options import Optionsless
chrome_options = Options()ide
chrome_options.add_argument('--headless')spa
driver = webdriver.Chrome(chrome_options=chrome_options,executable_path = 'D:\APPS\dir\chromedriver.exe')orm