diff --git a/changedetectionio/flask_app.py b/changedetectionio/flask_app.py index f603e012..a88df476 100644 --- a/changedetectionio/flask_app.py +++ b/changedetectionio/flask_app.py @@ -875,14 +875,14 @@ def changedetection_app(config=None, datastore_o=None): system_uses_webdriver = datastore.data['settings']['application']['fetch_backend'] == 'html_webdriver' - is_html_webdriver = False + watch_uses_webdriver = False if (watch.get('fetch_backend') == 'system' and system_uses_webdriver) or watch.get('fetch_backend') == 'html_webdriver' or watch.get('fetch_backend', '').startswith('extra_browser_'): - is_html_webdriver = True + watch_uses_webdriver = True from zoneinfo import available_timezones # Only works reliably with Playwright - visualselector_enabled = os.getenv('PLAYWRIGHT_DRIVER_URL', False) and is_html_webdriver + template_args = { 'available_processors': processors.available_processors(), 'available_timezones': sorted(available_timezones()), @@ -895,14 +895,13 @@ def changedetection_app(config=None, datastore_o=None): 'has_default_notification_urls': True if len(datastore.data['settings']['application']['notification_urls']) else False, 'has_extra_headers_file': len(datastore.get_all_headers_in_textfile_for_watch(uuid=uuid)) > 0, 'has_special_tag_options': _watch_has_tag_options_set(watch=watch), - 'is_html_webdriver': is_html_webdriver, + 'watch_uses_webdriver': watch_uses_webdriver, 'jq_support': jq_support, 'playwright_enabled': os.getenv('PLAYWRIGHT_DRIVER_URL', False), 'settings_application': datastore.data['settings']['application'], 'timezone_default_config': datastore.data['settings']['application'].get('timezone'), 'using_global_webdriver_wait': not default['webdriver_delay'], 'uuid': uuid, - 'visualselector_enabled': visualselector_enabled, 'watch': watch } diff --git a/changedetectionio/templates/_helpers.html b/changedetectionio/templates/_helpers.html index 85fb5969..8dd16ff3 100644 --- a/changedetectionio/templates/_helpers.html +++ b/changedetectionio/templates/_helpers.html @@ -61,6 +61,18 @@ {{ field(**kwargs)|safe }} {% endmacro %} +{% macro playwright_warning() %} +
Error - Playwright support for Chrome based fetching is not enabled. Alternatively try our very affordable subscription based service which has all this setup for you.
+You may need to Enable playwright environment variable and uncomment the sockpuppetbrowser in the docker-compose.yml file.
+(Also Selenium/WebDriver can not extract full page screenshots reliably so Playwright is recommended here)
+ +{% endmacro %} + +{% macro only_webdriver_type_watches_warning() %} +Sorry, this functionality only works with Playwright/Chrome enabled watches.
You need to Set the fetch method to Playwright/Chrome mode and resave and have the Playwright connection enabled.