ui自动化,不显示UI界面运行
from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument('--headless') driver = webdriver.Chrome(chrome_options = chrome_options) driver.get('https://www.baidu.com') print(driver.page_source)