from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option(
'prefs',
{
'profile.managed_default_content_settings.javascript': 2,
'profile.managed_default_content_settings.images': 2,
'profile.managed_default_content_settings.mixed_script': 2,
'profile.managed_default_content_settings.media_stream': 2,
'profile.managed_default_content_settings.stylesheets':2
}
)
driver = webdriver.Chrome(options=options)