From 69513c47cdf526a814661d2a0abce25959b0a1c0 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 9 Dec 2023 13:17:57 +0100 Subject: [PATCH] Offer more helpful text --- changedetectionio/templates/watch-overview.html | 2 +- changedetectionio/update_worker.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 9b3e9b64..f6643df5 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -141,7 +141,7 @@ {% if watch['processor'] == 'restock_diff' %} - {% if watch['last_checked'] %} + {% if watch['last_checked'] and watch['in_stock'] != None %} {% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %} {% else %} Not yet checked diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index c5ab7de9..5f3dbe3c 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -403,7 +403,11 @@ class update_worker(threading.Thread): except UnableToExtractRestockData as e: # Usually when fetcher.instock_data returns empty self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e)) - self.datastore.update_watch(uuid=uuid, update_obj={'last_error': f"Unable to extract restock data for this page unfortunately. (Got code {e.status_code} from server)"}) + self.datastore.update_watch(uuid=uuid, + update_obj={ + 'last_error': f"Unable to extract restock data for this page unfortunately. (Got code {e.status_code} from server), no embedded stock information was found and nothing interesting in the text, try using this watch with Chrome.", + } + ) process_changedetection_results = False except Exception as e: self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e))