from selenium.webdriver.chrome.options import Options
options = Options()
prefs = {
'profile.default_content_setting_values': {
'images': 2,
'permissions.default.stylesheet': 2,
'javascript': 2
}
}
options.add_experimental_option('prefs', prefs)
browser = Chrome(executable_path=driver_path, options=options)