From 5d1e79452ba6214f8126e213a72f9ef94c6ffa8e Mon Sep 17 00:00:00 2001 From: "shariar@raenabeauty.com" Date: Thu, 1 Feb 2024 10:57:02 +0400 Subject: [PATCH] FB Marketplace crawler --- fb_marketplace/fb_marketplace_product_info.py | 4 ++-- fb_marketplace/fb_marketplace_products.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fb_marketplace/fb_marketplace_product_info.py b/fb_marketplace/fb_marketplace_product_info.py index 7ff3895..45cb3e9 100644 --- a/fb_marketplace/fb_marketplace_product_info.py +++ b/fb_marketplace/fb_marketplace_product_info.py @@ -22,9 +22,9 @@ class FbMarketplaceProductInfo: self.cur = self.conn.cursor() op = ChromeOptions() - op.add_argument('--user-data-dir=/Users/simtiaz/chrome_cache/fb_marketplace') + op.add_argument('--user-data-dir=/home/ec2-user/fb-crawler-binary/chrome/fb_marketplace') self.version_main = 120 - self.driver = Chrome(options=op, version_main=120) + self.driver = Chrome(options=op, version_main=self.version_main) #time.sleep(3000) self.cur.execute("select id from " + self.config.get('crawler_schema') + "." + self.config.get( diff --git a/fb_marketplace/fb_marketplace_products.py b/fb_marketplace/fb_marketplace_products.py index 9a744bb..353fe26 100644 --- a/fb_marketplace/fb_marketplace_products.py +++ b/fb_marketplace/fb_marketplace_products.py @@ -25,14 +25,14 @@ class FbMarketplaceProducts: self.cur = self.conn.cursor() op = ChromeOptions() - op.add_argument('--user-data-dir=/Users/simtiaz/chrome_cache/fb_marketplace') + op.add_argument('--user-data-dir=/home/ec2-user/fb-crawler-binary/chrome/fb_marketplace') ###### S3 bucket information self.S3_KEY = "AKIAR2YL57QCWO34OE4J" self.S3_SECRET = "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" self.S3_BUCKET = "s3://raena-prod-data-engineering/mongo_order/" self.version_main = 120 - self.driver = Chrome(options=op, version_main=120) + self.driver = Chrome(options=op, version_main=self.version_main) def __del__(self): self.driver.quit()