代码如下:
from selenium import webdriver
options = webdriver.FirefoxOptions()
options.add_argument('-headless')
browser = webdriver.Firefox(options=options)
感谢stack overflow网友的帮助
https://stackoverflow.com/questions/10060417/python-firefox-headless
代码如下:
from selenium import webdriver
options = webdriver.FirefoxOptions()
options.add_argument('-headless')
browser = webdriver.Firefox(options=options)
感谢stack overflow网友的帮助
https://stackoverflow.com/questions/10060417/python-firefox-headless