python selenium 问题
from selenium import webdriverimport time
url = 'https://www.baidu.com'
# 设置无界面模型
option = webdriver.FirefoxOptions()
option.add_argument('--headless')
driver = webdriver.Firefox(firefox_options=option, executable_path='/usr/local/bin/geckodriver')
driver.get(url)
print(driver.title)
报错如下
webdriver.Firefox(firefox_options=option
没有firefox_options
改options
页:
[1]