From 65e49049f68ebc21f2351c7fd0f570f9514a0c18 Mon Sep 17 00:00:00 2001 From: "shariar@raenabeauty.com" Date: Mon, 5 Feb 2024 14:52:23 +0400 Subject: [PATCH] FB Marketplace crawler --- fb_marketplace/fb_db_writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fb_marketplace/fb_db_writer.py b/fb_marketplace/fb_db_writer.py index 0f80643..187fca5 100755 --- a/fb_marketplace/fb_db_writer.py +++ b/fb_marketplace/fb_db_writer.py @@ -96,7 +96,7 @@ class fb_db_writer: update {self.config.get('crawler_schema')}.{self.config.get('product_tab')} set rce_source_id={data['rce_source_id']}, product_page_url='{data['product_page_url']}', product_page_url_hash='{data['product_page_url_hash']}',rce_category_id={data['rce_category_id']},rce_store_id={data['rce_store_id']},rce_source_product_name='{data['rce_source_product_name']}', product_images='{data['product_images']}',product_description='{data['product_description']}',product_price_min={data['product_price_min']},product_price_max={data['product_price_max']}, - ships_from='{data['ships_from']}' where product_page_url_hash='{data['product_page_url_hash']}' + ships_from='{data['ships_from']}', updatedat=GETDATE() where product_page_url_hash='{data['product_page_url_hash']}' """ logging.info(sql) self.cur.execute(sql) @@ -216,7 +216,7 @@ class fb_db_writer: sql = f""" update {self.config.get('crawler_schema')}.{self.config.get('reseller_store_tab')} set rce_source_id = {data['rce_source_id']}, store_page_url = '{data['store_page_url']}', store_page_url_hash = '{data['store_page_url_hash']}', store_location = '{data['store_location']}', - rce_reseller_id = {data['rce_reseller_id']}, updatedat=GETDATE() + rce_reseller_id = {data['rce_reseller_id']}, updatedat=GETDATE() where store_page_url_hash = '{data['store_page_url_hash']}' """ logging.info(sql) self.cur.execute(sql)