From 245a01d64ac63c52deab04abc1ed0aea53ae5ead Mon Sep 17 00:00:00 2001 From: "shariar@raenabeauty.com" Date: Mon, 5 Feb 2024 14:57:57 +0400 Subject: [PATCH] FB Marketplace crawler --- fb_marketplace/fb_marketplace_product_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fb_marketplace/fb_marketplace_product_info.py b/fb_marketplace/fb_marketplace_product_info.py index 65cdeea..8429164 100644 --- a/fb_marketplace/fb_marketplace_product_info.py +++ b/fb_marketplace/fb_marketplace_product_info.py @@ -50,9 +50,12 @@ class FbMarketplaceProductInfo: results = self.cur.fetchall() + logging.info("Total rows: {}".format(len(results))) + + cnt = 1 for result in results: try: - logging.info("============== Collecting data for {} ==============".format(result[0])) + logging.info("============== {}/{}: Collecting data for {} ==============".format(str(cnt),str(len(results)),result[0])) self.getProductInfo(result) sql = f""" update {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')} set flag=1 where name='{result[0]}' and price={result[1]} and url='{result[2]}'