selenium的无头模式--headless

无论是火狐还是谷歌浏览器只需要添加一个参数即可:

from selenium.webdriver.firefox.options import Options
Options().add_argument('--headless')

猜你喜欢

转载自blog.csdn.net/ryuhfxz/article/details/85784175