Restock detection - Check all elements for text to get stock status from, only consider elements inside the viewport, only consider elements more than 100px from the top (avoid menu) , trim any text returned (#2040)

This commit is contained in:
dgtlmoon
2024-01-12 23:11:56 +01:00
committed by GitHub
parent 65428655b8
commit 1749c07750
2 changed files with 123 additions and 109 deletions

View File

@@ -61,4 +61,4 @@ class perform_site_check(difference_detection_processor):
# Always record the new checksum
update_obj["previous_md5"] = fetched_md5
return changed_detected, update_obj, self.fetcher.instock_data.encode('utf-8')
return changed_detected, update_obj, self.fetcher.instock_data.encode('utf-8').strip()