From 277dc9e1c171b14a4bd747e86489500a71db785d Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 7 Jun 2022 16:43:57 +0200 Subject: [PATCH] Improve error message when filter not found in page result (#666) --- changedetectionio/update_worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index e110ef8c..6e9fab0d 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -56,7 +56,10 @@ class update_worker(threading.Thread): except content_fetcher.ReplyWithContentButNoText as e: # Totally fine, it's by choice - just continue on, nothing more to care about # Page had elements/content but no renderable text - self.datastore.update_watch(uuid=uuid, update_obj={'last_error': "Got HTML content but no text found."}) + if self.datastore.data['watching'][uuid].get('css_filter'): + self.datastore.update_watch(uuid=uuid, update_obj={'last_error': "Got HTML content but no text found (CSS / xPath Filter not found in page?)"}) + else: + self.datastore.update_watch(uuid=uuid, update_obj={'last_error': "Got HTML content but no text found."}) pass except content_fetcher.EmptyReply as e: # Some kind of custom to-str handler in the exception handler that does this?