Code - Small improvements in logging

better-40x-message
dgtlmoon 3 months ago
parent 7ff34baa90
commit f255165571

@ -229,12 +229,13 @@ class perform_site_check(difference_detection_processor):
xpath_data=self.fetcher.xpath_data 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 # Nothing automatic in microdata found, revert to scraping the page
if self.fetcher.instock_data and itemprop_availability.get('availability') is None: 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. # '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 # 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 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 # What we store in the snapshot
price = update_obj.get('restock').get('price') if update_obj.get('restock').get('price') else "" price = update_obj.get('restock').get('price') if update_obj.get('restock').get('price') else ""

Loading…
Cancel
Save