selenium 不加载图片设置

转载:https://www.cnblogs.com/roystime/p/6935585.html

fromseleniumimport webdriver

chrome_options = webdriver.ChromeOptions()

prefs = {"profile.managed_default_content_settings.images":2}

chrome_options.add_experimental_option("prefs",prefs)

driver = webdriver.Chrome(options=chrome_options)

你可能感兴趣的:(selenium 不加载图片设置)