📅  最后修改于: 2022-03-11 14:47:02.046000             🧑  作者: Mango
from selenium import webdriver
profile = webdriver.FirefoxProfile()
# 1 - Allow all images
# 2 - Block all images
# 3 - Block 3rd party images
profile.set_preference("permissions.default.image", 2)
driver = webdriver.Firefox(firefox_profile=profile)