Home > OS >  I disabled loading images in chrome while using webdriver with selenium now cant enable it
I disabled loading images in chrome while using webdriver with selenium now cant enable it

Time:05-22

I disabled loading images in chrome while using webdriver with selenium now cant enable it.

I was using python to webscrape on instagram so thought it would be a good idea to disable images.

The commands i used:

options = webdriver.ChromeOptions()
options.add_argument("--disable-gpu=true")
options.add_argument("--blink-settings=imagesEnabled=false")

And now I cannot change it from chrome settings.

Screenshot of chrome settings page.

Please Help.

Edit: This happens only in my default Chrome Profile. Other Profiles work fine even though the profile I use for selenium is a different one.

CodePudding user response:

After a long day on google finally found the solution.

options.add_experimental_option("prefs", {'profile.managed_default_content_settings.images': 1})
  • Related