FB Marketplace crawler
This commit is contained in:
parent
9e195d40ed
commit
70ded552b7
|
@ -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 limit 1
|
SELECT * FROM {table} where flag=1 limit 1
|
||||||
"""
|
"""
|
||||||
print("SQL is: {}".format(sql))
|
print("SQL is: {}".format(sql))
|
||||||
self.cur.execute(sql)
|
self.cur.execute(sql)
|
||||||
|
@ -84,6 +84,10 @@ class FbMarketplaceProductInfo:
|
||||||
seller_link = ""
|
seller_link = ""
|
||||||
|
|
||||||
|
|
||||||
|
if name == "" or name is None:
|
||||||
|
name = self.driver.find_element(By.XPATH,'/html/body/div[1]/div/div[1]/div/div[3]/div/div/div[1]/div[1]/div[2]/div/div/div/div/div/div[1]/div[2]/div/div[2]/div/div[1]/div[1]/div[1]/div[1]/h1/span').text
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
images_ele = self.driver.find_element(By.CSS_SELECTOR, ".x1a0syf3.x1ja2u2z").find_elements(By.TAG_NAME, "img")
|
images_ele = self.driver.find_element(By.CSS_SELECTOR, ".x1a0syf3.x1ja2u2z").find_elements(By.TAG_NAME, "img")
|
||||||
|
|
Loading…
Reference in New Issue