Last active
October 8, 2020 09:19
-
-
Save UZziell/ffcff3f14df9bf3df9ad16b7912770de to your computer and use it in GitHub Desktop.
Allow certain urls to run flash using chromedriver and selenium
This file contains 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
# Tested on Chrome Version 86.0.4240.75 (Official Build) (64-bit) | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
options = Options() | |
prefs = { | |
"profile.default_content_setting_values.plugins": 1, | |
"profile.managed_plugins_allowed_for_urls": ["https://example.com", "https://www.whatismybrowser.com:443"], | |
"plugins.run_all_flash_in_allow_mode": True, | |
} | |
options.add_experimental_option("prefs", prefs) | |
browser = webdriver.Chrome(options=options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment