import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

# 添加浏览器参数
chrom_options = Options()
chrom_options.add_argument('--headless')
ch_options = Options()
ch_options.add_argument('--headless')
driver = webdriver.Chrome(chrome_options=ch_options)
# 打开百度试一下
driver.get("https://www.baidu.com")
time.sleep(3)
print(driver.title)
driver.quit()
