1

In a crawling project, the Shockwave Flash plugin keeps crashing. Is there a simple way to disable it to begin with?

Many thanks in advance!

splinter
  • 3,727
  • 8
  • 37
  • 82
  • Yes: uninstall it. – SiKing Jun 16 '16 at 21:39
  • Thanks, but in Chrome you cannot uninstall it, you can only disable it. However, when using selenium in the new window it is enabled again. I am looking for a command to disable it. – splinter Jun 16 '16 at 23:15
  • 1
    does this help? http://stackoverflow.com/questions/16406719/how-to-disable-flash-in-firefox-with-selenium-in-python, it is not an exact match, it is about disable plugin using selenium and python. – Yu Zhang Jun 17 '16 at 04:42

1 Answers1

1

This worked for me pretty well.

from selenium.webdriver.chrome.options import Options

options= webdriver.ChromeOptions()
profile = {"plugins.plugins_disabled": ["Shockwave Flash"]}
options.add_experimental_option("prefs", profile)

# Make sure to add chrome_options=options 
browser = webdriver.Chrome(executable_path=path,chrome_options = options)
Prune
  • 76,765
  • 14
  • 60
  • 81
Ibrahim
  • 138
  • 2
  • 8