From f255165571c3e360e039db18a864fc00de2c23e4 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 7 Oct 2024 16:01:55 +0200 Subject: [PATCH] Code - Small improvements in logging --- changedetectionio/processors/restock_diff/processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/processors/restock_diff/processor.py b/changedetectionio/processors/restock_diff/processor.py index eaa48cc5..8a87aab2 100644 --- a/changedetectionio/processors/restock_diff/processor.py +++ b/changedetectionio/processors/restock_diff/processor.py @@ -229,12 +229,13 @@ class perform_site_check(difference_detection_processor): xpath_data=self.fetcher.xpath_data ) + logger.debug(f"self.fetcher.instock_data is - '{self.fetcher.instock_data}' and itemprop_availability.get('availability') is {itemprop_availability.get('availability')}") # Nothing automatic in microdata found, revert to scraping the page if self.fetcher.instock_data and itemprop_availability.get('availability') is None: # 'Possibly in stock' comes from stock-not-in-stock.js when no string found above the fold. # Careful! this does not really come from chrome/js when the watch is set to plaintext update_obj['restock']["in_stock"] = True if self.fetcher.instock_data == 'Possibly in stock' else False - logger.debug(f"Watch UUID {watch.get('uuid')} restock check returned '{self.fetcher.instock_data}' from JS scraper.") + logger.debug(f"Watch UUID {watch.get('uuid')} restock check returned instock_data - '{self.fetcher.instock_data}' from JS scraper.") # What we store in the snapshot price = update_obj.get('restock').get('price') if update_obj.get('restock').get('price') else ""