summaryrefslogtreecommitdiff
path: root/wfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'wfs.py')
-rwxr-xr-xwfs.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/wfs.py b/wfs.py
index 7df6e90..48c033b 100755
--- a/wfs.py
+++ b/wfs.py
@@ -100,11 +100,16 @@ def start_wworker(driver_name):
if driver_name == 'chrome':
chrome_options = webdriver.chrome.options.Options()
chrome_options.headless = True
+ chrome_options.experimental_options["prefs"] = {
+ "profile.default_content_setting_values.images": 2
+ }
DRIVER = webdriver.Chrome(options=chrome_options, desired_capabilities={'detach': True})
elif driver_name == 'firefox':
+ firefox_profile = webdriver.FirefoxProfile()
+ firefox_profile.set_preference('permissions.default.image', 2)
firefox_options = webdriver.firefox.options.Options()
firefox_options.headless = True
- DRIVER = webdriver.Firefox(options=firefox_options)
+ DRIVER = webdriver.Firefox(firefox_profile=firefox_profile, options=firefox_options)
else:
raise Exception('unknown driver name')
Finalize(DRIVER, stop_driver, exitpriority=16)