FB Marketplace crawler
This commit is contained in:
parent
e24550614f
commit
cccd42ae70
|
@ -24,12 +24,12 @@ config = {
|
||||||
}
|
}
|
||||||
|
|
||||||
def run_pipeline ():
|
def run_pipeline ():
|
||||||
marketplace_products = FbMarketplaceProducts(config=config)
|
#marketplace_products = FbMarketplaceProducts(config=config)
|
||||||
marketplace_products.getProducts()
|
#marketplace_products.getProducts()
|
||||||
|
|
||||||
url = "https://www.facebook.com/marketplace/item/266638329606593?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656048044644247513%22%2C%22mf_story_key%22%3A%2224843562218625057%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24843562218625057%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A43%2C%5C%22ranking_signature%5C%22%3A6122896018789849685%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A0.00044445870408613%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224843562218625057%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D"
|
url = "https://www.facebook.com/marketplace/item/266638329606593?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656048044644247513%22%2C%22mf_story_key%22%3A%2224843562218625057%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24843562218625057%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A43%2C%5C%22ranking_signature%5C%22%3A6122896018789849685%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A0.00044445870408613%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224843562218625057%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D"
|
||||||
#product_info = FbMarketplaceProductInfo(config)
|
product_info = FbMarketplaceProductInfo(config)
|
||||||
#product_info.run_product_pipeline()
|
product_info.run_product_pipeline()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ class FbMarketplaceProductInfo:
|
||||||
table = f"""{self.config.get('crawler_schema')}.{self.config.get('tracker_tab')}"""
|
table = f"""{self.config.get('crawler_schema')}.{self.config.get('tracker_tab')}"""
|
||||||
|
|
||||||
sql = f"""
|
sql = f"""
|
||||||
SELECT * FROM {table} where flag=0
|
SELECT * FROM {table} where flag=0 limit 1
|
||||||
"""
|
"""
|
||||||
print("SQL is: {}".format(sql))
|
print("SQL is: {}".format(sql))
|
||||||
self.cur.execute(sql)
|
self.cur.execute(sql)
|
||||||
|
|
Loading…
Reference in New Issue