Skip to content

Instantly share code, notes, and snippets.

@Apocryphon-X
Last active January 1, 2024 15:52
Show Gist options
  • Save Apocryphon-X/9b6a5105fc87684b2208ee42e99d79c5 to your computer and use it in GitHub Desktop.
Save Apocryphon-X/9b6a5105fc87684b2208ee42e99d79c5 to your computer and use it in GitHub Desktop.
Disable image loading for Chromedriver using Python Selenium
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