Last active
January 1, 2024 15:52
-
-
Save Apocryphon-X/9b6a5105fc87684b2208ee42e99d79c5 to your computer and use it in GitHub Desktop.
Disable image loading for Chromedriver using Python Selenium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
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) | |
driver.get("https://google.com/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment