Selenium chrome配置不加载图片

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
prefs = {"profile.managed_default_content_settings.images":2}
chrome_options.add_experimental_option("prefs",prefs)
            
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("https://www.baidu.com/")

  

转载于:https://www.cnblogs.com/royfans/p/9055975.html

你可能感兴趣的:(Selenium chrome配置不加载图片)