From d82e3afb49c9e4a16034c070295f234b3c3f0d1c Mon Sep 17 00:00:00 2001 From: "shariar@raenabeauty.com" Date: Thu, 1 Feb 2024 13:26:51 +0400 Subject: [PATCH] FB Marketplace crawler --- fb_marketplace/fb_marketplace_products.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fb_marketplace/fb_marketplace_products.py b/fb_marketplace/fb_marketplace_products.py index 86623d5..a9c29a1 100644 --- a/fb_marketplace/fb_marketplace_products.py +++ b/fb_marketplace/fb_marketplace_products.py @@ -97,6 +97,8 @@ class FbMarketplaceProducts: df['Price'] = df['Price'].replace('Free', '0') df['Price'] = df['Price'].str.replace('₫', '') df['Price'] = df['Price'].str.replace(',', '') + df['Price'] = pd.to_numeric(df['Price'], errors='coerce') + df['Price'] = df['Price'].fillna(0) filename = 'facebook_crawler_tracker' + str(datetime.now().strftime('%Y%m%d%H%M%S')) + ".csv"