Skip to content

Prevent fetching images instead of just blocking the loading? #2710

Answered by mdmintz
victorbmlabs asked this question in Q&A
Discussion options

You must be logged in to vote

This is essentially what block_images does:

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)

Source: https://stackoverflow.com/a/31581387/7058266

It blocks the images from being displayed in the DOM.
It doesn't change bandwidth.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants