Here is another way to disable images:
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)
I found it below:
More Related Contents:
- Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed
- How to make Selenium not wait till full page load, which has a slow script?
- unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed with ChromeDriver Selenium
- ‘Webdrivers’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
- Way to change Google Chrome user agent in Selenium?
- How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
- Running Selenium with Headless Chrome Webdriver
- WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
- Unable to use Selenium to automate Chase site login
- What is the fastest way to open urls in new tabs via Selenium – Python?
- Python: find_element_by_css_selector
- Scrape website with dynamic mouseover event
- How to download XML files avoiding the popup This type of file may harm your computer through ChromeDriver and Chrome using Selenium in Python
- How to disable CSS in Python selenium using ChromeOptions
- Using Extensions with Selenium (Python)
- Dynamic dropdown doesn’t populate with auto suggestions on https://www.nseindia.com/ when values are passed using Selenium and Python
- How do I pass options to the Selenium Chrome driver using Python?
- Chromedriver only supports characters in the BMP error while sending Emoji with ChromeDriver Chrome using Selenium Python to Tkinter’s label() textbox
- Click a Button in Scrapy
- WebDriverException: Message: Service /content/chromedriver unexpectedly exited. Status code was: -6 with ChromeDriver Google Colab and Selenium
- TypeError: ‘module’ object is not callable error with driver=webdriver(“C:\\Python34\\Lib\\site-packages\\selenium\\webdriver\\chromedriver.exe”)
- How to use chrome webdriver in selenium to download files in python?
- SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 84 using ChromeDriver and Chrome through Selenium and Python
- Selenium – Python – AttributeError: ‘WebDriver’ object has no attribute ‘find_element_by_name’
- crawl site that has infinite scrolling using python
- “Failed to decode response from marionette” message in Python/Firefox headless scraping script
- Scraping Data from a website which uses Power BI – retrieving data from Power BI on a website
- Can’t use chrome driver for Selenium
- find a word on a website and get its page link
- Capture AJAX response with selenium and python