From 41856c4ed8b29fe60a965ba489bc6d8bc80a1ea6 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 1 Feb 2023 20:50:40 +0100 Subject: [PATCH] Re #1365 - Playwright - Browser "Service Workers" should be enabled by default but unset via env var PLAYWRIGHT_SERVICE_WORKERS=block (#1367) --- changedetectionio/content_fetcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changedetectionio/content_fetcher.py b/changedetectionio/content_fetcher.py index e0ecf1bd..475e90c5 100644 --- a/changedetectionio/content_fetcher.py +++ b/changedetectionio/content_fetcher.py @@ -297,8 +297,8 @@ class base_html_playwright(Fetcher): proxy=self.proxy, # This is needed to enable JavaScript execution on GitHub and others bypass_csp=True, - # Can't think why we need the service workers for our use case? - service_workers='block', + # Should be `allow` or `block` - sites like YouTube can transmit large amounts of data via Service Workers + service_workers=os.getenv('PLAYWRIGHT_SERVICE_WORKERS', 'allow'), # Should never be needed accept_downloads=False )