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

    原文作者:Coding_Bear
    原文地址: https://blog.csdn.net/Coding_Bear/article/details/79217298
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞