Compare commits
71 Commits
master
...
hasaki_cra
Author | SHA1 | Date |
---|---|---|
Shariar Imtiaz | 7d201a7107 | |
Shariar Imtiaz | 0a02c377ab | |
Shariar Imtiaz | d6ff741951 | |
Shariar Imtiaz | f46771b287 | |
Shariar Imtiaz | 3d87935aa2 | |
Shariar Imtiaz | d54cfcd992 | |
Shariar Imtiaz | c8c3460709 | |
Shariar Imtiaz | b9e4ac73f6 | |
Shariar Imtiaz | 8237577385 | |
Shariar Imtiaz | e98ad29800 | |
Shariar Imtiaz | 7c6f41d3f8 | |
Shariar Imtiaz | 085cd08947 | |
Shariar Imtiaz | 1e7dcaa894 | |
Shariar Imtiaz | 82a3d9d9b8 | |
Shariar Imtiaz | 6ed8a649ae | |
Shariar Imtiaz | 959fd9a03e | |
Shariar Imtiaz | d239129739 | |
Shariar Imtiaz | 54d49ea78f | |
Shariar Imtiaz | dd2e6e82de | |
Shariar Imtiaz | 6753bbc2f3 | |
Shariar Imtiaz | f8db895e10 | |
Shariar Imtiaz | 291f094cfc | |
Shariar Imtiaz | b6bd5ca74b | |
Shariar Imtiaz | 64bfc00c1e | |
Shariar Imtiaz | 4d19d63aef | |
Shariar Imtiaz | 4ec62a41ed | |
Shariar Imtiaz | 6d84e37c27 | |
Shariar Imtiaz | 295ac41305 | |
Shariar Imtiaz | 5ba6894313 | |
Shariar Imtiaz | 8be3e9b9f4 | |
Shariar Imtiaz | b134f50f1e | |
Shariar Imtiaz | 1f96972b6d | |
Shariar Imtiaz | 67df30ff1d | |
Shariar Imtiaz | 28f584f829 | |
Shariar Imtiaz | 8ee5ccd632 | |
Shariar Imtiaz | 71f946c29e | |
Shariar Imtiaz | fe52f64d4b | |
Shariar Imtiaz | ed49c2e464 | |
Shariar Imtiaz | 30732aa065 | |
Shariar Imtiaz | c10998abbc | |
Shariar Imtiaz | 1fa170d8a7 | |
Shariar Imtiaz | 0fa1dc963d | |
Shariar Imtiaz | 6be8368482 | |
Shariar Imtiaz | a1290c8772 | |
Shariar Imtiaz | 1306933483 | |
Shariar Imtiaz | 7a45367975 | |
Shariar Imtiaz | d0344122e2 | |
Shariar Imtiaz | 45e6965679 | |
Shariar Imtiaz | e2568e7979 | |
Shariar Imtiaz | ab312868e2 | |
Shariar Imtiaz | 66b95374d9 | |
Shariar Imtiaz | 17ee218d3f | |
Shariar Imtiaz | 245a01d64a | |
Shariar Imtiaz | 7e46c28355 | |
Shariar Imtiaz | 65e49049f6 | |
Shariar Imtiaz | 70ded552b7 | |
Shariar Imtiaz | 9e195d40ed | |
Shariar Imtiaz | e4b1f8c269 | |
Shariar Imtiaz | aaf84022e6 | |
Shariar Imtiaz | cccd42ae70 | |
Shariar Imtiaz | e24550614f | |
Shariar Imtiaz | 5c341453ac | |
Shariar Imtiaz | 2b0800dd46 | |
Shariar Imtiaz | d82e3afb49 | |
Shariar Imtiaz | 9e60352a9f | |
Shariar Imtiaz | 8723a732cb | |
Shariar Imtiaz | ff9a059a35 | |
Shariar Imtiaz | 9940025b2b | |
Shariar Imtiaz | 5d1e79452b | |
Shariar Imtiaz | 309bc78606 | |
Shariar Imtiaz | 4b1841ba18 |
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="ProdRedshift" uuid="e343ac8d-80ff-44dc-8d8d-5d18fc755a70">
|
||||
<driver-ref>redshift</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.amazon.redshift.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:redshift://redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com:5439/analytics</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,62 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<value>
|
||||
<list size="49">
|
||||
<item index="0" class="java.lang.String" itemvalue="httpx" />
|
||||
<item index="1" class="java.lang.String" itemvalue="protobuf" />
|
||||
<item index="2" class="java.lang.String" itemvalue="PyDrive" />
|
||||
<item index="3" class="java.lang.String" itemvalue="googleapis-common-protos" />
|
||||
<item index="4" class="java.lang.String" itemvalue="psycopg2-binary" />
|
||||
<item index="5" class="java.lang.String" itemvalue="python-dotenv" />
|
||||
<item index="6" class="java.lang.String" itemvalue="marshmallow" />
|
||||
<item index="7" class="java.lang.String" itemvalue="rfc3986" />
|
||||
<item index="8" class="java.lang.String" itemvalue="certifi" />
|
||||
<item index="9" class="java.lang.String" itemvalue="awswrangler" />
|
||||
<item index="10" class="java.lang.String" itemvalue="graphviz" />
|
||||
<item index="11" class="java.lang.String" itemvalue="Markdown" />
|
||||
<item index="12" class="java.lang.String" itemvalue="google-api-core" />
|
||||
<item index="13" class="java.lang.String" itemvalue="dnspython" />
|
||||
<item index="14" class="java.lang.String" itemvalue="gspread" />
|
||||
<item index="15" class="java.lang.String" itemvalue="cryptography" />
|
||||
<item index="16" class="java.lang.String" itemvalue="openapi-spec-validator" />
|
||||
<item index="17" class="java.lang.String" itemvalue="charset-normalizer" />
|
||||
<item index="18" class="java.lang.String" itemvalue="pika" />
|
||||
<item index="19" class="java.lang.String" itemvalue="Mako" />
|
||||
<item index="20" class="java.lang.String" itemvalue="httpcore" />
|
||||
<item index="21" class="java.lang.String" itemvalue="oauth2client" />
|
||||
<item index="22" class="java.lang.String" itemvalue="PyJWT" />
|
||||
<item index="23" class="java.lang.String" itemvalue="rsa" />
|
||||
<item index="24" class="java.lang.String" itemvalue="alembic" />
|
||||
<item index="25" class="java.lang.String" itemvalue="SQLAlchemy" />
|
||||
<item index="26" class="java.lang.String" itemvalue="httplib2" />
|
||||
<item index="27" class="java.lang.String" itemvalue="connexion" />
|
||||
<item index="28" class="java.lang.String" itemvalue="numpy" />
|
||||
<item index="29" class="java.lang.String" itemvalue="importlib-metadata" />
|
||||
<item index="30" class="java.lang.String" itemvalue="Jinja2" />
|
||||
<item index="31" class="java.lang.String" itemvalue="pyrsistent" />
|
||||
<item index="32" class="java.lang.String" itemvalue="requests-oauthlib" />
|
||||
<item index="33" class="java.lang.String" itemvalue="google-auth-httplib2" />
|
||||
<item index="34" class="java.lang.String" itemvalue="Flask-JWT-Extended" />
|
||||
<item index="35" class="java.lang.String" itemvalue="SQLAlchemy-Utils" />
|
||||
<item index="36" class="java.lang.String" itemvalue="uritemplate" />
|
||||
<item index="37" class="java.lang.String" itemvalue="cattrs" />
|
||||
<item index="38" class="java.lang.String" itemvalue="croniter" />
|
||||
<item index="39" class="java.lang.String" itemvalue="google-auth-oauthlib" />
|
||||
<item index="40" class="java.lang.String" itemvalue="openapi-schema-validator" />
|
||||
<item index="41" class="java.lang.String" itemvalue="rich" />
|
||||
<item index="42" class="java.lang.String" itemvalue="cachelib" />
|
||||
<item index="43" class="java.lang.String" itemvalue="dill" />
|
||||
<item index="44" class="java.lang.String" itemvalue="lazy-object-proxy" />
|
||||
<item index="45" class="java.lang.String" itemvalue="Flask-AppBuilder" />
|
||||
<item index="46" class="java.lang.String" itemvalue="cachetools" />
|
||||
<item index="47" class="java.lang.String" itemvalue="furl" />
|
||||
<item index="48" class="java.lang.String" itemvalue="google-api-python-client" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="raena-crawler-engine" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="raena-crawler-engine" project-jdk-type="Python SDK" />
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/raena-crawler-engine.iml" filepath="$PROJECT_DIR$/.idea/raena-crawler-engine.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="raena-crawler-engine" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/hasaki_crawler_engine/changes.sql" dialect="Redshift" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/fb_marketplace/Scroller" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -58,6 +58,7 @@ def send_mail():
|
|||
smtp.send_message(msg)
|
||||
except Exception as e:
|
||||
logging.info("Error while sending mail: {}".format(e))
|
||||
|
||||
def main():
|
||||
# start = datetime.now()
|
||||
# categories = amazon_categories(config)
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
import hashlib
|
||||
import logging
|
||||
import sys
|
||||
import string
|
||||
import undetected_chromedriver as webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.chrome.service import Service
|
||||
import psycopg2
|
||||
import bs4
|
||||
from webdriver_manager.chrome import ChromeDriverManager
|
||||
import random
|
||||
from bs4 import BeautifulSoup
|
||||
import json
|
||||
import time
|
||||
import gzip
|
||||
import re
|
||||
import random
|
||||
from amazon_db_writer import amazon_db_writer
|
||||
|
||||
import ssl
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
|
||||
|
||||
def reseller_info(store_url):
|
||||
|
||||
op = webdriver.ChromeOptions()
|
||||
op.add_argument('--no-sandbox')
|
||||
op.add_argument('--disable-notifications')
|
||||
op.add_argument("--lang=en-GB")
|
||||
#op.headless = True
|
||||
driver=webdriver.Chrome( options=op)
|
||||
|
||||
driver.get(store_url)
|
||||
|
||||
driver.implicitly_wait(5)
|
||||
|
||||
try:
|
||||
driver.get(store_url)
|
||||
driver.implicitly_wait(5)
|
||||
|
||||
##### reseller info
|
||||
|
||||
avg_rating = driver.find_element(By.CSS_SELECTOR,'#effective-timeperiod-rating-year-description.ratings-reviews').text
|
||||
|
||||
print(avg_rating)
|
||||
|
||||
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
config = {
|
||||
"crawler_name": "raena_crawler_enginer_amazon",
|
||||
"crawler_schema": "raena_spider_management",
|
||||
"category_tab": "rce_category",
|
||||
"tracker_tab": "crawler_tracker",
|
||||
"product_tab": "rce_product",
|
||||
"variant_tab": "rce_product_variant",
|
||||
"brand_tab": "rce_brand",
|
||||
"reseller_tab": "rce_reseller",
|
||||
"reseller_store_tab": "rce_reseller_store",
|
||||
"review_tab": "rce_ratings_reviews",
|
||||
"review_productmodels_tab": "rce_ratings_reviews_productmodels",
|
||||
"review_producttags_tab": "rce_ratings_reviews_producttags",
|
||||
"review_tags": "rce_tags",
|
||||
"source_tab": "rce_source",
|
||||
"product_per_category": "1000",
|
||||
"source_category": "11043145",
|
||||
"db_user": "postgres",
|
||||
"db_pass": "postgres",
|
||||
"database": "postgres",
|
||||
"db_host": "localhost",
|
||||
"db_port": "5444",
|
||||
"crawler_main": "1",
|
||||
"crawler_slave_no": ""
|
||||
}
|
||||
conn = psycopg2.connect(database=config.get('database'), user=config.get('db_user'), password=config.get('db_pass'), host=config.get('db_host'), port=config.get('db_port'))
|
||||
conn.autocommit = True
|
||||
cur = conn.cursor()
|
||||
db_writer = amazon_db_writer(config)
|
||||
|
||||
|
||||
reseller_info('https://www.amazon.ae/sp?ie=UTF8&seller=A3TFGX22P341AN&isAmazonFulfilled=0&asin=B09BR31PF9&ref_=olp_merch_name_1')
|
|
@ -0,0 +1,267 @@
|
|||
import logging
|
||||
import psycopg2
|
||||
|
||||
###### Looger ######
|
||||
format = "%(asctime)s: %(message)s"
|
||||
logging.basicConfig(format=format, level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S")
|
||||
|
||||
class fb_db_writer:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'), password=self.config.get('db_pass'), host=self.config.get('db_host'), port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
|
||||
def __del__(self):
|
||||
logging.info("Closing connection.....")
|
||||
self.conn.close()
|
||||
|
||||
|
||||
def get_id(self, schema, table):
|
||||
sql = f"""
|
||||
select max(id) from {schema}.{table}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
if res[0]!=None:
|
||||
id = res[0]+1
|
||||
else:
|
||||
id = 1
|
||||
|
||||
return id
|
||||
|
||||
def get_aud_id(self, schema, table):
|
||||
sql = f"""
|
||||
select max(auditid) from {schema}.{table}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
if res[0]!=None:
|
||||
id = res[0]+1
|
||||
else:
|
||||
id = 1
|
||||
|
||||
return id
|
||||
|
||||
def rce_product(self, data):
|
||||
|
||||
sql = ("select rce_source_id,product_page_url,product_page_url_hash,rce_category_id,rce_store_id,rce_source_product_name,product_images,"
|
||||
"product_description,product_price_min,product_price_max,ships_from from ")+self.config.get('crawler_schema')+"."+self.config.get('product_tab')+(" "
|
||||
"where product_page_url_hash = '")+str(data['product_page_url_hash'])+"'"
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('product_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_"+self.config.get('product_tab'))
|
||||
|
||||
if not res:
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('product_tab')}(id,rce_source_id,product_page_url,product_page_url_hash,rce_category_id,rce_store_id,rce_source_product_name,product_images,product_description,product_price_min,product_price_max,ships_from)
|
||||
values({id_main},{data['rce_source_id']},'{data['product_page_url']}','{data['product_page_url_hash']}',{data['rce_category_id']},{data['rce_store_id']},
|
||||
'{data['rce_source_product_name']}','{data['product_images']}','{data['product_description']}',{data['product_price_min']},
|
||||
{data['product_price_max']},'{data['ships_from']}')
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('product_tab')}(auditid,id,rce_source_id,product_page_url,product_page_url_hash,
|
||||
rce_category_id,rce_store_id,rce_source_product_name,product_images,product_description,product_price_min,product_price_max,ships_from,createdat,updatedat)
|
||||
select {id_aud},id,rce_source_id,product_page_url,product_page_url_hash,rce_category_id,rce_store_id,rce_source_product_name,product_images,
|
||||
product_description,product_price_min,product_price_max,ships_from,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('product_tab')}
|
||||
where product_page_url_hash = '{data['product_page_url_hash']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
if (data['rce_source_id']==res[0] and data['product_page_url']==res[1] and data['product_page_url_hash']==res[2]
|
||||
and data['rce_category_id']==res[3] and data['rce_store_id']==res[4] and data['rce_source_product_name']==res[5]
|
||||
and data['product_images']==res[6] and data['product_description']==res[7] and str(data['product_price_min'])==res[8]
|
||||
and str(data['product_price_max']==res[9]) and data['ships_from']==res[10]):
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('product_tab')+" set updatedat=GETDATE() " \
|
||||
"where product_page_url_hash = '"+ str(data['product_page_url_hash'])+"'"
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('product_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('product_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
sql = f"""
|
||||
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']}', updatedat=GETDATE() where product_page_url_hash='{data['product_page_url_hash']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('product_tab')}(auditid,id,rce_source_id,product_page_url,product_page_url_hash,
|
||||
rce_category_id,rce_store_id,rce_source_product_name,product_images,product_description,product_price_min,product_price_max,ships_from,createdat,updatedat)
|
||||
select {id_aud},id,rce_source_id,product_page_url,product_page_url_hash,rce_category_id,rce_store_id,rce_source_product_name,product_images,
|
||||
product_description,product_price_min,product_price_max,ships_from,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('product_tab')}
|
||||
where product_page_url_hash = '{data['product_page_url_hash']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_reseller(self, data):
|
||||
|
||||
sql = "select rce_source_id,reseller_name from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" where reseller_name = '"+str(data['reseller_name'])+"'"
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('reseller_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_"+self.config.get('reseller_tab'))
|
||||
|
||||
|
||||
if not res:
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('reseller_tab')}(id, rce_source_id,reseller_name)
|
||||
values({id_main}, {data['rce_source_id']},'{data['reseller_name']}')
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('reseller_tab')}(auditid, id, rce_source_id, reseller_name, createdat, updatedat)
|
||||
select {id_aud}, id, rce_source_id, reseller_name, createdat, updatedat from {self.config.get('crawler_schema')}.{self.config.get('reseller_tab')}
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if data['rce_source_id']==res[0] and data['reseller_name']==res[1]:
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" set updatedat=GETDATE() " \
|
||||
"where reseller_name = '"+ str(res[1])+"'"
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('reseller_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('reseller_tab')} set rce_source_id={data['rce_source_id']}, reseller_name='{data['reseller_name']}'
|
||||
updatedat=GETDATE() where reseller_name='{res[1]}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('reseller_tab')}(auditid,id,rce_source_id,reseller_name)
|
||||
select {id_aud},id, rce_source_id,reseller_name from {self.config.get('crawler_schema')}.{self.config.get('reseller_tab')}
|
||||
where reseller_name='{res[1]}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_reseller_store(self, data):
|
||||
|
||||
sql = "select rce_source_id,store_page_url,store_page_url_hash,store_location,rce_reseller_id from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" where store_page_url_hash = '"+str(data['store_page_url_hash'])+"'"
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('reseller_store_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_"+self.config.get('reseller_store_tab'))
|
||||
|
||||
if not res:
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('reseller_store_tab')}(id,rce_source_id,store_page_url,store_page_url_hash,store_location,rce_reseller_id)
|
||||
values({str(id_main)},{data['rce_source_id']},'{data['store_page_url']}','{data['store_page_url_hash']}','{data['store_location']}',{data['rce_reseller_id']})
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('reseller_store_tab')}(auditid,id,rce_source_id,store_page_url,store_page_url_hash,store_location,rce_reseller_id,createdat,updatedat)
|
||||
select {id_aud},id,rce_source_id,store_page_url,store_page_url_hash,store_location,rce_reseller_id,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('reseller_store_tab')}
|
||||
where store_page_url_hash = '{data['store_page_url_hash']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if (data['rce_source_id']==res[0] and data['store_page_url']==res[1] and
|
||||
data['store_page_url_hash']==res[2] and data['store_location']==res[3] and
|
||||
data['rce_reseller_id']==res[4]):
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" set updatedat=GETDATE() " \
|
||||
"where store_page_url_hash = '"+ str(res[2])+"'"
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('reseller_store_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
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() where store_page_url_hash = '{data['store_page_url_hash']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('reseller_store_tab')}(auditid,id,rce_source_id,store_page_url,store_page_url_hash,store_location,rce_reseller_id,createdat,updatedat)
|
||||
select {id_aud},id,rce_source_id,store_page_url,store_page_url_hash,store_location,rce_reseller_id,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('reseller_store_tab')}
|
||||
where store_page_url_hash = '{data['store_page_url_hash']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
|
||||
# config = {
|
||||
# "crawler_name": "raena_crawler_engine_shopee",
|
||||
# "crawler_schema": "raena_spider_management",
|
||||
# "category_tab": "test_rce_category",
|
||||
# "tracker_tab": "crawler_tracker",
|
||||
# "product_tab": "rce_product",
|
||||
# "variant_tab": "rce_product_variant",
|
||||
# "brand_tab": "rce_brand",
|
||||
# "reseller_tab": "rce_reseller",
|
||||
# "reseller_store_tab": "rce_reseller_store",
|
||||
# "review_tab": "rce_ratings_reviews",
|
||||
# "review_productmodels_tab": "rce_ratings_reviews_productmodels",
|
||||
# "review_producttags_tab": "rce_ratings_reviews_producttags",
|
||||
# "review_tags": "rce_tags",
|
||||
# "source_tab": "rce_source",
|
||||
# "product_per_category": "136",
|
||||
# "source_category": "11043145",
|
||||
# "db_user": "dbadmin",
|
||||
# "db_pass": "5qCif6eyY3Kmg4z",
|
||||
# "database": "analytics",
|
||||
# "db_host": "redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com",
|
||||
# "db_port": "5439",
|
||||
# "crawler_main": "1",
|
||||
# "crawler_slave_no": ""
|
||||
# }
|
||||
#
|
||||
# db_writer = shopee_db_writer(config)
|
||||
# id = db_writer.get_id(config.get("crawler_schema"), config.get("category_tab"))
|
||||
#
|
||||
# print(id)
|
||||
#
|
||||
# id = db_writer.get_id(config.get('crawler_schema'), "aud_"+config.get('category_tab'))
|
||||
#
|
||||
# print(id)
|
|
@ -0,0 +1,38 @@
|
|||
from fb_marketplace_products import FbMarketplaceProducts
|
||||
from fb_marketplace_product_info import FbMarketplaceProductInfo
|
||||
import logging
|
||||
|
||||
###### Looger ######
|
||||
format = "%(asctime)s: %(message)s"
|
||||
logging.basicConfig(format=format, level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S")
|
||||
|
||||
|
||||
config = {
|
||||
"crawler_name": "raena_crawler_engine_fb_marketplace",
|
||||
"crawler_schema": "raena_spider_management",
|
||||
"tracker_tab": "facebook_crawler_tracker",
|
||||
"category_tab": "rce_category",
|
||||
"product_tab": "rce_product",
|
||||
"reseller_tab": "rce_reseller",
|
||||
"reseller_store_tab": "rce_reseller_store",
|
||||
"source_tab": "rce_source",
|
||||
"db_user": "dbadmin",
|
||||
"db_pass": "5qCif6eyY3Kmg4z",
|
||||
"database": "analytics",
|
||||
"db_host": "redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com",
|
||||
"db_port": "5439"
|
||||
}
|
||||
|
||||
def run_pipeline ():
|
||||
#marketplace_products = FbMarketplaceProducts(config=config)
|
||||
#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"
|
||||
product_info = FbMarketplaceProductInfo(config)
|
||||
product_info.run_product_pipeline()
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_pipeline()
|
|
@ -0,0 +1,213 @@
|
|||
import hashlib
|
||||
import time
|
||||
from selenium.webdriver import Keys
|
||||
from selenium.webdriver.common.by import By
|
||||
from undetected_chromedriver import Chrome, ChromeOptions
|
||||
import random
|
||||
import psycopg2
|
||||
import logging
|
||||
from fb_db_writer import fb_db_writer
|
||||
|
||||
###### Looger ######
|
||||
format = "%(asctime)s: %(message)s"
|
||||
logging.basicConfig(format=format, level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S")
|
||||
|
||||
class FbMarketplaceProductInfo:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'),
|
||||
password=self.config.get('db_pass'), host=self.config.get('db_host'),
|
||||
port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
|
||||
op = ChromeOptions()
|
||||
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=self.version_main)
|
||||
#time.sleep(3000)
|
||||
|
||||
self.cur.execute("select id from " + self.config.get('crawler_schema') + "." + self.config.get(
|
||||
'source_tab') + " where source_name='fb_marketplace'")
|
||||
self.rce_source_id = self.cur.fetchone()[0]
|
||||
|
||||
self.db_writer = fb_db_writer(config)
|
||||
|
||||
def __del__(self):
|
||||
logging.info("Closing connection.....")
|
||||
self.conn.close()
|
||||
self.driver.close()
|
||||
|
||||
def run_product_pipeline(self):
|
||||
|
||||
table = f"""{self.config.get('crawler_schema')}.{self.config.get('tracker_tab')}"""
|
||||
|
||||
sql = f"""
|
||||
SELECT * FROM {table} where flag=0 and name<>''
|
||||
"""
|
||||
print("SQL is: {}".format(sql))
|
||||
self.cur.execute(sql)
|
||||
|
||||
results = self.cur.fetchall()
|
||||
|
||||
logging.info("Total rows: {}".format(len(results)))
|
||||
|
||||
cnt = 1
|
||||
for result in results:
|
||||
try:
|
||||
logging.info("============== {}/{}: Collecting data for {} ==============".format(str(cnt),str(len(results)),result[0]))
|
||||
self.getProductInfo(result)
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')} set flag=1 where url='{result[2]}'
|
||||
"""
|
||||
logging.info("SQL is: {}".format(sql))
|
||||
self.cur.execute(sql)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
time.sleep(random.randint(5,20))
|
||||
cnt += 1
|
||||
|
||||
|
||||
|
||||
def getProductInfo(self, data):
|
||||
|
||||
name = str(data[0]).replace("'","")
|
||||
price = data[1]
|
||||
url = data[2]
|
||||
city = data[3].replace(',','')
|
||||
|
||||
|
||||
self.driver.get(url)
|
||||
time.sleep(3)
|
||||
|
||||
images = []
|
||||
description = ""
|
||||
seller_name = ""
|
||||
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
|
||||
name = name.replace("'","")
|
||||
|
||||
|
||||
|
||||
try:
|
||||
images_ele = self.driver.find_element(By.CSS_SELECTOR, ".x1a0syf3.x1ja2u2z").find_elements(By.TAG_NAME, "img")
|
||||
if not images_ele:
|
||||
images_ele = self.driver.find_element(By.CSS_SELECTOR,
|
||||
".x6s0dn4.x78zum5.x1iyjqo2.xl56j7k.x6ikm8r.x10wlt62.xh8yej3.x1ja2u2z").find_elements(
|
||||
By.TAG_NAME, "img")
|
||||
for image in images_ele:
|
||||
img = image.get_attribute("src")
|
||||
images.append(img)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
try:
|
||||
see_more = 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[5]/div/div[2]/div[1]/div/span/div/span")
|
||||
except:
|
||||
see_more = 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[5]/div[2]/div/div[1]/div/span/div/span")
|
||||
pass
|
||||
|
||||
see_more.click()
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
try:
|
||||
description = self.driver.find_element(By.CSS_SELECTOR, ".xz9dl7a.x4uap5.xsag5q8.xkhd6sd.x126k92a").find_element(By.CSS_SELECTOR, ".x193iq5w.xeuugli.x13faqbe.x1vvkbs.xlh3980.xvmahel.x1n0sxbx.x1lliihq.x1s928wv.xhkezso.x1gmr53x.x1cpjm7i.x1fgarty.x1943h6x.x4zkp8e.x3x7a5m.x6prxxf.xvq8zen.xo1l8bm.xzsf02u").text
|
||||
description = description.replace("'","")
|
||||
except:
|
||||
description = 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[5]/div[2]/div/div[1]/div/span").text
|
||||
description = description.replace("'", "")
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
seller_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[2]/div/div/div[2]/div[1]/div/div/div/div/div[2]/div/div/div/div/span/span/div/div/a/span").text
|
||||
seller_name = seller_name.replace("'", "")
|
||||
except:
|
||||
try:
|
||||
seller_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[6]/div/div[2]/div[1]/div/div/div/div/div[2]/div/div/div/div/span/span/div/div/a/span').text
|
||||
seller_name = seller_name.replace("'", "")
|
||||
except:
|
||||
pass
|
||||
pass
|
||||
|
||||
if seller_name=="":
|
||||
time.sleep(5)
|
||||
return
|
||||
|
||||
try:
|
||||
seller_link = 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[2]/div/div/div[2]/div[1]/div/div/div/div/div[2]/div/div/div/div/span/span/div/div/a").get_attribute("href")
|
||||
except:
|
||||
try:
|
||||
seller_link = 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[6]/div/div[2]/div[1]/div/div/div/div/div[2]/div/div/div/div/span/span/div/div/a").get_attribute("href")
|
||||
except:
|
||||
pass
|
||||
pass
|
||||
|
||||
### rce_reseller
|
||||
|
||||
data_reseller = {}
|
||||
|
||||
data_reseller['rce_source_id'] = self.rce_source_id
|
||||
data_reseller['reseller_name'] = seller_name.replace("'", "''")
|
||||
|
||||
self.db_writer.rce_reseller(data_reseller)
|
||||
|
||||
### rce_reseller_store
|
||||
|
||||
data_reseller_store = {}
|
||||
|
||||
data_reseller_store['rce_source_id'] = self.rce_source_id
|
||||
data_reseller_store['store_page_url'] = seller_link.replace("'","''")
|
||||
data_reseller_store['store_page_url_hash'] = hashlib.md5(data_reseller_store['store_page_url'].encode('utf-8')).hexdigest()
|
||||
data_reseller_store['store_location'] = city
|
||||
data_reseller_store['rce_reseller_id'] = ""
|
||||
|
||||
try:
|
||||
self.cur.execute("select id from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" where reseller_name = '"+str(data_reseller['reseller_name'])+"'")
|
||||
rce_reseller_id = self.cur.fetchone()
|
||||
data_reseller_store['rce_reseller_id'] = rce_reseller_id[0]
|
||||
except:
|
||||
pass
|
||||
|
||||
self.db_writer.rce_reseller_store(data_reseller_store)
|
||||
|
||||
|
||||
### rce_product
|
||||
|
||||
data_product = {}
|
||||
|
||||
data_product['rce_source_id'] = self.rce_source_id
|
||||
data_product['product_page_url'] = url.replace("'", "''") # product page url
|
||||
data_product['product_page_url_hash'] = hashlib.md5(data_product['product_page_url'].encode('utf-8')).hexdigest()
|
||||
data_product['rce_category_id'] = ""
|
||||
data_product['rce_store_id'] = ""
|
||||
data_product['rce_source_product_name'] = name
|
||||
data_product['product_images'] = str(images).replace("'","")
|
||||
data_product['product_description'] = description
|
||||
data_product['product_price_min'] = price
|
||||
data_product['product_price_max'] = price
|
||||
data_product['ships_from'] = city
|
||||
|
||||
try:
|
||||
keyword = "health"
|
||||
sql = "select id from "+self.config.get('crawler_schema')+"."+self.config.get('category_tab')+" where lower(replace(category_name,'''','')) = lower('"+keyword+"')"
|
||||
self.cur.execute(sql)
|
||||
data_product['rce_category_id'] = self.cur.fetchone()[0]
|
||||
except Exception as e: print(e)
|
||||
|
||||
try:
|
||||
sql = "select id from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" where store_page_url_hash = '"+str(data_reseller_store['store_page_url_hash'])+"'"
|
||||
self.cur.execute(sql)
|
||||
data_product['rce_store_id'] = self.cur.fetchone()[0]
|
||||
except: pass
|
||||
|
||||
self.db_writer.rce_product(data_product)
|
|
@ -0,0 +1,116 @@
|
|||
import time
|
||||
from selenium.webdriver import Keys
|
||||
from selenium.webdriver.common.by import By
|
||||
from undetected_chromedriver import Chrome, ChromeOptions
|
||||
import pandas as pd
|
||||
import random
|
||||
from datetime import datetime
|
||||
import psycopg2
|
||||
import logging
|
||||
|
||||
###### Looger ######
|
||||
format = "%(asctime)s: %(message)s"
|
||||
logging.basicConfig(format=format, level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S")
|
||||
|
||||
|
||||
class FbMarketplaceProducts:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.url = [
|
||||
"https://www.facebook.com/marketplace/hochiminhcity/beauty-products",
|
||||
"https://www.facebook.com/marketplace/113269895355265/beauty-products/?exact=false",
|
||||
"https://www.facebook.com/marketplace/111711568847056/beauty-products/?exact=false",
|
||||
"https://www.facebook.com/marketplace/114668461883395/beauty-products/?exact=false",
|
||||
"https://www.facebook.com/marketplace/106388046062960/beauty-products/?exact=false"
|
||||
]
|
||||
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'),
|
||||
password=self.config.get('db_pass'), host=self.config.get('db_host'),
|
||||
port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
|
||||
op = ChromeOptions()
|
||||
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 = "kCDHvIPzM1sdN8JG37vL1Zujt1EmiRBTQhuJnXVJ"
|
||||
self.S3_BUCKET = "s3://raena-prod-data-engineering/crawler_engine/fb-marketplace/"
|
||||
|
||||
self.version_main = 120
|
||||
self.driver = Chrome(options=op, version_main=self.version_main)
|
||||
#time.sleep(3000)
|
||||
|
||||
def __del__(self):
|
||||
self.driver.quit()
|
||||
|
||||
def getProducts(self):
|
||||
for url in self.url:
|
||||
logging.info("Getting products of {}".format(url))
|
||||
self.driver.get(url)
|
||||
self.driver.execute_script("document.body.style.zoom='25%'")
|
||||
time.sleep(10)
|
||||
##### Scrolling
|
||||
#smartScroll(self.driver, stopAtBorder=True, distancePerSecond=2000, humanBreaks=True, timeout=10, stopWhenDocHeightNotChangedSince=60)
|
||||
|
||||
####### Scroll down using Page Down key
|
||||
html_element = self.driver.find_element(By.TAG_NAME, 'html')
|
||||
for x in range(300):
|
||||
logging.info("Pagedown count: {}".format(x))
|
||||
html_element.send_keys(Keys.PAGE_DOWN)
|
||||
time.sleep(random.randint(1,3))
|
||||
|
||||
product_elements = self.driver.find_elements(By.CSS_SELECTOR,".x9f619.x78zum5.x1r8uery.xdt5ytf.x1iyjqo2.xs83m0k.x1e558r4.x150jy0e.x1iorvi4.xjkvuk6.xnpuxes.x291uyu.x1uepa24")
|
||||
|
||||
products = []
|
||||
for element in product_elements:
|
||||
try:
|
||||
try:
|
||||
name = element.find_element(By.CSS_SELECTOR, ".x1lliihq.x6ikm8r.x10wlt62.x1n2onr6").text
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
price = element.find_element(By.CSS_SELECTOR, ".x193iq5w.xeuugli.x13faqbe.x1vvkbs.x10flsy6.x1lliihq.x1s928wv.xhkezso.x1gmr53x.x1cpjm7i.x1fgarty.x1943h6x.x1tu3fi.x3x7a5m.x1lkfr7t.x1lbecb7.x1s688f.xzsf02u").text
|
||||
except:
|
||||
pass
|
||||
|
||||
url = element.find_element(By.TAG_NAME, 'a').get_attribute("href")
|
||||
|
||||
try:
|
||||
city = element.find_element(By.CSS_SELECTOR, ".x1lliihq.x6ikm8r.x10wlt62.x1n2onr6.xlyipyv.xuxw1ft").text
|
||||
except:
|
||||
pass
|
||||
|
||||
flag = 0
|
||||
product = [name, price, url, city, flag]
|
||||
products.append(product)
|
||||
except:
|
||||
pass
|
||||
|
||||
print(str(len(products)) + " products found")
|
||||
df = pd.DataFrame(products, columns=["Name", "Price", "Url", "City", "Flag"])
|
||||
df = df.drop_duplicates()
|
||||
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)
|
||||
df['Price'] = df['Price'].astype(int)
|
||||
|
||||
filename = 'facebook_crawler_tracker' + str(datetime.now().strftime('%Y%m%d%H%M%S')) + ".csv"
|
||||
|
||||
df.to_csv(self.S3_BUCKET + filename,
|
||||
storage_options={'key': self.S3_KEY, 'secret': self.S3_SECRET},
|
||||
index=False,
|
||||
header=False,
|
||||
mode='a')
|
||||
|
||||
table = f"""{self.config.get('crawler_schema')}.{self.config.get('tracker_tab')}"""
|
||||
|
||||
sql = "COPY " + table + " FROM '" + self.S3_BUCKET + filename + \
|
||||
"' credentials 'aws_access_key_id=" + self.S3_KEY + ";aws_secret_access_key=" + self.S3_SECRET + "' CSV"
|
||||
|
||||
print("Syncing SQL is: {}".format(sql))
|
||||
self.cur.execute(sql)
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
Ae thợ mua 1thù 24 chai em bao Síp ib zalo em [hidden information],0,https://www.facebook.com/marketplace/item/328880683015737/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227394027480612490%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7394027480612490%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A0%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.6288948892136e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227394027480612490%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Đầu đĩa pioneer Thái Lan,200000,https://www.facebook.com/marketplace/item/733625948757689/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227759688324059994%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7759688324059994%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A1%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2044896178359e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227759688324059994%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Bán rổ như hình 100k Bợ cổ 60k, đầu đèn sihello 60k (mua luôn 2 thì 100k)",0,https://www.facebook.com/marketplace/item/1088238512372870/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227316929375065873%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7316929375065873%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A2%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A3.7365649337542e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227316929375065873%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Lộc Ninh, Bìn Phước, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",650000,https://www.facebook.com/marketplace/item/938620961109430/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227087297934684079%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7087297934684079%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A3%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A2.1865274857383e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227087297934684079%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Máy chuyên cạo râu mini nhỏ gọn tiện lợi giá rẻ nhất thị trường,0,https://www.facebook.com/marketplace/item/585791646945124/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%226407636535914323%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6407636535914323%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A4%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A2.1381965742205e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226407636535914323%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Vĩnh Long
|
||||
A6 VÔ GẠO NHANH,0,https://www.facebook.com/marketplace/item/1116048499395002/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227228835630506149%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7228835630506149%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A5%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A2.1087651126186e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227228835630506149%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Vĩnh Long
|
||||
Xe ko giây,1600,https://www.facebook.com/marketplace/item/335168492680357/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227038042129649500%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7038042129649500%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A6%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A2.0357478438739e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227038042129649500%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Huyen Chau Thanh, Kiến Giang, Vietnam"
|
||||
"Mic bãi rẻ,đẹp chất lượng",1000,https://www.facebook.com/marketplace/item/1417480025838100/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227024313194362431%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7024313194362431%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A7%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.9409659488466e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227024313194362431%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Da Lat
|
||||
"👉 E về được ít Máy cạo râuPanasonic xạc nguồn AC 100 -240v, 50 đến 60 hz, hàng Nội Địa Nhật made i",0,https://www.facebook.com/marketplace/item/1718607365300064/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%2224630095849970915%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24630095849970915%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A8%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.8441376536808e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224630095849970915%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bán Nhà Gần Chợ Tân Bình ! Mua Về Là Ở Thôi Nha .,5800,https://www.facebook.com/marketplace/item/1394727024473267/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227403567149675494%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7403567149675494%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A9%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.8169079710168e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227403567149675494%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Dàn áo xe máy đủ loại,0,https://www.facebook.com/marketplace/item/904293604338807/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227397740583579143%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7397740583579143%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A11%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.6375494792532e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227397740583579143%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Tieu Can
|
||||
Kem kone thái,0,https://www.facebook.com/marketplace/item/6807517156023681/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%226863818763666734%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6863818763666734%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A12%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.5850906098743e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226863818763666734%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Long Hung, Vietnam"
|
||||
Bưởi,0,https://www.facebook.com/marketplace/item/901640371663881/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%226843094939149446%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6843094939149446%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A14%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.4179341929923e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226843094939149446%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Phan Thiet
|
||||
-Vòng râu rồng silicon -Tính năng: Chống x t s. kíh thíh âđạo mãnh liệt -Chất liệu: Silicon màu da m,0,https://www.facebook.com/marketplace/item/1075800330226836/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227285568334834732%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7285568334834732%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A16%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.1686764395461e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227285568334834732%5C%22%3A3021%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Màn hình Xiaomi Redmi 34inch,0,https://www.facebook.com/marketplace/item/1045258846696868/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%226428804720553167%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6428804720553167%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A18%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.0838345372393e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226428804720553167%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bán vài em thông minh cho anh em phần 1,200000,https://www.facebook.com/marketplace/item/1396454364296075/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227141550532628333%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7141550532628333%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A19%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.0759479113771e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227141550532628333%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Ben Cat,4500000,https://www.facebook.com/marketplace/item/356259717138365/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227223341837730706%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7223341837730706%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A20%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.0400600156941e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227223341837730706%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Ben Cat
|
||||
n,0,https://www.facebook.com/marketplace/item/1505129186999208/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%226837010699744263%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6837010699744263%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A21%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A1.0014217156486e-6%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226837010699744263%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Binh Phuoc, Vietnam"
|
||||
Tuy Hòa,0,https://www.facebook.com/marketplace/item/863065955826729/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%2224532936806352953%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24532936806352953%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A22%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A9.7970324085107e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224532936806352953%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Tuy Hòa
|
||||
Ghế masage ASAMA,2000000,https://www.facebook.com/marketplace/item/908639980545846/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%2224463093353337185%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24463093353337185%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A23%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A9.7211904057365e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224463093353337185%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Biên Hòa
|
||||
-Vòng râu rồng silicon -Tính năng: Chống x t s. kíh thíh âđạo mãnh liệt -Chất liệu: Silicon màu da m,0,https://www.facebook.com/marketplace/item/1122476679168654/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227478736978803579%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7478736978803579%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A24%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A9.6969819691979e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227478736978803579%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
khoan cầm tay hàng siêu thị trưng bày mới 98-99% khoan chính hãng Bosch,0,https://www.facebook.com/marketplace/item/317755234504489/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227678209178861641%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7678209178861641%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A25%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A9.5309107488463e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227678209178861641%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Long Khanh
|
||||
Nhà mới ymoal,1530,https://www.facebook.com/marketplace/item/893817065519714/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227044583612299512%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7044583612299512%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A26%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A9.2073181410201e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227044583612299512%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Buon Me Thuot
|
||||
Ship nhanh nhẹn,0,https://www.facebook.com/marketplace/item/1078266493364480/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079997357595485%22%2C%22mf_story_key%22%3A%227082847235131749%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7082847235131749%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A27%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.9954670259264e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227082847235131749%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Chậu bốn mùa,0,https://www.facebook.com/marketplace/item/191665027365743/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227043770765715629%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7043770765715629%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A28%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.9801439675069e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227043770765715629%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ap Binh Hoa, Song Be, Vietnam"
|
||||
Bửng Dream Thái,0,https://www.facebook.com/marketplace/item/6792505140878525/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227871344569594971%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7871344569594971%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A29%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.4515876813305e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227871344569594971%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
ông bà chuyển về quê nên không ai dùng em muốn thanh lý lại cho ai có nhu cầu ạ,2600,https://www.facebook.com/marketplace/item/381285734481670/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227463386807045002%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7463386807045002%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A30%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.4020379798053e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227463386807045002%5C%22%3A3021%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Biên Hòa,0,https://www.facebook.com/marketplace/item/1783252378762651/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2223862861993328241%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A23862861993328241%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A31%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.3268386278781e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2223862861993328241%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Biên Hòa
|
||||
Míc Không Dây Cao Cấp NS,600,https://www.facebook.com/marketplace/item/385939237262679/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2224349007644746683%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24349007644746683%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A32%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.1758855469097e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224349007644746683%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Thu Dau Mot
|
||||
"🔥 Bán nhà Vĩnh Hoà Nha Trang vào ở ngay Cách biển chỉ 5 phút, cách 2-4 chỉ 200m",1650,https://www.facebook.com/marketplace/item/344960204993042/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2224506486952330667%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24506486952330667%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A33%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.1431877481457e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224506486952330667%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Nha Trang
|
||||
Ben Cat,0,https://www.facebook.com/marketplace/item/906492834594549/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2224503760929269326%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24503760929269326%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A34%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.0574157214993e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224503760929269326%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Ben Cat
|
||||
Merc c200 2008,248000,https://www.facebook.com/marketplace/item/3647700638818197/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2224755626144053433%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24755626144053433%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A35%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.0438388349648e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224755626144053433%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Cam Ranh
|
||||
"Máy bắn vít black decker vp3621 3,6v thân máy vỏ pin không bao gì hết",300000,https://www.facebook.com/marketplace/item/282000097952676/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226584881131593357%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6584881131593357%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A36%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A8.0144400009255e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226584881131593357%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bộ bàn ghế Nhật lùn,7500000,https://www.facebook.com/marketplace/item/1918044135258024/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2224960545466877352%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24960545466877352%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A37%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.9994956380147e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224960545466877352%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Buon Me Thuot
|
||||
"gia đình cần thanh lý lại máy massage này , ac nào có nhu cầu em pass lại cho giá rẻ ạ",2600,https://www.facebook.com/marketplace/item/2056686634690979/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226874711855968885%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6874711855968885%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A38%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.999385391716e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226874711855968885%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Makita ĐF470 khoan 3CN,0,https://www.facebook.com/marketplace/item/894176862091013/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226562839330484824%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6562839330484824%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A39%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.9863736486148e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226562839330484824%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Garmin Venu Sq fullbox,2500000,https://www.facebook.com/marketplace/item/620814900146474/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227125193847576587%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7125193847576587%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A40%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.9454702190295e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227125193847576587%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",11500,https://www.facebook.com/marketplace/item/1350533796340377/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227388888521179502%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7388888521179502%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A41%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.9134847637558e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227388888521179502%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Can Tho,100000,https://www.facebook.com/marketplace/item/690324686421864/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226839836062812789%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6839836062812789%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A42%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.8898367196175e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226839836062812789%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Can Tho
|
||||
Máy in Canon 2900 màu đen,180000,https://www.facebook.com/marketplace/item/1068214567852461/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%2224817953201151909%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24817953201151909%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A43%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.7958262184057e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224817953201151909%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Phu My, Vietnam",25500,https://www.facebook.com/marketplace/item/910579237179341/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226998719470243040%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6998719470243040%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A44%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.7912629242235e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226998719470243040%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Phu My, Vietnam"
|
||||
Thảo Da ua rủ đi chơi nên là pass máy gấp lấy tiền đi ăn chè,760000,https://www.facebook.com/marketplace/item/144232442085788/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226369232683181456%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6369232683181456%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A45%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.727312575577e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226369232683181456%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"thanh lý bàn ghế làm việc, học tập Kệ sách di chuyển được 900k",900000,https://www.facebook.com/marketplace/item/1412540813018617/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226816404695129807%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6816404695129807%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A46%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.6718733866839e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226816404695129807%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Nha Trang
|
||||
Dư dùng bán amply nhật nguyên rin Yamaha,1200000,https://www.facebook.com/marketplace/item/190570657446588/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227797646120264864%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7797646120264864%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A47%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.6549903354597e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227797646120264864%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý loa bose 802 hàng usa ai cần liên lạc [hidden information],0,https://www.facebook.com/marketplace/item/929800798715861/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227228049917282353%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7228049917282353%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A48%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.554137692886e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227228049917282353%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",17500,https://www.facebook.com/marketplace/item/1345451496330604/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226937836972967971%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6937836972967971%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A49%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.5495911457677e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226937836972967971%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Máy pha cà phê Delonghi EC230.BK, Bảo hành 12 tháng",0,https://www.facebook.com/marketplace/item/232639816560456/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%227308324099187884%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7308324099187884%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A50%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.5454412259196e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227308324099187884%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Khay trà gỗ cẩm,950,https://www.facebook.com/marketplace/item/1088277355822133/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079653827682971%22%2C%22mf_story_key%22%3A%226756355581156902%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6756355581156902%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A51%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.5316024811608e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226756355581156902%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Pleiku
|
||||
Thanh lý,0,https://www.facebook.com/marketplace/item/876275964237845/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227402817903085451%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7402817903085451%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A52%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.4815132805349e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227402817903085451%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Di An
|
||||
Thanh lý wave @ 2004,10000,https://www.facebook.com/marketplace/item/389639143602996/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226987191287994670%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6987191287994670%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A53%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.4659378619528e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226987191287994670%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Long Khanh
|
||||
Cần bán,2000000,https://www.facebook.com/marketplace/item/2717793475060755/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227004889322880883%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7004889322880883%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A54%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.440369167579e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227004889322880883%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Son sáp lì ROSY SWEET LOVE,169,https://www.facebook.com/marketplace/item/266638329606593/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%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%3A55%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.3908750836528e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224843562218625057%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Gò Công
|
||||
Thanh lý máy phát điện nhật,12000,https://www.facebook.com/marketplace/item/215962524933558/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227323730474352055%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7323730474352055%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A56%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.3844777347548e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227323730474352055%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Xã Bình Ba, Vietnam"
|
||||
Artistry Skin Nutrition Balancing,0,https://www.facebook.com/marketplace/item/1128944908069059/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227021355424593544%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7021355424593544%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A57%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.3492973294529e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227021355424593544%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Gạch tàu 40x40 và 30x30,0,https://www.facebook.com/marketplace/item/704904001419238/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226825982077499256%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6825982077499256%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A58%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.3489782238938e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226825982077499256%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Steep vs giảm tốc vuông góc,100000,https://www.facebook.com/marketplace/item/681301287509334/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226991823040901758%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6991823040901758%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A59%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.2964207070824e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226991823040901758%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Dư ko dùng bán,200000,https://www.facebook.com/marketplace/item/1117881136043662/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%228073239582705552%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A8073239582705552%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A60%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.2788041759033e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%228073239582705552%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Ghế mát xa Nhật bãi [hidden information],0,https://www.facebook.com/marketplace/item/298870099828625/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227510075209023068%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7510075209023068%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A61%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.2201366752966e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227510075209023068%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
ultraboost chính hãng,0,https://www.facebook.com/marketplace/item/1083594906175226/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226542640975840213%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6542640975840213%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A62%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.1930545905609e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226542640975840213%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Pin đóng công cụ xe điện cell chính hãng,100000,https://www.facebook.com/marketplace/item/735046145265625/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226302265416543716%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6302265416543716%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A63%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.1607018420918e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226302265416543716%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Nha Trang
|
||||
Cần bán nhà phố mới xây. 1 trệt 1 lầu 1 gác lửng 2 toa lét. Giá 350tr,350,https://www.facebook.com/marketplace/item/904367464614428/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227226540807421928%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7226540807421928%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A64%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.1552427884203e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227226540807421928%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bánh hạt dinh dưỡng tại xưởng,125,https://www.facebook.com/marketplace/item/742714914458509/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227350396981678072%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7350396981678072%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A65%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.1498797718271e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227350396981678072%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Vinh Tuong,18000,https://www.facebook.com/marketplace/item/1604613273613790/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%2225315370234728822%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A25315370234728822%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A66%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.1449138534024e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2225315370234728822%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Vinh Tuong
|
||||
ĐH thời trang size to 46mm nam nữ đều ok,160000,https://www.facebook.com/marketplace/item/926915245522469/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%2225515330524733281%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A25515330524733281%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A67%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.1421731523408e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2225515330524733281%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Can Tho,0,https://www.facebook.com/marketplace/item/904756727730291/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226975583099215628%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6975583099215628%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A68%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.0923583730334e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226975583099215628%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Can Tho
|
||||
"Ho Chi Minh City, Vietnam",19000,https://www.facebook.com/marketplace/item/361181633443110/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227010824915671032%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7010824915671032%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A69%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.0761610658614e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227010824915671032%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý xả kho vang QSV K10 giá sập sàn nghỉ tết.,0,https://www.facebook.com/marketplace/item/386482563868464/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%225375050512619283%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A5375050512619283%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A70%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.0051939394328e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%225375050512619283%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Tăng đơ cắt tóc ,máy cạo râu,radio",400000,https://www.facebook.com/marketplace/item/904690827876547/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227003983776353517%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7003983776353517%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A71%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A7.0007804836885e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227003983776353517%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Biên Hòa
|
||||
Ghi đông md,1900,https://www.facebook.com/marketplace/item/3581561238840261/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227088658817916430%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7088658817916430%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A72%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.836736754288e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227088658817916430%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Xe 3 Bánh,0,https://www.facebook.com/marketplace/item/1143632520350073/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%227020960094652044%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7020960094652044%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A73%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.7954220582124e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227020960094652044%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
BÌNH THẠNH ngộp bank nhà 6*11 HXH bán gấp chỉ 90tr/m,0,https://www.facebook.com/marketplace/item/338923068928276/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%226553386764767948%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6553386764767948%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A74%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.7861295289896e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226553386764767948%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
59 cuộn băng cát sét gl,150000,https://www.facebook.com/marketplace/item/1157202229019276/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079585259862451%22%2C%22mf_story_key%22%3A%2224752465094369496%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24752465094369496%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A75%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.7660098102722e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224752465094369496%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Gấp bán nhà ngộp ngay emart,2500,https://www.facebook.com/marketplace/item/408673971491373/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227372105779487319%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7372105779487319%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A76%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.7632263391789e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227372105779487319%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Máy hút bụi pin lock&lock,700000,https://www.facebook.com/marketplace/item/905447194324410/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2225032257663032236%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A25032257663032236%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A77%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.7030185307596e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2225032257663032236%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Biên Hòa
|
||||
Bán miband 6,320000,https://www.facebook.com/marketplace/item/1552557642214034/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227348854625148083%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7348854625148083%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A78%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.5704537900951e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227348854625148083%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Loa súp điện,3000,https://www.facebook.com/marketplace/item/907984310972621/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2224552769834371324%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24552769834371324%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A79%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.500574382627e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224552769834371324%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Củ míc bãi xịn,300000,https://www.facebook.com/marketplace/item/417011494090399/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%225413787402078282%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A5413787402078282%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A80%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.3922940084518e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%225413787402078282%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Vung Liem
|
||||
"Ho Chi Minh City, Vietnam",4000000,https://www.facebook.com/marketplace/item/3681655335451494/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2224898793749734351%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24898793749734351%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A81%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.3729283176527e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224898793749734351%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"ĐIỀU KHIỂN - REMOTE - QUẠT TREO ,ĐỨNG SENKO Mã : TR1683 / TR1628 / TR1428 / TR828 /",35000,https://www.facebook.com/marketplace/item/355730196906397/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%226960793437277060%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6960793437277060%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A82%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.3124561238733e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226960793437277060%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Giống hoa ly đẹp,0,https://www.facebook.com/marketplace/item/1268362554116580/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2224526290017017225%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24526290017017225%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A83%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.3008676531582e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224526290017017225%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Quy Nhon
|
||||
Micro không dây đa năng chất lượng,500000,https://www.facebook.com/marketplace/item/1111644540012405/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2224714211874859013%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24714211874859013%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A84%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.2894330862215e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224714211874859013%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Rach Gia
|
||||
Deton 1300 hàng mới dòng tiếng thì khỏi chê pull sub đánh ok,0,https://www.facebook.com/marketplace/item/398038619261654/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227294890337229482%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7294890337229482%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A85%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.2736128940976e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227294890337229482%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Hang Vinh, Minh Hai, Vietnam"
|
||||
"TỦ TRANG ĐIỂM 2 TRONG 1 (HIỆN ĐẠI, ĐA NĂNG)",0,https://www.facebook.com/marketplace/item/904131074752560/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2224837124382545553%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24837124382545553%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A86%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.2453443483813e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224837124382545553%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Mát giặt Toshiba,900000,https://www.facebook.com/marketplace/item/177931322065375/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227205855746140045%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7205855746140045%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A87%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A6.0327283971219e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227205855746140045%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Thu Dau Mot
|
||||
YÊN XE ĐẠP GIANT APPROACH,790000,https://www.facebook.com/marketplace/item/1445952352653247/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%226489496304483350%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6489496304483350%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A88%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.9646078312603e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226489496304483350%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bán,0,https://www.facebook.com/marketplace/item/362756976361615/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2225213388638259668%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A25213388638259668%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A89%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.8782415293342e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2225213388638259668%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Loc Hung, Hồ Chí Minh, Vietnam"
|
||||
thái,0,https://www.facebook.com/marketplace/item/1593923961117916/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%226449787895053232%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6449787895053232%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A90%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.8753458650022e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226449787895053232%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Cai Rang,0,https://www.facebook.com/marketplace/item/1560440274756452/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%2225076886975228956%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A25076886975228956%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A91%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.8337914646339e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2225076886975228956%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Cai Rang
|
||||
Bắp chuối bạc loại dày giá 30 k/ 1 cặp,30000,https://www.facebook.com/marketplace/item/360723430246219/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227577719452238367%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7577719452238367%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A92%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.7033774272146e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227577719452238367%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Xe inox 1m2,1400000,https://www.facebook.com/marketplace/item/817666146785658/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%226885862034844589%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6885862034844589%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A93%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.6638740825392e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226885862034844589%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",23456,https://www.facebook.com/marketplace/item/857490515760284/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227134456259918787%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7134456259918787%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A94%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.6330451698666e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227134456259918787%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Tai nghe,150000,https://www.facebook.com/marketplace/item/718961369987612/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%226541004159337227%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6541004159337227%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A96%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.6189061132026e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226541004159337227%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bộ bàn ghế 1.2mx1.2m + 10 ghế nhựa,1150000,https://www.facebook.com/marketplace/item/1532970887556164/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227023994827676066%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7023994827676066%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A97%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.5610924132273e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227023994827676066%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Can Tho
|
||||
hoa sống đoi cánh kép,0,https://www.facebook.com/marketplace/item/678709071116276/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227015104421859160%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7015104421859160%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A98%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.560113037535e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227015104421859160%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
15 Plus New 🌸🌸,3000000,https://www.facebook.com/marketplace/item/2386723528185846/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227087253948017669%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7087253948017669%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A99%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.5575331385782e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227087253948017669%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Thu Dau Mot
|
||||
khuôn làm giò inox chống gỉ,0,https://www.facebook.com/marketplace/item/317388694024470/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079516355191003%22%2C%22mf_story_key%22%3A%227102752756470784%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7102752756470784%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A100%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.5426160305421e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227102752756470784%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
🔴🔴Loa Bluetooth JBL RADIAL thanh lý [hidden information],1100000,https://www.facebook.com/marketplace/item/899834605169734/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227182528041812446%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7182528041812446%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A101%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.53202615843e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227182528041812446%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Lưới cá,180,https://www.facebook.com/marketplace/item/1404511700146679/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%226707349102727071%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6707349102727071%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A102%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.5294604550535e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226707349102727071%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Soc Trang
|
||||
Mic không dây. Hàng bãi,0,https://www.facebook.com/marketplace/item/276436941895434/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%226612688338840184%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6612688338840184%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A103%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.5190433362071e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226612688338840184%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Di An
|
||||
Tks,0,https://www.facebook.com/marketplace/item/367184942599937/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227082753371803747%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7082753371803747%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A104%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.4622074735708e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227082753371803747%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Nha Trang
|
||||
CẠP BASS SANSUI BAS 20 SƯƠNG ĐÚC,1000000,https://www.facebook.com/marketplace/item/343175461905262/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%2224549002498077598%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24549002498077598%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A105%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.4427965256383e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224549002498077598%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
UY TÍN - CHẤT LƯỢNG - GIÁ RẺ,4000000,https://www.facebook.com/marketplace/item/390396593428030/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227473243416043503%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7473243416043503%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A106%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.3624307117079e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227473243416043503%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
✅ LOA KARAOKE BLUETOOTH kèm 2 míc hàng nhật : - SU•YOSD (made in japan) 👉 Loa có thể nhanh chóng k,950,https://www.facebook.com/marketplace/item/807864217810054/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227092731717432874%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7092731717432874%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A107%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.3018407118565e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227092731717432874%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Da Lat
|
||||
bán Kopest Tank X1,1500000,https://www.facebook.com/marketplace/item/1197359708335077/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227049587215120493%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7049587215120493%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A108%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.2730905656368e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227049587215120493%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý duy nhất 1 bộ míc G-545,0,https://www.facebook.com/marketplace/item/984059216217924/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%226816976918366771%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6816976918366771%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A109%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.2672059203379e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226816976918366771%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ap Binh Ta, Long An, Vietnam"
|
||||
Thanh lý,150000,https://www.facebook.com/marketplace/item/891231889249860/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227350739908310124%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7350739908310124%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A110%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.2297796022425e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227350739908310124%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Can Tho
|
||||
"Cassette JVC PC-37 màu đỏ đẹp lung linh, hoạt động hoàn hảo, âm thanh hay",0,https://www.facebook.com/marketplace/item/608262998107413/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227280601568669658%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7280601568669658%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A111%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.201740026172e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227280601568669658%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Long Xuyên,700,https://www.facebook.com/marketplace/item/780982743866711/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227967873056561518%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7967873056561518%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A112%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.178945594763e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227967873056561518%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Long Xuyên
|
||||
Zippo bạc đồng xu,550000,https://www.facebook.com/marketplace/item/2109131292800998/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%2224961226726824607%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24961226726824607%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A113%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.1537050655294e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224961226726824607%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Cho thuê,900,https://www.facebook.com/marketplace/item/1613923766023771/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227305084189550988%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7305084189550988%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A114%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.1172402286562e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227305084189550988%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Phan Thiet
|
||||
Zojirushi cao tần IH 1 lít. Cổ nhưng không cũ.,900000,https://www.facebook.com/marketplace/item/893367535765661/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227376651175701357%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7376651175701357%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A115%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.0790262404822e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227376651175701357%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý tivi thu về vốn lh [hidden information],1000000,https://www.facebook.com/marketplace/item/934190938311475/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%226792273300899208%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6792273300899208%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A116%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.0599713573373e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226792273300899208%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Tinh dầu Thảo Mộc,100000,https://www.facebook.com/marketplace/item/955301782855496/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227825081800840014%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7825081800840014%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A117%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.0317492862228e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227825081800840014%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Thu Dau Mot
|
||||
Shure SM57/58/58S - Nguyên bụi Mĩ,0,https://www.facebook.com/marketplace/item/921625342916203/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227315086678521765%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7315086678521765%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A118%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.0259228700267e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227315086678521765%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý srm Cetaphil và giày Bitis,150000,https://www.facebook.com/marketplace/item/712175707674235/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227751345358228515%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7751345358228515%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A119%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A5.0062571565764e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227751345358228515%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Fitbit charge 2 cho ae thể thao chuyên nghiệp,500000,https://www.facebook.com/marketplace/item/1445227622781321/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227422207421143915%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7422207421143915%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A120%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.9767102578113e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227422207421143915%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Bán đèn pin made in USA xưa,400000,https://www.facebook.com/marketplace/item/1110406726567564/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%2224518055287841247%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24518055287841247%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A121%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.9673122520609e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224518055287841247%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Trái Quách Đặc Sản Chua Thanh Giòn Giòn Mua 5 tặng 1,0,https://www.facebook.com/marketplace/item/857864465991703/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227029702953753884%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7029702953753884%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A122%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.9548416380966e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227029702953753884%5C%22%3A3001%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Cặp loa súp 50 thái 2241 thay coill đẹp như hình hoạt động hoàn hảo [hidden information],2500000,https://www.facebook.com/marketplace/item/885341366379455/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%226937823029669149%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6937823029669149%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A123%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.9043089218127e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226937823029669149%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Chau Phú, An Giang, Vietnam"
|
||||
Máy phun sương,0,https://www.facebook.com/marketplace/item/751390509849264/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079447675933549%22%2C%22mf_story_key%22%3A%227116396575080748%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7116396575080748%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A124%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.8821042296154e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227116396575080748%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thùng nhôm 45lít,1500000,https://www.facebook.com/marketplace/item/213347348515344/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227047389345350440%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7047389345350440%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A125%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.8496062357137e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227047389345350440%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
dọn nhà cần bán,2000,https://www.facebook.com/marketplace/item/1123286632002668/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227147079642017384%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7147079642017384%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A126%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.8434807251453e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227147079642017384%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",250000,https://www.facebook.com/marketplace/item/1098180281605965/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227018822858186246%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7018822858186246%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A127%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.7203436450282e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227018822858186246%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",0,https://www.facebook.com/marketplace/item/221049694422359/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227226386964142985%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7226386964142985%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A128%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.7132753583372e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227226386964142985%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Phuộc Rcb Mod 1:1 cho sh Ý sh việt nam,1300000,https://www.facebook.com/marketplace/item/7088067281275858/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227490317751002488%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7490317751002488%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A129%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.6465536984272e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227490317751002488%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Máy thổi lá cây balo công suất 60cc iseki hàng nội địa nhật.,1800000,https://www.facebook.com/marketplace/item/925411962351830/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%226713420055447563%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6713420055447563%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A130%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.6429521195633e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226713420055447563%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Mài 2 đá Hitachi Japan điện 220v đá 150mm,máy nặng và đầm...zin nguyên bản,nặng khoảng 15kg,cs 365w",1600000,https://www.facebook.com/marketplace/item/893409212447855/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%226971943126226264%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6971943126226264%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A131%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.6091076398496e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226971943126226264%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Hạ Giá Thu vốn Legato HSH 24fret, nhúng chiều lỡ, slip coil đầy đủ - Đàn còn mới hoạt động ngon lành",0,https://www.facebook.com/marketplace/item/380577531180134/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227181006461985394%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7181006461985394%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A132%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.5600216971659e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227181006461985394%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
E còn 4 cây bô 3 thái 1 cây 202 Ae hôp nhản alo e [hidden information],1234,https://www.facebook.com/marketplace/item/1541359440042048/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%226941027726004423%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6941027726004423%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A133%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.5388464961992e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226941027726004423%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ap Phu Thanh, Sóc Trăng, Vietnam"
|
||||
Thanh Lý SamSung Galaxy A54 +5G-256Gb Fullboox,1900000,https://www.facebook.com/marketplace/item/1424767841789778/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227301329646585064%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7301329646585064%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A134%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.4821048816505e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227301329646585064%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Không dùng tới cần bán 3 bình gió đá anh em ai cần liên hệ mình nhé [hidden information],1500,https://www.facebook.com/marketplace/item/352252794293535/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%226523065147793555%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6523065147793555%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A135%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.4790491999067e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226523065147793555%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Xã Long Tân, Vietnam"
|
||||
Đồng hồ thông minh,550000,https://www.facebook.com/marketplace/item/760614846084196/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227227629503965546%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7227629503965546%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A136%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.4783735496771e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227227629503965546%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý lịch lọc,70000,https://www.facebook.com/marketplace/item/1538233257000169/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227803582626337294%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7803582626337294%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A137%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.4326841458272e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227803582626337294%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Thanh lý Mic Db650 pro,3900000,https://www.facebook.com/marketplace/item/1417586812292582/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227025931414156383%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7025931414156383%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A138%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.4246480108063e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227025931414156383%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Vung Liem
|
||||
Cần bán Apple Watch Series 5 Bạc Size 44mm. Bản GPS. Máy zin full chức năng !!!,2850,https://www.facebook.com/marketplace/item/708107224454334/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%226795004810624884%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A6795004810624884%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A139%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.4053284792362e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%226795004810624884%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Nha Trang
|
||||
Thanh lý mùng chụp tự bung 50k,50000,https://www.facebook.com/marketplace/item/397794142631205/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%2224992631593686202%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24992631593686202%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A141%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.307297956723e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224992631593686202%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Khanh Hoa, Khánh Hòa, Vietnam"
|
||||
Đôn gỗ Cẩm,750,https://www.facebook.com/marketplace/item/970532001162049/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%2224648788894764438%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24648788894764438%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A142%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2894967038254e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224648788894764438%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Pleiku
|
||||
Còn ít,0,https://www.facebook.com/marketplace/item/836453038253062/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227129982573704393%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7129982573704393%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A143%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2835655579025e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227129982573704393%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Ko dùng nữa bán cho anh em nghe nhạc chuẩn nôi đia nhật,1100000,https://www.facebook.com/marketplace/item/919336165986019/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227202170559867060%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7202170559867060%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A144%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2731452180776e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227202170559867060%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Biên Hòa
|
||||
Canon G1x Mark III siêu compact cảm biến APSC fullbox,1600000,https://www.facebook.com/marketplace/item/919844106513138/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227141422815904233%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7141422815904233%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A145%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2323729536215e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227141422815904233%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Tuyp led đầu nhôm,0,https://www.facebook.com/marketplace/item/892334782711399/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227846959375318471%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7846959375318471%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A146%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2253643191011e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227846959375318471%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Ho Chi Minh City, Vietnam",24500,https://www.facebook.com/marketplace/item/722285429877973/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%2224977930741792200%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A24977930741792200%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A147%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.223161759321e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%2224977930741792200%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
"Máy hút bụi dạng hộp Hitachi CV-BF16 GN, BH 12 tháng",0,https://www.facebook.com/marketplace/item/1133449907643132/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227123220231060778%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7123220231060778%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A148%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2177947239266e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227123220231060778%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,"Ho Chi Minh City, Vietnam"
|
||||
Đồng hồ thông minh,120000,https://www.facebook.com/marketplace/item/701417201825540/?ref=category_feed&referral_code=null&referral_story_type=listing&tracking=%7B%22qid%22%3A%22-2656079379013367507%22%2C%22mf_story_key%22%3A%227691518280876270%22%2C%22commerce_rank_obj%22%3A%22%7B%5C%22target_id%5C%22%3A7691518280876270%2C%5C%22target_type%5C%22%3A0%2C%5C%22primary_position%5C%22%3A149%2C%5C%22ranking_signature%5C%22%3A6738953020994469899%2C%5C%22commerce_channel%5C%22%3A504%2C%5C%22value%5C%22%3A4.2106342540586e-7%2C%5C%22candidate_retrieval_source_map%5C%22%3A%7B%5C%227691518280876270%5C%22%3A3003%7D%7D%22%2C%22ftmd_400706%22%3A%22111112l%22%7D&__tn__=!%3AD,Vĩnh Long
|
|
|
@ -0,0 +1,24 @@
|
|||
from deep_translator import GoogleTranslator
|
||||
|
||||
# def translate_text_to_english(text):
|
||||
# if text:
|
||||
# translated = GoogleTranslator(source='auto', target='en').translate(text)
|
||||
# return translated
|
||||
# return text
|
||||
#
|
||||
|
||||
def translate_text_to_english(text):
|
||||
if text:
|
||||
chunk_size = 4800
|
||||
text_chunks = [text[i:i + chunk_size] for i in range(0, len(text), chunk_size)]
|
||||
|
||||
translated_chunks = []
|
||||
for chunk in text_chunks:
|
||||
translated_chunk = GoogleTranslator(source='auto', target='en').translate(chunk)
|
||||
translated_chunks.append(translated_chunk)
|
||||
|
||||
translated_text = ' '.join(translated_chunks)
|
||||
|
||||
return translated_text
|
||||
|
||||
return text
|
|
@ -0,0 +1,78 @@
|
|||
ALTER TABLE test_spider_management.rce_category ADD category_parent_name varchar(24000) NULL;
|
||||
ALTER TABLE test_spider_management.aud_rce_category ADD category_parent_name varchar(24000) NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS test_spider_management.crawler_tracker_hasaki
|
||||
(
|
||||
crawler_name VARCHAR(24000) ENCODE lzo
|
||||
,product_section VARCHAR(24000) ENCODE lzo
|
||||
,product_name VARCHAR(24000) ENCODE lzo
|
||||
,product_url VARCHAR(24000) ENCODE lzo
|
||||
,product_image VARCHAR(24000) ENCODE lzo
|
||||
,product_sold INTEGER NOT NULL ENCODE az64
|
||||
,product_brand VARCHAR(24000) ENCODE lzo
|
||||
,gift VARCHAR(24000) ENCODE lzo
|
||||
,product_rank INTEGER NOT NULL ENCODE az64
|
||||
,categoryid INTEGER NOT NULL ENCODE az64
|
||||
,flag SMALLINT DEFAULT 0 ENCODE az64
|
||||
)
|
||||
DISTSTYLE AUTO
|
||||
;
|
||||
|
||||
ALTER TABLE test_spider_management.rce_brand ADD brand_following int8 NULL;
|
||||
ALTER TABLE test_spider_management.rce_brand ADD brand_rating int8 NULL;
|
||||
ALTER TABLE test_spider_management.aud_rce_brand ADD brand_following int8 NULL;
|
||||
ALTER TABLE test_spider_management.aud_rce_brand ADD brand_rating int8 NULL;
|
||||
|
||||
ALTER TABLE test_spider_management.rce_product_variant ADD product_variant_sku varchar(1000) NULL;
|
||||
ALTER TABLE test_spider_management.aud_rce_product_variant ADD product_variant_sku varchar(1000) NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS test_spider_management.rce_seo
|
||||
(
|
||||
id INTEGER ENCODE az64
|
||||
,rce_product_id INTEGER ENCODE az64
|
||||
,rce_source_id INTEGER ENCODE az64
|
||||
,seo_title VARCHAR(2000) ENCODE lzo
|
||||
,seo_description VARCHAR(10000) ENCODE lzo
|
||||
,seo_url VARCHAR(2000) ENCODE lzo
|
||||
,seo_url_hash VARCHAR(2000) ENCODE lzo
|
||||
,seo_image VARCHAR(2000) ENCODE lzo
|
||||
,seo_price_amount BIGINT ENCODE az64
|
||||
,seo_price_currency VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_band VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_availability VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_category VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_condition VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_retailer_item_id BIGINT ENCODE az64
|
||||
,seo_product_robots VARCHAR(2000) ENCODE lzo
|
||||
,createdat TIMESTAMP WITHOUT TIME ZONE DEFAULT getdate() ENCODE az64
|
||||
,updatedat TIMESTAMP WITHOUT TIME ZONE DEFAULT getdate() ENCODE az64
|
||||
)
|
||||
DISTSTYLE AUTO
|
||||
;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS test_spider_management.aud_rce_seo
|
||||
(
|
||||
auditid INTEGER ENCODE az64
|
||||
,id INTEGER ENCODE az64
|
||||
,rce_product_id INTEGER ENCODE az64
|
||||
,rce_source_id INTEGER ENCODE az64
|
||||
,seo_title VARCHAR(2000) ENCODE lzo
|
||||
,seo_description VARCHAR(10000) ENCODE lzo
|
||||
,seo_url VARCHAR(2000) ENCODE lzo
|
||||
,seo_url_hash VARCHAR(2000) ENCODE lzo
|
||||
,seo_image VARCHAR(2000) ENCODE lzo
|
||||
,seo_price_amount BIGINT ENCODE az64
|
||||
,seo_price_currency VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_band VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_availability VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_category VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_condition VARCHAR(2000) ENCODE lzo
|
||||
,seo_product_retailer_item_id BIGINT ENCODE az64
|
||||
,seo_product_robots VARCHAR(2000) ENCODE lzo
|
||||
,createdat TIMESTAMP WITHOUT TIME ZONE ENCODE az64
|
||||
,updatedat TIMESTAMP WITHOUT TIME ZONE ENCODE az64
|
||||
,audit_createdat TIMESTAMP WITHOUT TIME ZONE DEFAULT getdate() ENCODE az64
|
||||
)
|
||||
DISTSTYLE AUTO
|
||||
;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"crawler_name": "raena_crawler_engine_hasaki",
|
||||
"crawler_schema": "raena_spider_management",
|
||||
"category_tab": "rce_category",
|
||||
"tracker_tab": "crawler_tracker_hasaki",
|
||||
"product_tab": "rce_product",
|
||||
"variant_tab": "rce_product_variant",
|
||||
"brand_tab": "rce_brand",
|
||||
"reseller_tab": "rce_reseller",
|
||||
"reseller_store_tab": "rce_reseller_store",
|
||||
"review_tab": "rce_ratings_reviews",
|
||||
"review_productmodels_tab": "rce_ratings_reviews_productmodels",
|
||||
"review_producttags_tab": "rce_ratings_reviews_producttags",
|
||||
"review_tags": "rce_tags",
|
||||
"source_tab": "rce_source",
|
||||
"seo_tab": "rce_seo",
|
||||
"product_per_category": "1000",
|
||||
"source_category": "11043145",
|
||||
"db_user": "dbadmin",
|
||||
"db_pass": "5qCif6eyY3Kmg4z",
|
||||
"database": "analytics",
|
||||
"db_host": "redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com",
|
||||
"db_port": "5439"
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
import hashlib
|
||||
import logging
|
||||
import time
|
||||
import psycopg2
|
||||
import pandas as pd
|
||||
from pyvirtualdisplay import Display
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
from hasaki_db_writer import hasaki_db_writer
|
||||
from Util import translate_text_to_english
|
||||
|
||||
###### Looger ######
|
||||
logging.basicConfig(filename="/home/ubuntu/logs/hasaki_crawler.log",
|
||||
filemode='a',
|
||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s: %(message)s',
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
level=logging.INFO)
|
||||
|
||||
|
||||
|
||||
class HasakiCategories:
|
||||
def __init__(self, config):
|
||||
try:
|
||||
logging.info("Initializing HasakiSubCategories")
|
||||
self.master_category = []
|
||||
self.config = config
|
||||
self.crawler_name = self.config.get("crawler_name")
|
||||
self.product_limit = int(self.config.get("product_per_category"))
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'),
|
||||
password=self.config.get('db_pass'), host=self.config.get('db_host'),
|
||||
port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
self.cur.execute(f"""select id from {self.config.get('crawler_schema')}.{self.config.get('source_tab')} where source_name='Hasaki'""")
|
||||
try:
|
||||
self.rce_source_id = self.cur.fetchone()[0]
|
||||
except:
|
||||
logging.info("Source tab is empty. Please check. Exiting.....")
|
||||
exit(1)
|
||||
|
||||
self.db_writer = hasaki_db_writer(config)
|
||||
|
||||
self.display = Display(visible=0, size=(800, 600))
|
||||
self.display.start()
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
def __del__(self):
|
||||
logging.info("Closing connection.....")
|
||||
self.conn.close()
|
||||
|
||||
|
||||
def start_processing(self):
|
||||
|
||||
self.crawl_and_track("HEALTH - BEAUTY", "https://hasaki.vn/danh-muc/suc-khoe-lam-dep-c3.html")
|
||||
|
||||
df = pd.DataFrame(self.master_category, columns=['Index', 'Parent', 'Name', 'Link'])
|
||||
|
||||
df = df.sort_values('Index')
|
||||
|
||||
df = df.drop_duplicates(subset='Name', keep='first')
|
||||
|
||||
self.process_category(df)
|
||||
|
||||
self.display.stop()
|
||||
|
||||
|
||||
def process_category(self, category):
|
||||
|
||||
for index, row in category.iterrows():
|
||||
data = {}
|
||||
|
||||
data['parent_category_id'] = 0
|
||||
data['rce_source_id'] = self.rce_source_id
|
||||
data['rce_source_category_id'] = 0
|
||||
data['rce_source_status'] = 1
|
||||
data['category_name'] = str(row["Name"]).replace("'","")
|
||||
data['category_page_url'] = row["Link"]
|
||||
data['category_page_url_hash'] = hashlib.md5(data['category_page_url'].encode('utf-8')).hexdigest()
|
||||
data['category_parent_name'] = str(row["Parent"]).replace("'","")
|
||||
|
||||
self.db_writer.rce_category(data)
|
||||
|
||||
|
||||
def crawl_and_track(self, parent, url_to_visit):
|
||||
self.master_category.append((0,"0", parent, url_to_visit))
|
||||
|
||||
logging.info(self.master_category)
|
||||
|
||||
cats = self.crawl_categories(parent, url_to_visit)
|
||||
time.sleep(10)
|
||||
if cats:
|
||||
for cat in cats:
|
||||
self.master_category.append((1,)+(cat))
|
||||
logging.info((1,)+(cat))
|
||||
|
||||
sub_cats1 = self.crawl_categories(cat[1], cat[2])
|
||||
time.sleep(3)
|
||||
if sub_cats1:
|
||||
for sub_cat1 in sub_cats1:
|
||||
self.master_category.append((2,) + (sub_cat1))
|
||||
logging.info((2,) + (sub_cat1))
|
||||
|
||||
sub_cats2 = self.crawl_categories(sub_cat1[1], sub_cat1[2])
|
||||
time.sleep(3)
|
||||
if sub_cats2:
|
||||
for sub_cat2 in sub_cats2:
|
||||
self.master_category.append((3,) + (sub_cat2))
|
||||
logging.info((3,) + (sub_cat2))
|
||||
|
||||
sub_cats3 = self.crawl_categories(sub_cat2[1], sub_cat2[2])
|
||||
time.sleep(3)
|
||||
if sub_cats3:
|
||||
for sub_cat3 in sub_cats3:
|
||||
self.master_category.append((4,) + (sub_cat3))
|
||||
logging.info((4,) + (sub_cat3))
|
||||
|
||||
sub_cats4 = self.crawl_categories(sub_cat3[1], sub_cat3[2])
|
||||
time.sleep(3)
|
||||
if sub_cats4:
|
||||
for sub_cat4 in sub_cats4:
|
||||
self.master_category.append((4,) + (sub_cat4))
|
||||
logging.info((5,) + (sub_cat4))
|
||||
|
||||
def crawl_categories(self, parent, url_to_visit):
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
# context = browser.new_context(
|
||||
# viewport={"width": 375, "height": 667, "isMobile": True}
|
||||
# )
|
||||
page = browser.new_page()
|
||||
|
||||
# Load the webpage
|
||||
page.goto(url_to_visit)
|
||||
# page.goto('https://hasaki.vn/danh-muc/my-pham-high-end-c1907.html')
|
||||
|
||||
page.wait_for_load_state('load')
|
||||
|
||||
container_element = page.query_selector('.block_colaps_sticky.width_common.collaps_sticky')
|
||||
|
||||
if container_element:
|
||||
item_elements = container_element.query_selector_all('.item_fillter')
|
||||
content_elements = container_element.query_selector_all('.content_fillter')
|
||||
|
||||
urls = []
|
||||
|
||||
for item_element in item_elements:
|
||||
text = item_element.query_selector('a').inner_text()
|
||||
text = translate_text_to_english(text)
|
||||
href = item_element.query_selector('a').get_attribute('href')
|
||||
urls.append((parent, text, href))
|
||||
|
||||
for content_element in content_elements:
|
||||
text = content_element.query_selector('a').inner_text()
|
||||
text = translate_text_to_english(text)
|
||||
href = content_element.query_selector('a').get_attribute('href')
|
||||
urls.append((parent, text, href))
|
||||
|
||||
# removing previously collected data
|
||||
master_urls = [item[3] for item in self.master_category]
|
||||
filtered_data = [(parent, name, url) for parent, name, url in urls if url not in master_urls]
|
||||
|
||||
return filtered_data
|
||||
|
||||
browser.close()
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
import logging
|
||||
import random
|
||||
import time
|
||||
import psycopg2
|
||||
from pyvirtualdisplay import Display
|
||||
from playwright.sync_api import sync_playwright
|
||||
from hasaki_db_writer import hasaki_db_writer
|
||||
from Util import translate_text_to_english
|
||||
|
||||
###### Looger ######
|
||||
logging.basicConfig(filename="/home/ubuntu/logs/hasaki_crawler.log",
|
||||
filemode='a',
|
||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s: %(message)s',
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
level=logging.INFO)
|
||||
|
||||
class HasakiCategoryProducts:
|
||||
def __init__(self, config):
|
||||
logging.info("Initializing HasakiCategoryProducts........")
|
||||
self.config = config
|
||||
self.crawler_name = self.config.get("crawler_name")
|
||||
self.product_limit = int(self.config.get("product_per_category"))
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'),
|
||||
password=self.config.get('db_pass'), host=self.config.get('db_host'),
|
||||
port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
self.cur.execute(
|
||||
f"""select id from {self.config.get('crawler_schema')}.{self.config.get('source_tab')} where source_name='Hasaki'""")
|
||||
try:
|
||||
self.rce_source_id = self.cur.fetchone()[0]
|
||||
except:
|
||||
logging.info("Source tab is empty. Please check. Exiting.....")
|
||||
exit(1)
|
||||
|
||||
self.db_writer = hasaki_db_writer(config)
|
||||
|
||||
self.display = Display(visible=0, size=(800, 600))
|
||||
self.display.start()
|
||||
|
||||
def __del__(self):
|
||||
logging.info("Closing connection.....")
|
||||
self.conn.close()
|
||||
|
||||
def start_processing(self):
|
||||
|
||||
logging.info("Starting crawler to collect category products.........")
|
||||
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('category_tab')}
|
||||
where rce_source_id = {self.rce_source_id} order by id
|
||||
"""
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
categories = self.cur.fetchall()
|
||||
|
||||
for category in categories:
|
||||
logging.info("================= Fetching Products for : {} ====================".format(str(category[7])))
|
||||
pages = self.get_pages(category[5])
|
||||
|
||||
time.sleep(random.randint(10,20))
|
||||
|
||||
self.get_product_list(urls = pages, categoryId = category[0])
|
||||
|
||||
self.display.stop()
|
||||
|
||||
|
||||
def find_top_search(self):
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=False)
|
||||
|
||||
page = browser.new_page()
|
||||
page.goto("https://hasaki.vn/")
|
||||
|
||||
page.wait_for_load_state('load')
|
||||
|
||||
top_search_element = page.query_selector_all(".item_top_search")
|
||||
|
||||
for element in top_search_element:
|
||||
url = element.query_selector(".top_big_search").query_selector('a').get_attribute('href').strip()
|
||||
|
||||
logging.info(url)
|
||||
browser.close()
|
||||
|
||||
|
||||
|
||||
def get_pages(self, url):
|
||||
|
||||
pages = []
|
||||
pages.append(url)
|
||||
|
||||
try:
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=False)
|
||||
|
||||
page = browser.new_page()
|
||||
page.goto(url)
|
||||
|
||||
page.wait_for_load_state('load')
|
||||
|
||||
pagination = page.query_selector(".pagination.ul-pagination").query_selector_all(".change-page")
|
||||
|
||||
for pagination in pagination:
|
||||
if str(pagination.get_attribute('data-page')).strip() != "1":
|
||||
new_url = str(pagination.get_attribute('href')).strip()
|
||||
new_url = "https://hasaki.vn" + new_url
|
||||
pages.append(new_url)
|
||||
browser.close()
|
||||
except Exception as e:
|
||||
pass
|
||||
finally:
|
||||
return pages
|
||||
|
||||
def get_product_list(self,urls, categoryId):
|
||||
|
||||
try:
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=False)
|
||||
|
||||
page = browser.new_page()
|
||||
|
||||
page_count = 1
|
||||
|
||||
logging.info("Found {} pages. Looping through URLS to get all products.".format(str(len(urls))))
|
||||
for url in urls:
|
||||
logging.info("+++++++++++++ Loading page : {} +++++++++++++++++".format(str(page_count)))
|
||||
|
||||
page.goto(url)
|
||||
|
||||
page.wait_for_load_state('load')
|
||||
|
||||
container_element = page.query_selector('.ProductGrid__grid.width_common')
|
||||
if container_element:
|
||||
item_elements = container_element.query_selector_all('.ProductGridItem__itemOuter')
|
||||
item_count = 1
|
||||
for item_element in item_elements:
|
||||
try:
|
||||
product_section = "Base Product Page " + str(page_count)
|
||||
if url in ["https://hasaki.vn/danh-muc/chong-nang-da-mat-c11.html",
|
||||
"https://hasaki.vn/danh-muc/trang-diem-moi-c24.html",
|
||||
"https://hasaki.vn/danh-muc/sua-rua-mat-c19.html",
|
||||
"https://hasaki.vn/danh-muc/kem-duong-dau-duong-c9.html"]:
|
||||
|
||||
product_section = "Top Search - Base Product Page " + str(page_count)
|
||||
|
||||
product_name = translate_text_to_english(str(item_element.query_selector('.width_common.name_sp.space_bottom_5').text_content()).strip().replace("'",""))
|
||||
product_url = str(item_element.query_selector('.v3_thumb_common_sp.relative').get_attribute('href')).strip()
|
||||
product_brand = translate_text_to_english(str(item_element.query_selector('.width_common.txt_color_1.space_bottom_3').text_content()).strip().replace("'",""))
|
||||
product_rank = item_count
|
||||
|
||||
product_image = ""
|
||||
try:
|
||||
product_image = str(item_element.query_selector('.v3_thumb_common_sp.relative').query_selector('.img_thumb.lazy.loaded').get_attribute('src')).strip().replace("'","")
|
||||
except:
|
||||
pass
|
||||
|
||||
gift = ""
|
||||
try:
|
||||
gift = translate_text_to_english(str(item_element.query_selector('.block_gift_list_item').text_content()).strip().replace("'",""))
|
||||
except:
|
||||
pass
|
||||
|
||||
product_sold = 0
|
||||
try:
|
||||
product_sold = int(str(item_element.query_selector('.item_count_by').text_content()).strip().replace('.',''))
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
self.cur.execute(f"""delete from {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')} where flag=1""")
|
||||
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')} where product_url = '{product_url}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchall()
|
||||
|
||||
if not res:
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')}(crawler_name,product_section, product_name, product_url, product_image, product_sold, product_brand, gift, product_rank, categoryid)
|
||||
values('{self.crawler_name}','{product_section}','{product_name.replace("'","")}','{product_url}','{product_image}',{product_sold},'{product_brand}','{gift}',{product_rank},{categoryId})
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
logging.info("Product already present. skipping.....")
|
||||
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
item_count += 1
|
||||
|
||||
time.sleep(random.randint(10,30))
|
||||
|
||||
page_count += 1
|
||||
|
||||
browser.close()
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
2024-04-01 11:35:40,147 root INFO: Starting Hasaki Crawler.......
|
||||
2024-04-01 11:35:40,147 root INFO: Loading config file.......
|
||||
2024-04-01 11:35:40,147 root INFO: Config file loaded.......
|
||||
2024-04-01 11:35:40,147 root INFO: {'crawler_name': 'raena_crawler_engine_hasaki', 'crawler_schema': 'raena_spider_management', 'category_tab': 'rce_category', 'tracker_tab': 'crawler_tracker_hasaki', 'product_tab': 'rce_product', 'variant_tab': 'rce_product_variant', 'brand_tab': 'rce_brand', 'reseller_tab': 'rce_reseller', 'reseller_store_tab': 'rce_reseller_store', 'review_tab': 'rce_ratings_reviews', 'review_productmodels_tab': 'rce_ratings_reviews_productmodels', 'review_producttags_tab': 'rce_ratings_reviews_producttags', 'review_tags': 'rce_tags', 'source_tab': 'rce_source', 'seo_tab': 'rce_seo', 'product_per_category': '1000', 'source_category': '11043145', 'db_user': 'dbadmin', 'db_pass': '5qCif6eyY3Kmg4z', 'database': 'analytics', 'db_host': 'redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com', 'db_port': '5439', 'crawler_main': '1', 'crawler_slave_no': ''}
|
||||
2024-04-01 11:35:40,151 root INFO: ++++++++++++++++ process tracker tab status ++++++++++++++++++++++
|
||||
2024-04-01 11:35:40,151 root INFO: [('category', 1), ('category_product', 1), ('product_info', 0)]
|
||||
2024-04-01 11:35:40,151 root INFO: Category collection completed........ Moving to collecting products ;ist of the categories.......
|
||||
2024-04-01 11:35:40,151 root INFO: Category products collection completed........ Moving to collecting product info.......
|
||||
2024-04-01 11:35:40,151 root INFO: Initializing HasakiProductInfo
|
||||
2024-04-01 11:35:43,844 root INFO: Error:
|
||||
2024-04-01 11:35:43,844 root INFO: Error occurred. Please check config file or the internal SQLLITE DB. Exiting......
|
||||
2024-04-01 11:35:47,656 root INFO: Closing connection.....
|
||||
2024-04-01 11:37:18,979 root INFO: Starting Hasaki Crawler.......
|
||||
2024-04-01 11:37:18,979 root INFO: Loading config file.......
|
||||
2024-04-01 11:37:18,979 root INFO: Config file loaded.......
|
||||
2024-04-01 11:37:18,979 root INFO: {'crawler_name': 'raena_crawler_engine_hasaki', 'crawler_schema': 'raena_spider_management', 'category_tab': 'rce_category', 'tracker_tab': 'crawler_tracker_hasaki', 'product_tab': 'rce_product', 'variant_tab': 'rce_product_variant', 'brand_tab': 'rce_brand', 'reseller_tab': 'rce_reseller', 'reseller_store_tab': 'rce_reseller_store', 'review_tab': 'rce_ratings_reviews', 'review_productmodels_tab': 'rce_ratings_reviews_productmodels', 'review_producttags_tab': 'rce_ratings_reviews_producttags', 'review_tags': 'rce_tags', 'source_tab': 'rce_source', 'seo_tab': 'rce_seo', 'product_per_category': '1000', 'source_category': '11043145', 'db_user': 'dbadmin', 'db_pass': '5qCif6eyY3Kmg4z', 'database': 'analytics', 'db_host': 'redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com', 'db_port': '5439', 'crawler_main': '1', 'crawler_slave_no': ''}
|
||||
2024-04-01 11:37:18,983 root INFO: ++++++++++++++++ process tracker tab status ++++++++++++++++++++++
|
||||
2024-04-01 11:37:18,983 root INFO: [('category', 1), ('category_product', 1), ('product_info', 0)]
|
||||
2024-04-01 11:37:18,983 root INFO: Category collection completed........ Moving to collecting products ;ist of the categories.......
|
||||
2024-04-01 11:37:18,983 root INFO: Category products collection completed........ Moving to collecting product info.......
|
||||
2024-04-01 11:37:18,983 root INFO: Initializing HasakiProductInfo
|
||||
2024-04-01 11:37:21,796 root INFO: Closing connection.....
|
||||
2024-04-01 11:37:37,443 root INFO: Starting Hasaki Crawler.......
|
||||
2024-04-01 11:37:37,443 root INFO: Loading config file.......
|
||||
2024-04-01 11:37:37,444 root INFO: Config file loaded.......
|
||||
2024-04-01 11:37:37,444 root INFO: {'crawler_name': 'raena_crawler_engine_hasaki', 'crawler_schema': 'raena_spider_management', 'category_tab': 'rce_category', 'tracker_tab': 'crawler_tracker_hasaki', 'product_tab': 'rce_product', 'variant_tab': 'rce_product_variant', 'brand_tab': 'rce_brand', 'reseller_tab': 'rce_reseller', 'reseller_store_tab': 'rce_reseller_store', 'review_tab': 'rce_ratings_reviews', 'review_productmodels_tab': 'rce_ratings_reviews_productmodels', 'review_producttags_tab': 'rce_ratings_reviews_producttags', 'review_tags': 'rce_tags', 'source_tab': 'rce_source', 'seo_tab': 'rce_seo', 'product_per_category': '1000', 'source_category': '11043145', 'db_user': 'dbadmin', 'db_pass': '5qCif6eyY3Kmg4z', 'database': 'analytics', 'db_host': 'redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com', 'db_port': '5439', 'crawler_main': '1', 'crawler_slave_no': ''}
|
||||
2024-04-01 11:37:37,447 root INFO: ++++++++++++++++ process tracker tab status ++++++++++++++++++++++
|
||||
2024-04-01 11:37:37,447 root INFO: [('category', 1), ('category_product', 1), ('product_info', 0)]
|
||||
2024-04-01 11:37:37,447 root INFO: Category collection completed........ Moving to collecting products ;ist of the categories.......
|
||||
2024-04-01 11:37:37,447 root INFO: Category products collection completed........ Moving to collecting product info.......
|
||||
2024-04-01 11:37:37,447 root INFO: Initializing HasakiProductInfo
|
||||
2024-04-01 11:37:40,69 root ERROR: [Errno 2] No such file or directory: 'Xvfb'
|
||||
2024-04-01 11:37:40,72 root INFO: Closing connection.....
|
||||
2024-04-01 11:39:24,935 root INFO: Starting Hasaki Crawler.......
|
||||
2024-04-01 11:39:24,935 root INFO: Loading config file.......
|
||||
2024-04-01 11:39:24,935 root INFO: Config file loaded.......
|
||||
2024-04-01 11:39:24,935 root INFO: {'crawler_name': 'raena_crawler_engine_hasaki', 'crawler_schema': 'raena_spider_management', 'category_tab': 'rce_category', 'tracker_tab': 'crawler_tracker_hasaki', 'product_tab': 'rce_product', 'variant_tab': 'rce_product_variant', 'brand_tab': 'rce_brand', 'reseller_tab': 'rce_reseller', 'reseller_store_tab': 'rce_reseller_store', 'review_tab': 'rce_ratings_reviews', 'review_productmodels_tab': 'rce_ratings_reviews_productmodels', 'review_producttags_tab': 'rce_ratings_reviews_producttags', 'review_tags': 'rce_tags', 'source_tab': 'rce_source', 'seo_tab': 'rce_seo', 'product_per_category': '1000', 'source_category': '11043145', 'db_user': 'dbadmin', 'db_pass': '5qCif6eyY3Kmg4z', 'database': 'analytics', 'db_host': 'redshift-cluster-1.cdqj58hfx4p7.ap-southeast-1.redshift.amazonaws.com', 'db_port': '5439', 'crawler_main': '1', 'crawler_slave_no': ''}
|
||||
2024-04-01 11:39:24,939 root INFO: ++++++++++++++++ process tracker tab status ++++++++++++++++++++++
|
||||
2024-04-01 11:39:24,939 root INFO: [('category', 1), ('category_product', 1), ('product_info', 0)]
|
||||
2024-04-01 11:39:24,939 root INFO: Category collection completed........ Moving to collecting products ;ist of the categories.......
|
||||
2024-04-01 11:39:24,939 root INFO: Category products collection completed........ Moving to collecting product info.......
|
||||
2024-04-01 11:39:24,939 root INFO: Initializing HasakiProductInfo
|
||||
2024-04-01 11:39:27,536 root ERROR: [Errno 2] No such file or directory: 'Xvfb'
|
||||
2024-04-01 11:39:27,538 root INFO: Closing connection.....
|
|
@ -0,0 +1,207 @@
|
|||
import logging
|
||||
import json
|
||||
import time
|
||||
import smtplib
|
||||
import sqlite3
|
||||
import psycopg2
|
||||
|
||||
from hasaki_categories import HasakiCategories
|
||||
from hasaki_category_products import HasakiCategoryProducts
|
||||
from hasaki_product_info import HasakiProductInfo
|
||||
from email.message import EmailMessage
|
||||
|
||||
config = {}
|
||||
|
||||
###### Looger ######
|
||||
logging.basicConfig(filename="/home/ubuntu/logs/hasaki_crawler.log",
|
||||
filemode='a',
|
||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s: %(message)s',
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
level=logging.INFO)
|
||||
|
||||
|
||||
|
||||
def main(cur):
|
||||
|
||||
cur.execute(f"""select flag from process_tracker where process = 'category'""")
|
||||
cat_flags = cur.fetchone()
|
||||
if cat_flags[0]==0:
|
||||
hasaki_categories = HasakiCategories(config)
|
||||
hasaki_categories.start_processing()
|
||||
cur.execute(f"""update process_tracker set flag = 1 where process = 'category'""")
|
||||
|
||||
logging.info("Category collection completed........ Moving to collecting products list of the categories.......")
|
||||
|
||||
#time.sleep(60)
|
||||
|
||||
cur.execute(f"""select flag from process_tracker where process = 'category_product'""")
|
||||
cat_pro_flags = cur.fetchone()
|
||||
if cat_pro_flags[0] == 0:
|
||||
hasaki_category_products = HasakiCategoryProducts(config)
|
||||
hasaki_category_products.start_processing()
|
||||
cur.execute(f"""update process_tracker set flag = 1 where process = 'category_product'""")
|
||||
|
||||
logging.info("Category products collection completed........ Moving to collecting product info.......")
|
||||
|
||||
#time.sleep(60)
|
||||
|
||||
cur.execute(f"""select flag from process_tracker where process = 'product_info'""")
|
||||
prod_flag = cur.fetchone()
|
||||
if prod_flag[0] == 0:
|
||||
hasaki_products = HasakiProductInfo(config)
|
||||
hasaki_products.start_processing()
|
||||
cur.execute(f"""update process_tracker set flag = 1 where process = 'product_info'""")
|
||||
else:
|
||||
cur.execute(f"""update process_tracker set flag = 0 where process = 'category'""")
|
||||
cur.execute(f"""update process_tracker set flag = 0 where process = 'category_product'""")
|
||||
cur.execute(f"""update process_tracker set flag = 0 where process = 'product_info'""")
|
||||
|
||||
logging.info("Product info collection done. Stopping........")
|
||||
|
||||
|
||||
|
||||
|
||||
def send_mail(msg):
|
||||
try:
|
||||
EMAIL_ADDRESS = "AKIAR2YL57QC6NITTJN5"
|
||||
EMAIL_PASSWORD = "BAs9W772KNxLL1xnMzYhdIkpflQ8H+KP0Zbl8dphQZWh"
|
||||
From = 'data_reporting@raenabeauty.com'
|
||||
#To = 'shariar@raenabeauty.com, data_reporting@raenabeauty.com'
|
||||
To = 'shariar@raenabeauty.com'
|
||||
|
||||
html = f'''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div style="background-color:#eee;padding:10px 20px;">
|
||||
<h2 style="font-family:Georgia, 'Times New Roman', Times, serif;color#454349;">Hasaki Crawler Status</h2>
|
||||
</div>
|
||||
<div style="padding:20px 0px">
|
||||
<div style="height: 800px;width:800px">
|
||||
{msg}
|
||||
<div style="text-align:Left;">
|
||||
<p>This is system generated mail. Please do not reply.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
'''
|
||||
|
||||
msg = EmailMessage()
|
||||
msg['Subject'] = 'Hasaki Crawler Status'
|
||||
msg['From'] = From
|
||||
msg['To'] = To
|
||||
msg.set_content(html, subtype='html')
|
||||
|
||||
with smtplib.SMTP('email-smtp.ap-southeast-1.amazonaws.com', 587) as smtp:
|
||||
smtp.ehlo()
|
||||
smtp.starttls()
|
||||
smtp.login(EMAIL_ADDRESS, EMAIL_PASSWORD)
|
||||
smtp.send_message(msg)
|
||||
except Exception as e:
|
||||
logging.info("Error while sending mail: {}".format(e))
|
||||
|
||||
def init_tracker_tab(cur):
|
||||
cur.execute(f"""CREATE TABLE IF NOT EXISTS process_tracker (
|
||||
process TEXT,
|
||||
flag int
|
||||
)""")
|
||||
|
||||
# logging.info("++++++++++++++++++++++++++++++++++++++")
|
||||
# cur.execute(f"""select * from process_tracker""")
|
||||
# logging.info(cur.fetchall())
|
||||
|
||||
cur.execute(f"""select * from process_tracker where process = 'category'""")
|
||||
if cur.fetchone() is None:
|
||||
cur.execute(f"""insert into process_tracker (process, flag) values('category', 0)""")
|
||||
|
||||
cur.execute(f"""select * from process_tracker where process = 'category_product'""")
|
||||
if cur.fetchone() is None:
|
||||
cur.execute(f"""insert into process_tracker (process, flag) values('category_product', 0)""")
|
||||
|
||||
cur.execute(f"""select * from process_tracker where process = 'product_info'""")
|
||||
if cur.fetchone() is None:
|
||||
cur.execute(f"""insert into process_tracker (process, flag) values('product_info', 0)""")
|
||||
|
||||
logging.info("++++++++++++++++ process tracker tab status ++++++++++++++++++++++")
|
||||
cur.execute(f"""select * from process_tracker""")
|
||||
logging.info(cur.fetchall())
|
||||
|
||||
|
||||
def get_status():
|
||||
conn = psycopg2.connect(database=config.get('database'), user=config.get('db_user'),
|
||||
password=config.get('db_pass'), host=config.get('db_host'),
|
||||
port=config.get('db_port'))
|
||||
|
||||
conn.autocommit = True
|
||||
cur = conn.cursor()
|
||||
|
||||
cur.execute(
|
||||
f"""select count(1) from raena_spider_management.rce_category where rce_source_id = (select id from raena_spider_management.rce_source where source_name = 'Hasaki')""")
|
||||
cat_count = cur.fetchone()[0]
|
||||
|
||||
cur.execute(f"""select count(1) from raena_spider_management.crawler_tracker_hasaki""")
|
||||
product_total = cur.fetchone()[0]
|
||||
|
||||
cur.execute(f"""select count(1) from raena_spider_management.crawler_tracker_hasaki where flag = 1""")
|
||||
product_successful = cur.fetchone()[0]
|
||||
|
||||
cur.execute(f"""select count(1) from raena_spider_management.crawler_tracker_hasaki where flag = 0""")
|
||||
product_failed = cur.fetchone()[0]
|
||||
|
||||
msg = f"""
|
||||
<p><b>Hasaki Crawler run is completed. Please check the status below,</b></p>
|
||||
<br>
|
||||
<ul style="list-style-type:disc">
|
||||
<li>Total Collected categories: <b>{cat_count}</b></li>
|
||||
<li>Total Collected products for categories: <b>{product_total}</b></li>
|
||||
<li>Total successfully collected products: <b {'style="color: green;"' if product_successful == product_total else 'style="color: red;"'}>{product_successful}</b></li>
|
||||
<li>Total failed to collect products: <b {'style="color: red;"' if product_failed > 0 else 'style="color: green;"'}>{product_failed}</b></li>
|
||||
</ul>
|
||||
"""
|
||||
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
logging.info("Starting Hasaki Crawler.......")
|
||||
try:
|
||||
logging.info("Loading config file.......")
|
||||
with open("conf.json", "r") as jsonfile:
|
||||
config = json.load(jsonfile)
|
||||
logging.info("Config file loaded.......")
|
||||
logging.info(config)
|
||||
|
||||
conn = sqlite3.connect('process_tracker.db')
|
||||
conn.isolation_level = None
|
||||
|
||||
cur = conn.cursor()
|
||||
|
||||
# cur.execute(f"""update process_tracker set flag = 1 where process = 'category'""")
|
||||
# cur.execute(f"""update process_tracker set flag = 1 where process = 'category_product'""")
|
||||
# cur.execute(f"""update process_tracker set flag = 0 where process = 'product_info'""")
|
||||
|
||||
init_tracker_tab(cur)
|
||||
|
||||
try:
|
||||
main(cur)
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
||||
msg = get_status()
|
||||
|
||||
send_mail(msg)
|
||||
|
||||
except Exception as e:
|
||||
logging.info("Error: ".format(e))
|
||||
logging.info("Error occurred. Please check config file or the internal SQLLITE DB. Exiting......")
|
||||
send_mail("Error occurred. Please check config file or the internal SQLLITE DB.")
|
||||
exit(1)
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Hasaki Crawler Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=1m
|
||||
User=ubuntu
|
||||
WorkingDirectory=/home/ubuntu/raena-crawler-engine/hasaki_crawler_engine
|
||||
ExecStart=/bin/bash /home/ubuntu/raena-crawler-engine/hasaki_crawler_engine/run_hasaki.sh
|
||||
TimeoutStopSec=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,757 @@
|
|||
import logging
|
||||
import psycopg2
|
||||
|
||||
###### Looger ######
|
||||
logging.basicConfig(filename="/home/ubuntu/logs/hasaki_crawler.log",
|
||||
filemode='a',
|
||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s: %(message)s',
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
level=logging.INFO)
|
||||
|
||||
class hasaki_db_writer:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'), password=self.config.get('db_pass'), host=self.config.get('db_host'), port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
|
||||
def __del__(self):
|
||||
logging.info("Closing connection.....")
|
||||
self.conn.close()
|
||||
|
||||
def get_id(self, schema, table):
|
||||
sql = f"""
|
||||
select max(id) from {schema}.{table}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
if res[0] != None:
|
||||
id = res[0] + 1
|
||||
else:
|
||||
id = 1
|
||||
|
||||
return id
|
||||
|
||||
def get_aud_id(self, schema, table):
|
||||
sql = f"""
|
||||
select max(auditid) from {schema}.{table}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
if res[0] != None:
|
||||
id = res[0] + 1
|
||||
else:
|
||||
id = 1
|
||||
|
||||
return id
|
||||
|
||||
def rce_category(self, data):
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('category_tab')} where category_name = '{data['category_name']}' and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('category_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('category_tab'))
|
||||
|
||||
|
||||
if not res:
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('category_tab')}(id,parent_category_id,rce_source_id,rce_source_category_id,rce_source_status,category_page_url,category_page_url_hash,category_name,category_parent_name)
|
||||
values({id_main},{data['parent_category_id']},{data['rce_source_id']},{data['rce_source_category_id']},{data['rce_source_status']},'{data['category_page_url']}','{data['category_page_url_hash']}','{data['category_name']}','{data['category_parent_name']}')
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('category_tab')}(auditid,id,parent_category_id,rce_source_id,rce_source_category_id,rce_source_status,category_page_url,category_page_url_hash,category_name,createdat,updatedat,category_parent_name)
|
||||
select {id_aud},id,parent_category_id,rce_source_id,rce_source_category_id,rce_source_status,category_page_url,category_page_url_hash,category_name,createdat,updatedat,category_parent_name from {self.config.get('crawler_schema')}.{self.config.get('category_tab')}
|
||||
where category_name = '{data['category_name']}' and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
if str(data['parent_category_id'])==str(res[1]) and str(data['rce_source_category_id'])==str(res[3]) and str(data['category_name']) == str(res[7]) and \
|
||||
str(data['category_page_url'])==str(res[5]) and str(data['category_parent_name'])==str(res[12]):
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('category_tab')} set updatedat=GETDATE()
|
||||
where category_name = '{data['category_name']}' and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('category_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('category_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('category_tab')} set parent_category_id={data['parent_category_id']}, rce_source_category_id = {data['rce_source_category_id']},
|
||||
category_name = '{data['category_name']}', category_page_url = '{data['category_page_url']}', category_page_url_hash = '{data['category_page_url_hash']}', category_parent_name = '{data['category_parent_name']}',
|
||||
updatedat=GETDATE() where category_name = '{data['category_name']}' and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('category_tab')+"(auditid,id,parent_category_id,rce_source_id," \
|
||||
"rce_source_category_id,rce_source_status,category_page_url,category_page_url_hash,category_name,createdat,updatedat,category_parent_name) " \
|
||||
"select "+str(id_aud)+", id,parent_category_id,rce_source_id,rce_source_category_id,rce_source_status,category_page_url,category_page_url_hash," \
|
||||
"category_name,createdat,updatedat,category_parent_name from "+self.config.get('crawler_schema')+"."+self.config.get('category_tab')+" " \
|
||||
"where category_name = '"+ str(res[7])+"'"
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_product(self, data):
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('product_tab')}
|
||||
where rce_source_product_id = {data['rce_source_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('product_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('product_tab'))
|
||||
|
||||
if not res:
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('product_tab')}(id,rce_source_product_id,rce_source_product_status,product_page_url,
|
||||
product_page_url_hash,rce_category_id,rce_brand_id,rce_store_id,rce_source_product_name,product_images,product_description,product_sold_total,product_sold,
|
||||
product_price_min,product_price_min_before_discount,product_price_max,product_price_max_before_discount,ratings,product_section,
|
||||
rce_source_id,countryoforigin,rank,ships_from) values({id_main},{data['rce_source_product_id']},{data['rce_source_product_status']},'{data['product_page_url']}',
|
||||
'{data['product_page_url_hash']}',{data['rce_category_id']},{data['rce_brand_id']},{data['rce_store_id']},'{data['rce_source_product_name']}','{data['product_images']}','{data['product_description']}',{data['product_sold_total']},{data['product_sold']},
|
||||
{data['product_price_min']},{data['product_price_min_before_discount']},{data['product_price_max']},{data['product_price_max_before_discount']},{data['ratings']},'{data['product_section']}',
|
||||
{data['rce_source_id']},'{data['countryoforigin']}',{data['rank']},'{data['ships_from']}')
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('product_tab')}(auditid,id,rce_source_product_id,rce_source_product_status,product_page_url,product_page_url_hash,
|
||||
rce_category_id,rce_brand_id,rce_store_id,rce_source_product_name,product_images,product_description,product_sold_total,product_sold,product_price_min,product_price_min_before_discount,
|
||||
product_price_max,product_price_max_before_discount,ratings,ships_from,product_section,createdat,updatedat,rce_source_id,countryoforigin,rank)
|
||||
select {id_aud},id,rce_source_product_id,rce_source_product_status,product_page_url,product_page_url_hash,
|
||||
rce_category_id,rce_brand_id,rce_store_id,rce_source_product_name,product_images,product_description,product_sold_total,product_sold,product_price_min,product_price_min_before_discount,
|
||||
product_price_max,product_price_max_before_discount,ratings,ships_from,product_section,createdat,updatedat,rce_source_id,countryoforigin,rank from {self.config.get('crawler_schema')}.{self.config.get('product_tab')}
|
||||
where rce_source_product_id = {data['rce_source_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
if str(data['rce_source_product_id'])==str(res[1]) and str(data['rce_source_product_status'])==str(res[2]) and \
|
||||
str(data['product_page_url'])==str(res[3]) and str(data['product_page_url_hash'])==str(res[4]) and str(data['rce_category_id'])==str(res[5]) and \
|
||||
str(data['rce_brand_id'])==str(res[6]) and str(data['rce_store_id'])==str(res[7]) and str(data['rce_source_product_name'])==str(res[8]) and \
|
||||
str(data['product_images'])==str(res[9]) and str(data['product_sold_total'])==str(res[11]) and \
|
||||
str(data['product_sold'])==str(res[12]) and str(data['product_price_min'])==str(res[13]) and str(data['product_price_min_before_discount'])==str(res[14]) and \
|
||||
str(data['product_price_max'])==str(res[15]) and str(data['product_price_max_before_discount'])==str(res[16]) and str(data['ratings'])==str(res[17]) \
|
||||
and str(data['ships_from'])==str(res[18]) and str(data['rce_source_id'])==str(res[21]) \
|
||||
and str(data['product_section'])==str(res[22]) and str(data['countryoforigin'])==str(res[23])\
|
||||
and str(data['rank'])==str(res[24]):
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('product_tab')} set updatedat=GETDATE()
|
||||
where rce_source_product_id = {data['rce_source_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('product_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('product_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('product_tab')} set rce_source_product_id = {data['rce_source_product_id']}, rce_source_product_status={data['rce_source_product_status']}, product_page_url='{data['product_page_url']}',
|
||||
product_page_url_hash='{data['product_page_url_hash']}', rce_category_id={data['rce_category_id']}, rce_brand_id={data['rce_brand_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_sold_total={data['product_sold_total']},
|
||||
product_sold={data['product_sold']}, product_price_min='{data['product_price_min']}',product_price_min_before_discount='{data['product_price_min_before_discount']}',
|
||||
product_price_max='{data['product_price_max']}', product_price_max_before_discount='{data['product_price_max_before_discount']}', ratings={data['ratings']},
|
||||
ships_from='{data['ships_from']}',product_section='{data['product_section']}',countryoforigin='{data['countryoforigin']}',rank={data['rank']}, updatedat=GETDATE()
|
||||
where rce_source_product_id = {data['rce_source_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('product_tab')}(auditid,id,rce_source_product_id,rce_source_product_status,product_page_url,product_page_url_hash,
|
||||
rce_category_id,rce_brand_id,rce_store_id,rce_source_product_name,product_images,product_description,product_sold_total,product_sold,product_price_min,product_price_min_before_discount,
|
||||
product_price_max,product_price_max_before_discount,ratings,ships_from,product_section,createdat,updatedat,rce_source_id,countryoforigin,rank)
|
||||
select {id_aud},id,rce_source_product_id,rce_source_product_status,product_page_url,product_page_url_hash,
|
||||
rce_category_id,rce_brand_id,rce_store_id,rce_source_product_name,product_images,product_description,product_sold_total,product_sold,product_price_min,product_price_min_before_discount,
|
||||
product_price_max,product_price_max_before_discount,ratings,ships_from,product_section,createdat,updatedat,rce_source_id,countryoforigin,rank from {self.config.get('crawler_schema')}.{self.config.get('product_tab')}
|
||||
where rce_source_product_id = {data['rce_source_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
|
||||
def rce_product_variant(self, data):
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('variant_tab')} where
|
||||
rce_source_variant_id = {data['rce_source_variant_id']} and rce_product_id = {data['rce_product_id']}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('variant_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('variant_tab'))
|
||||
|
||||
if not res:
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('variant_tab')}(id,rce_source_variant_id,rce_product_id,product_variant_name,product_variant_price,product_variant_price_before_discount,product_variant_stock,product_variant_sku)
|
||||
values({id_main},{data['rce_source_variant_id']},{data['rce_product_id']},'{data['product_variant_name']}',{data['product_variant_price']},{data['product_variant_price_before_discount']},{data['product_variant_stock']},'{data['product_variant_sku']}')
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('variant_tab')}(auditid,id,rce_source_variant_id,rce_product_id,product_variant_name,product_variant_price,product_variant_price_before_discount,product_variant_stock,product_variant_sku,createdat,updatedat)
|
||||
select {id_aud},id,rce_source_variant_id,rce_product_id,product_variant_name,product_variant_price,product_variant_price_before_discount,product_variant_stock,product_variant_sku,createdat,updatedat
|
||||
from {self.config.get('crawler_schema')}.{self.config.get('variant_tab')} where rce_source_variant_id = {data['rce_source_variant_id']} and rce_product_id = {data['rce_product_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
if str(data['rce_source_variant_id'])==str(res[1]) and str(data['rce_product_id'])==str(res[2]) and str(data['product_variant_name'])==str(res[3]) and \
|
||||
str(data['product_variant_price'])==str(res[4]) and str(data['product_variant_price_before_discount'])==str(res[5]) and str(data['product_variant_stock'])==str(res[6])\
|
||||
and str(data['product_variant_sku'])==str(res[9]):
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('variant_tab')} set updatedat=GETDATE()
|
||||
where rce_source_variant_id = {data['rce_source_variant_id']} and rce_product_id = {data['rce_product_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.aud_{self.config.get('variant_tab')} a set updatedat=b.updatedat
|
||||
from {self.config.get('crawler_schema')}.{self.config.get('variant_tab')} b where a.id=b.id and b.id = {res[0]}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('variant_tab')} set rce_source_variant_id={data['rce_source_variant_id']},
|
||||
rce_product_id={data['rce_product_id']},product_variant_name='{data['product_variant_name']}',product_variant_price={data['product_variant_price']},
|
||||
product_variant_price_before_discount={data['product_variant_price_before_discount']},product_variant_stock={data['product_variant_stock']},
|
||||
product_variant_sku={data['product_variant_sku']}, updatedat=GETDATE()
|
||||
where rce_source_variant_id = {data['rce_source_variant_id']} and rce_product_id = {data['rce_product_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('variant_tab')}(auditid,id,rce_source_variant_id,rce_product_id,product_variant_name,product_variant_price,product_variant_price_before_discount,product_variant_stock,product_variant_sku,createdat,updatedat)
|
||||
select {id_aud},id,rce_source_variant_id,rce_product_id,product_variant_name,product_variant_price,product_variant_price_before_discount,product_variant_stock,product_variant_sku,createdat,updatedat
|
||||
from {self.config.get('crawler_schema')}.{self.config.get('variant_tab')} where rce_source_variant_id = {data['rce_source_variant_id']} and rce_product_id = {data['rce_product_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
|
||||
def rce_brand(self, data):
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('brand_tab')} where rce_source_brand_id = {data['rce_source_brand_id']}
|
||||
and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('brand_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('brand_tab'))
|
||||
|
||||
if not res:
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('brand_tab')}(id,rce_source_id,rce_source_brand_id,rce_source_brand_status,brand_page_url,brand_page_url_hash,brand_name,brand_following,brand_rating)
|
||||
values({id_main},{data['rce_source_id']},{data['rce_source_brand_id']},{data['rce_source_brand_status']},'{data['brand_page_url']}','{data['brand_page_url_hash']}','{data['brand_name']}',{data['brand_following']},{data['brand_rating']})
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('brand_tab')}(auditid,id,rce_source_id,rce_source_brand_id,rce_source_brand_status,brand_page_url,brand_page_url_hash,brand_name,brand_following,brand_rating,createdat,updatedat)
|
||||
select {id_aud}, id,rce_source_id,rce_source_brand_id,rce_source_brand_status,brand_page_url,brand_page_url_hash,brand_name,brand_following,brand_rating,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('brand_tab')}
|
||||
where rce_source_brand_id={data['rce_source_brand_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if str(data['rce_source_id'])==str(res[1]) and str(data['rce_source_brand_status'])==str(res[3]) and str(data['brand_page_url'])==str(res[4]) and \
|
||||
str(data['brand_page_url_hash'])==str(res[5]) and str(data['brand_name'])==str(res[6]) and str(data['rce_source_brand_id'])==str(res[2]):
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('brand_tab')} set updatedat=GETDATE() where rce_source_brand_id={data['rce_source_brand_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.aud_{self.config.get('brand_tab')} a set updatedat=b.updatedat
|
||||
from {self.config.get('crawler_schema')}.{self.config.get('brand_tab')} b where a.id=b.id and b.id = {res[0]} and
|
||||
b.rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('brand_tab')} set rce_source_id={data['rce_source_id']}, rce_source_brand_id={data['rce_source_brand_id']},
|
||||
rce_source_brand_status={data['rce_source_brand_status']}, brand_page_url='{data['brand_page_url']}', brand_page_url_hash='{data['brand_page_url_hash']}',
|
||||
brand_name='{data['brand_name']}', brand_following={data['brand_following']}, brand_rating={data['brand_rating']}, updatedat=GETDATE() where rce_source_brand_id={data['rce_source_brand_id']}
|
||||
and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('brand_tab')}(auditid,id,rce_source_id,rce_source_brand_id,rce_source_brand_status,brand_page_url,brand_page_url_hash,brand_name,brand_following,brand_rating,createdat,updatedat)
|
||||
select {id_aud}, id,rce_source_id,rce_source_brand_id,rce_source_brand_status,brand_page_url,brand_page_url_hash,brand_name,brand_following,brand_rating,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('brand_tab')}
|
||||
where rce_source_brand_id={data['rce_source_brand_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_reseller(self, data):
|
||||
data['reseller_name'] = data['reseller_name']
|
||||
|
||||
sql = "select * from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" where reseller_name = '"+str(data['reseller_name'])+"'"
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('reseller_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('reseller_tab'))
|
||||
|
||||
|
||||
if not res:
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('reseller_tab')}(id,rce_source_id,rce_source_reseller_status,reseller_name)
|
||||
values({id_main},'{data['rce_source_id']}','{data['rce_source_reseller_status']}','{data['reseller_name']}')
|
||||
"""
|
||||
#logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('reseller_tab')}(auditid,id,rce_source_id,rce_source_reseller_status,reseller_name,createdat,updatedat)
|
||||
select {id_aud}, id,rce_source_id,rce_source_reseller_status,reseller_name,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('reseller_tab')}
|
||||
where reseller_name='{data['reseller_name']}'
|
||||
"""
|
||||
#logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if str(data['rce_source_reseller_status'])==str(res[3]) and str(data['reseller_name'])==str(res[4]):
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" set updatedat=GETDATE() " \
|
||||
"where reseller_name = '"+ str(res[4])+"'"
|
||||
#logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('reseller_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
#logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" set rce_source_id="+str(data['rce_source_id'])+", " \
|
||||
"rce_source_reseller_status="+str(data['rce_source_reseller_status'])+", reseller_name='"+str(data['reseller_name'])+"', reseller_average_rating=" \
|
||||
"'"+str(data['reseller_average_rating'])+"',reseller_description='"+str(data['reseller_description'])+"', updatedat=GETDATE() where reseller_name = '"+ str(res[4])+"'"
|
||||
#logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('reseller_tab')+" (auditid,id,rce_source_id,rce_source_reseller_status," \
|
||||
"reseller_name,reseller_average_rating,reseller_description,createdat,updatedat) select "+str(id_aud)+", id,rce_source_id,rce_source_reseller_status," \
|
||||
"reseller_name,reseller_average_rating,reseller_description,createdat,updatedat from " \
|
||||
""+self.config.get('crawler_schema')+"."+self.config.get('reseller_tab')+" where reseller_name='"+str(res[4])+"'"
|
||||
#logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_reseller_store(self, data):
|
||||
|
||||
data['store_page_url'] = data['store_page_url'].replace("'","''")
|
||||
|
||||
sql = "select * from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" where store_page_url = '"+str(data['store_page_url'])+"'"
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('reseller_store_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('reseller_store_tab'))
|
||||
|
||||
if not res:
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('reseller_store_tab')}(id,rce_source_store_status,store_page_url,store_page_url_hash,rce_reseller_id,rce_source_id)
|
||||
values({id_main},'{data['rce_source_store_status']}','{data['store_page_url']}','{data['store_page_url_hash']}',{data['rce_reseller_id']},{data['rce_source_id']})
|
||||
"""
|
||||
#logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('reseller_store_tab')}(auditid,id,rce_source_store_status,store_page_url,store_page_url_hash,rce_reseller_id,createdat,updatedat,rce_source_id)
|
||||
select {id_aud}, id,rce_source_store_status,store_page_url,store_page_url_hash,rce_reseller_id,createdat,updatedat,rce_source_id from {self.config.get('crawler_schema')}.{self.config.get('reseller_store_tab')}
|
||||
where store_page_url= '{data['store_page_url']}'
|
||||
"""
|
||||
#logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if str(data['rce_source_store_status'])==str(res[2]) and str(data['store_page_url'])==str(res[3]) and \
|
||||
str(data['store_page_url_hash'])==str(res[4]) and \
|
||||
str(data['rce_reseller_id'])==str(res[6]) and str(data['rce_source_id'])==str(res[9]):
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" set updatedat=GETDATE() " \
|
||||
"where store_page_url = '"+ str(res[3])+"'"
|
||||
#logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('reseller_store_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
#logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" set " \
|
||||
"rce_source_store_status="+str(data['rce_source_store_status'])+", store_page_url='"+str(data['store_page_url'])+"', store_page_url_hash=" \
|
||||
"'"+str(data['store_page_url_hash'])+"',store_location='"+str(data['store_location'])+"', rce_reseller_id="+str(data['rce_reseller_id'])+", " \
|
||||
"updatedat=GETDATE(), rce_source_id="+str(data['rce_source_id'])+" where store_page_url = '"+ str(res[3])+"'"
|
||||
#logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('reseller_store_tab')+" (auditid,id,rce_source_store_status," \
|
||||
"store_page_url,store_page_url_hash,store_location,rce_reseller_id,createdat,updatedat,rce_source_id) select "+id_aud+", id,rce_source_store_status," \
|
||||
"store_page_url,store_page_url_hash,store_location,rce_reseller_id,createdat,updatedat,rce_source_id from " \
|
||||
""+self.config.get('crawler_schema')+"."+self.config.get('reseller_store_tab')+" where store_page_url='"+str(res[3])+"'"
|
||||
#logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_ratings_reviews(self, data):
|
||||
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('review_tab')}
|
||||
where rce_product_id = {data['rce_product_id']} and username = '{data['username']}'
|
||||
"""
|
||||
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
data['username'] = data['username'].replace("'","")
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('review_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('review_tab'))
|
||||
|
||||
if not res:
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('review_tab')}(id,rce_product_id,username,review,img_url,review_like_count,user_tier,shop_id,video_url,rating)
|
||||
values({id_main},{data['rce_product_id']},'{data['username']}','{data['review']}','{data['img_url']}',{data['review_like_count']},'{data['user_tier']}',{data['shop_id']},'{data['video_url']}',{data['rating']})
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('review_tab')}(auditid,id,rce_product_id,username,review,img_url,review_like_count,user_tier,shop_id,video_url,rating,createdat,updatedat)
|
||||
select {id_aud},id,rce_product_id,username,review,img_url,review_like_count,user_tier,shop_id,video_url,rating,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('review_tab')}
|
||||
where rce_product_id = {data['rce_product_id']} and username = '{data['username']}'
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if str(data['rce_product_id'])==str(res[1]) and str(data['username'])==str(res[2]) and str(data['review'])==str(res[3]) and \
|
||||
str(data['img_url'])==str(res[4]) and str(data['review_like_count'])==str(res[5]) and str(data['user_tier'])==str(res[6]) and \
|
||||
str(data['shop_id'])==str(res[7]) and str(data['video_url'])==str(res[8]) and str(data['rating'])==str(res[9]):
|
||||
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_tab')+" set updatedat=GETDATE() " \
|
||||
"where rce_product_id = "+ str(res[1])+" and username ='"+res[2]+"'"
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_tab')+" a set updatedat=b.updatedat " \
|
||||
"from "+self.config.get('crawler_schema')+"."+self.config.get('review_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_tab')+" set rce_product_id="+str(data['rce_product_id'])+", " \
|
||||
"username='"+str(data['username'])+"', review='"+str(data['review'])+"', img_url=" \
|
||||
"'"+str(data['img_url'])+"',review_like_count="+str(data['review_like_count'])+", user_tier='"+str(data['user_tier'])+"', " \
|
||||
"shop_id="+str(data['shop_id'])+", video_url='"+str(data['video_url'])+"', rating='"+str(data['rating'])+"', updatedat=GETDATE() " \
|
||||
"where rce_product_id = "+ str(res[1])+" and username ='"+str(data['username'])+"'"
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('review_tab')}(auditid,id,rce_product_id,username,review,img_url,review_like_count,user_tier,shop_id,video_url,rating,createdat,updatedat)
|
||||
select {id_aud},id,rce_product_id,username,review,img_url,review_like_count,user_tier,shop_id,video_url,rating,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('review_tab')}
|
||||
where rce_product_id = {data['rce_product_id']} and username = '{data['username']}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
def rce_seo(self, data):
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('seo_tab')}
|
||||
where rce_product_id = {data['rce_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
|
||||
id_main = self.get_id(self.config.get('crawler_schema'), self.config.get('seo_tab'))
|
||||
id_aud = self.get_aud_id(self.config.get('crawler_schema'), "aud_" + self.config.get('seo_tab'))
|
||||
|
||||
if not res:
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.{self.config.get('seo_tab')}(id,rce_product_id,rce_source_id,seo_title,seo_description,seo_url,seo_url_hash,seo_image,seo_price_amount,seo_price_currency,seo_product_band,seo_product_availability,seo_product_category,seo_product_condition,seo_product_retailer_item_id,seo_product_robots)
|
||||
values({id_main},{data['rce_product_id']},{data['rce_source_id']},'{data['seo_title']}','{data['seo_description']}','{data['seo_url']}','{data['seo_url_hash']}','{data['seo_image']}',{data['seo_price_amount']},'{data['seo_price_currency']}','{data['seo_product_band']}','{data['seo_product_availability']}','{data['seo_product_category']}',
|
||||
'{data['seo_product_condition']}',{data['seo_product_retailer_item_id']},'{data['seo_product_robots']}')
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('seo_tab')}(auditid,id,rce_product_id,rce_source_id,seo_title,seo_description,seo_url,seo_url_hash,seo_image,seo_price_amount,seo_price_currency,seo_product_band,seo_product_availability,seo_product_category,seo_product_condition,seo_product_retailer_item_id,seo_product_robots,createdat,updatedat)
|
||||
select {id_aud},id,rce_product_id,rce_source_id,seo_title,seo_description,seo_url,seo_url_hash,seo_image,seo_price_amount,seo_price_currency,seo_product_band,seo_product_availability,seo_product_category,seo_product_condition,seo_product_retailer_item_id,seo_product_robots,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('seo_tab')}
|
||||
where rce_product_id = {data['rce_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
else:
|
||||
|
||||
if (str(data['rce_product_id']) == str(res[1]) and str(data['rce_source_id']) == str(res[2]) and str(data['seo_title']) == str(res[3]) and \
|
||||
str(data['seo_description']) == str(res[4]) and str(data['seo_url']) == str(res[5]) and str(data['seo_url_hash']) == str(res[6]) and \
|
||||
str(data['seo_image']) == str(res[7]) and str(data['seo_price_amount']) == str(res[8]) and str(data['seo_price_currency']) == str(res[9]) and \
|
||||
str(data['seo_product_band']) == str(res[10])) and str(data['seo_product_availability']) == str(res[11]) and str(data['seo_product_category']) == str(res[12]) and \
|
||||
str(data['seo_product_condition']) == str(res[13]) and str(data['seo_product_retailer_item_id']) == str(res[14]) and str(data['seo_product_robots']) == str(res[15]):
|
||||
|
||||
sql = "update " + self.config.get('crawler_schema') + "." + self.config.get('seo_tab') + " set updatedat=GETDATE() " \
|
||||
"where rce_product_id = " + str(res[1]) + " and rce_source_id =" + str(data['rce_source_id'])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = "update " + self.config.get('crawler_schema') + ".aud_" + self.config.get('seo_tab') + " a set updatedat=b.updatedat " \
|
||||
"from " + self.config.get('crawler_schema') + "." + self.config.get('seo_tab') + " b where a.id=b.id and b.id = " + str(res[0])
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
else:
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('seo_tab')} set rce_product_id={data['rce_product_id']}, rce_source_id={data['rce_source_id']}, seo_title='{data['seo_title']}', seo_description='{data['seo_description']}',
|
||||
seo_url='{data['seo_url']}', seo_url_hash='{data['seo_url_hash']}', seo_image='{data['seo_image']}', seo_price_amount='{data['seo_price_amount']}', seo_price_currency='{data['seo_price_currency']}', seo_product_band='{data['seo_product_band']}',
|
||||
seo_product_availability='{data['seo_product_availability']}', seo_product_category='{data['seo_product_category']}', seo_product_condition='{data['seo_product_condition']}', seo_product_retailer_item_id={data['seo_product_retailer_item_id']},
|
||||
seo_product_robots='{data['seo_product_robots']}' where rce_product_id = {data['rce_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
sql = f"""
|
||||
insert into {self.config.get('crawler_schema')}.aud_{self.config.get('seo_tab')}(auditid,id,rce_product_id,rce_source_id,seo_title,seo_description,seo_url,seo_url_hash,seo_image,seo_price_amount,seo_price_currency,seo_product_band,seo_product_availability,seo_product_category,seo_product_condition,seo_product_retailer_item_id,seo_product_robots,createdat,updatedat)
|
||||
select {id_aud},id,rce_product_id,rce_source_id,seo_title,seo_description,seo_url,seo_url_hash,seo_image,seo_price_amount,seo_price_currency,seo_product_band,seo_product_availability,seo_product_category,seo_product_condition,seo_product_retailer_item_id,seo_product_robots,createdat,updatedat from {self.config.get('crawler_schema')}.{self.config.get('seo_tab')}
|
||||
where rce_product_id = {data['rce_product_id']} and rce_source_id = {data['rce_source_id']}
|
||||
"""
|
||||
logging.info(sql)
|
||||
|
||||
self.cur.execute(sql)
|
||||
|
||||
|
||||
|
||||
# def rce_ratings_reviews_productmodels(self,data):
|
||||
#
|
||||
# sql = "select * from "+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" where rce_rating_id = "+str(data['rce_rating_id'])
|
||||
# self.cur.execute(sql)
|
||||
# res = self.cur.fetchone()
|
||||
#
|
||||
#
|
||||
# if not res:
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" (rce_rating_id,model_id) " \
|
||||
# "values("+str(data['rce_rating_id'])+",'"+str(data['model_id'])+"')"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_productmodels_tab')+" (id,rce_rating_id,model_id," \
|
||||
# "createdat,updatedat) select id,rce_rating_id,model_id,createdat,updatedat from " \
|
||||
# ""+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" where rce_rating_id="+str(data['rce_rating_id'])+""
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# else:
|
||||
#
|
||||
# if str(data['rce_rating_id'])==str(res[1]) and str(data['model_id'])==str(res[2]):
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" set updatedat=GETDATE() " \
|
||||
# "where rce_rating_id = "+ str(res[1])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_productmodels_tab')+" a set updatedat=b.updatedat " \
|
||||
# "from "+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
# else:
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" set model_id="+str(data['model_id'])+", " \
|
||||
# "updatedat=GETDATE() where rce_source_store_id = "+ str(res[1])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_productmodels_tab')+" (id,rce_rating_id,model_id," \
|
||||
# "createdat,updatedat) select id,rce_rating_id,model_id,createdat,updatedat from " \
|
||||
# ""+self.config.get('crawler_schema')+"."+self.config.get('review_productmodels_tab')+" where rce_rating_id="+str(res[1])+""
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
#
|
||||
# def rce_tags(self,data):
|
||||
#
|
||||
# sql = "select * from "+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" where description = '"+str(data['description'])+"'"
|
||||
# self.cur.execute(sql)
|
||||
# res = self.cur.fetchone()
|
||||
#
|
||||
#
|
||||
# if not res:
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" (id,description) " \
|
||||
# "values("+str(data['id'])+",'"+str(data['description'])+"')"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_tags_tab')+" (id,description," \
|
||||
# "createdat,updatedat) select id,description,createdat,updatedat from " \
|
||||
# ""+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" where description='"+str(data['description'])+"'"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# else:
|
||||
#
|
||||
# if str(data['description'])==str(res[1]):
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" set updatedat=GETDATE() " \
|
||||
# "where description = '"+ str(res[1])+"'"
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_tags_tab')+" a set updatedat=b.updatedat " \
|
||||
# "from "+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
# else:
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" set description='"+str(data['description'])+"', " \
|
||||
# "updatedat=GETDATE() where description = "+ str(res[1])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_tags_tab')+" (id,description," \
|
||||
# "createdat,updatedat) select id,description,createdat,updatedat from " \
|
||||
# ""+self.config.get('crawler_schema')+"."+self.config.get('review_tags_tab')+" where description='"+str(res[1])+"'"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
#
|
||||
# def rce_ratings_reviews_producttags(self,data):
|
||||
#
|
||||
# sql = "select * from "+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" where rce_rating_id = '"+str(data['rce_rating_id'])+"'"
|
||||
# self.cur.execute(sql)
|
||||
# res = self.cur.fetchone()
|
||||
#
|
||||
#
|
||||
# if not res:
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" (rce_rating_id,tag_ids) " \
|
||||
# "values("+str(data['rce_rating_id'])+",'"+str(data['tag_ids'])+"')"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_producttags_tab')+" (id,rce_rating_id,tag_ids," \
|
||||
# "createdat,updatedat) select id,rce_rating_id,tag_ids,createdat,updatedat from " \
|
||||
# ""+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" where rce_rating_id='"+str(data['rce_rating_id'])+"'"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# else:
|
||||
#
|
||||
# if str(data['rce_rating_id'])==str(res[1]):
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" set updatedat=GETDATE() " \
|
||||
# "where rce_rating_id = '"+ str(res[1])+"'"
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_producttags_tab')+" a set updatedat=b.updatedat " \
|
||||
# "from "+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" b where a.id=b.id and b.id = "+str(res[0])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
# else:
|
||||
#
|
||||
# sql = "update "+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" set rce_rating_id='"+str(data['rce_rating_id'])+"', " \
|
||||
# "updatedat=GETDATE() where rce_rating_id = "+ str(res[1])
|
||||
# #logging.info(sql)
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
# sql = "insert into "+self.config.get('crawler_schema')+".aud_"+self.config.get('review_producttags_tab')+" (id,rce_rating_id,tag_ids," \
|
||||
# "createdat,updatedat) select id,description,createdat,updatedat from " \
|
||||
# ""+self.config.get('crawler_schema')+"."+self.config.get('review_producttags_tab')+" where description='"+str(res[1])+"'"
|
||||
# #logging.info(sql)
|
||||
#
|
||||
# self.cur.execute(sql)
|
||||
#
|
||||
#
|
||||
|
|
@ -0,0 +1,552 @@
|
|||
import hashlib
|
||||
import logging
|
||||
import string
|
||||
import re
|
||||
import playwright
|
||||
import psycopg2
|
||||
from playwright.sync_api import sync_playwright
|
||||
from hasaki_db_writer import hasaki_db_writer
|
||||
import pandas as pd
|
||||
from bs4 import BeautifulSoup
|
||||
from Util import translate_text_to_english
|
||||
from fake_useragent import UserAgent
|
||||
import time
|
||||
import random
|
||||
from pyvirtualdisplay import Display
|
||||
from seleniumwire import webdriver
|
||||
from selenium.webdriver.chrome.service import Service
|
||||
from webdriver_manager.chrome import ChromeDriverManager
|
||||
import brotli
|
||||
import json
|
||||
|
||||
###### Looger ######
|
||||
logging.basicConfig(filename="/home/ubuntu/logs/hasaki_crawler.log",
|
||||
filemode='a',
|
||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s: %(message)s',
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
level=logging.INFO)
|
||||
|
||||
class HasakiProductInfo:
|
||||
def __init__(self, config):
|
||||
logging.info("Initializing HasakiProductInfo")
|
||||
self.pattern = r'[' + string.punctuation + ']'
|
||||
self.config = config
|
||||
self.crawler_name = self.config.get("crawler_name")
|
||||
self.product_limit = int(self.config.get("product_per_category"))
|
||||
self.conn = psycopg2.connect(database=self.config.get('database'), user=self.config.get('db_user'),
|
||||
password=self.config.get('db_pass'), host=self.config.get('db_host'),
|
||||
port=self.config.get('db_port'))
|
||||
self.conn.autocommit = True
|
||||
self.cur = self.conn.cursor()
|
||||
self.cur.execute(
|
||||
f"""select id from {self.config.get('crawler_schema')}.{self.config.get('source_tab')} where source_name='Hasaki'""")
|
||||
try:
|
||||
self.rce_source_id = self.cur.fetchone()[0]
|
||||
except:
|
||||
logging.info("Source tab is empty. Please check. Exiting.....")
|
||||
exit(1)
|
||||
|
||||
self.db_writer = hasaki_db_writer(config)
|
||||
|
||||
#self.display = Display(visible=0, size=(800, 600))
|
||||
#self.display.start()
|
||||
|
||||
def __del__(self):
|
||||
logging.info("Closing connection.....")
|
||||
self.conn.close()
|
||||
|
||||
|
||||
def start_processing(self):
|
||||
logging.info("Starting to collect product info from Hasaki........")
|
||||
|
||||
logging.info("Fetching product list from DB......")
|
||||
|
||||
sql = f"""
|
||||
select * from {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')} where flag = 0
|
||||
order by categoryid, product_section, product_rank
|
||||
"""
|
||||
|
||||
self.cur.execute(sql)
|
||||
rows = self.cur.fetchall()
|
||||
logging.info("Found {} products.......".format(str(len(rows))))
|
||||
cnt = 1
|
||||
for row in rows:
|
||||
logging.info("========= Fetching product info {}/{}: {} =========".format(str(cnt),str(len(rows)),row[3]))
|
||||
|
||||
try:
|
||||
self.get_product_info(row)
|
||||
except:
|
||||
pass
|
||||
|
||||
sql = f"""
|
||||
update {self.config.get('crawler_schema')}.{self.config.get('tracker_tab')} set flag = 1
|
||||
where categoryid={row[9]} and product_section='{row[1]}' and product_rank={row[8]} and product_url='{row[3]}'
|
||||
"""
|
||||
logging.info(sql)
|
||||
self.cur.execute(sql)
|
||||
|
||||
cnt += 1
|
||||
|
||||
#time.sleep(random.randint(7, 23))
|
||||
|
||||
#self.display.stop()
|
||||
|
||||
|
||||
def get_product_info(self, data):
|
||||
|
||||
raw_data = self.get_raw_product_data(data[3])
|
||||
|
||||
logging.info(raw_data)
|
||||
|
||||
if raw_data:
|
||||
self.product_info(data, raw_data)
|
||||
|
||||
self.rating_info(raw_data)
|
||||
|
||||
self.seo_info(raw_data)
|
||||
|
||||
def get_raw_product_data(self, url):
|
||||
retries = 1
|
||||
for _ in range(retries):
|
||||
try:
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(
|
||||
headless=False,
|
||||
args=[
|
||||
"--disable-dev-shm-usage",
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
"--disable-component-extensions-with-background-pages"
|
||||
]
|
||||
)
|
||||
ua = UserAgent(platforms='mobile')
|
||||
random_mobile_ua = ua.random
|
||||
logging.info("using user agent: {}".format(random_mobile_ua))
|
||||
|
||||
context = browser.new_context(user_agent=random_mobile_ua)
|
||||
context.add_init_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")
|
||||
page = context.new_page()
|
||||
|
||||
api_requests = {}
|
||||
|
||||
try:
|
||||
page.goto(url, timeout=5000)
|
||||
time.sleep(1)
|
||||
page.reload()
|
||||
with page.expect_response("**/wap/v2/product/detail**") as response:
|
||||
api_requests = response.value.json()
|
||||
except playwright._impl._errors.TimeoutError:
|
||||
logging.info("Timeout occurred. Retrying.....")
|
||||
page.reload()
|
||||
with page.expect_response("**/wap/v2/product/detail**") as response:
|
||||
api_requests = response.value.json()
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
return api_requests
|
||||
except Exception as e:
|
||||
logging.error(f"An error occurred: {str(e)}")
|
||||
logging.info("Retrying...")
|
||||
|
||||
api_requests = self.get_raw_product_data_selenium(url)
|
||||
|
||||
return api_requests
|
||||
|
||||
def get_raw_product_data_selenium(self, url):
|
||||
ua = UserAgent(platforms='mobile')
|
||||
random_mobile_ua = ua.random
|
||||
logging.info("using user agent: {}".format(random_mobile_ua))
|
||||
|
||||
op = webdriver.ChromeOptions()
|
||||
op.add_argument(f"user-agent={random_mobile_ua}")
|
||||
op.add_experimental_option("useAutomationExtension", False)
|
||||
op.add_argument('--no-sandbox')
|
||||
op.add_argument('--disable-notifications')
|
||||
op.add_argument("--lang=en-GB")
|
||||
op.headless = False
|
||||
|
||||
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=op)
|
||||
|
||||
driver.get(url)
|
||||
|
||||
iteminfo = ""
|
||||
|
||||
for request in driver.requests:
|
||||
if request.response:
|
||||
if '/wap/v2/product/detail' in request.url:
|
||||
encoding = request.response.headers.get('content-encoding')
|
||||
# logging.info(encoding)
|
||||
if encoding:
|
||||
iteminfo = brotli.decompress(request.response.body)
|
||||
else:
|
||||
iteminfo = request.response.body
|
||||
|
||||
driver.quit()
|
||||
|
||||
iteminfo_json = json.loads(iteminfo)
|
||||
return iteminfo_json
|
||||
|
||||
def product_info(self, data, raw_data):
|
||||
|
||||
#region rce_brand
|
||||
|
||||
data_brand = {}
|
||||
|
||||
data_brand['rce_source_id'] = self.rce_source_id
|
||||
data_brand['rce_source_brand_status'] = 1
|
||||
data_brand['rce_source_brand_id'] = 0
|
||||
data_brand['brand_page_url'] = ""
|
||||
data_brand['brand_page_url_hash'] = ""
|
||||
data_brand['brand_name'] = ""
|
||||
data_brand['brand_following'] = ""
|
||||
data_brand['brand_rating'] = ""
|
||||
|
||||
try:
|
||||
|
||||
data_brand['rce_source_brand_id'] = raw_data['brand']['id']
|
||||
|
||||
try:
|
||||
data_brand['brand_page_url'] = "https://hasaki.vn/" + raw_data['brand']['url'] + ".html"
|
||||
data_brand['brand_page_url'] = str(data_brand['brand_page_url']).replace("'","")
|
||||
data_brand['brand_page_url_hash'] = hashlib.md5(data_brand['brand_page_url'].encode('utf-8')).hexdigest()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
data_brand['brand_name'] = translate_text_to_english(str(raw_data['brand']['name']).replace("'",""))
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
data_brand['brand_following'] = raw_data['brand']['following']
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
data_brand['brand_rating'] = raw_data['brand']['rating']
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
self.db_writer.rce_brand(data_brand)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
except:
|
||||
pass
|
||||
|
||||
#endregion
|
||||
|
||||
#region rce_product
|
||||
|
||||
data_product = {}
|
||||
|
||||
try:
|
||||
|
||||
data_product['rce_source_product_id'] = raw_data['id']
|
||||
data_product['rce_source_id'] = self.rce_source_id
|
||||
data_product['rce_source_product_status'] = 1
|
||||
data_product['product_page_url'] = str(raw_data['url']).replace("'","")
|
||||
data_product['product_page_url_hash'] = hashlib.md5(data_product['product_page_url'].encode('utf-8')).hexdigest()
|
||||
data_product['rce_category_id'] = data[9]
|
||||
data_product['rce_store_id'] = 0
|
||||
|
||||
data_product['rce_source_product_name'] = str(raw_data['name']) + str(raw_data['alt_name'])
|
||||
data_product['rce_source_product_name'] = translate_text_to_english(str(re.sub(self.pattern, '', data_product['rce_source_product_name'])))
|
||||
data_product['rce_source_product_name'] = str(data_product['rce_source_product_name']).replace("'", "")
|
||||
|
||||
data_product['product_images'] = data[4]
|
||||
|
||||
data_product['product_description'] = ""
|
||||
try:
|
||||
|
||||
description_raw = raw_data['description']
|
||||
soup = BeautifulSoup(description_raw, 'html.parser')
|
||||
data_product['product_description'] = translate_text_to_english(re.sub(self.pattern, '',soup.get_text()).replace("'",""))
|
||||
data_product['product_description'] = str(data_product['product_description']).replace("'","")
|
||||
except:
|
||||
pass
|
||||
|
||||
data_product['rce_brand_id'] = ""
|
||||
try:
|
||||
sql = f"""
|
||||
select id from {self.config.get('crawler_schema')}.{self.config.get('brand_tab')} where
|
||||
rce_source_id = {self.rce_source_id} and rce_source_brand_id = {raw_data['brand']['id']}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
res = self.cur.fetchone()
|
||||
data_product['rce_brand_id'] = res[0]
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
data_product['product_sold_total'] = 0
|
||||
|
||||
data_product['product_sold'] = 0
|
||||
try:
|
||||
data_product['product_sold'] = raw_data['bought']
|
||||
except:
|
||||
pass
|
||||
|
||||
data_product['product_price_min'] = 0
|
||||
data_product['product_price_max'] = 0
|
||||
try:
|
||||
data_product['product_price_min'] = raw_data['int_final_price']
|
||||
data_product['product_price_max'] = raw_data['int_final_price']
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
data_product['product_price_min_before_discount'] = 0
|
||||
data_product['product_price_max_before_discount'] = 0
|
||||
try:
|
||||
market_price = raw_data['market_price']
|
||||
market_price = re.sub(r'\D', '', market_price)
|
||||
data_product['product_price_min_before_discount'] = market_price
|
||||
data_product['product_price_max_before_discount'] = market_price
|
||||
except:
|
||||
pass
|
||||
|
||||
data_product['ratings'] = 0.0
|
||||
try:
|
||||
data_product['ratings'] = raw_data['rating']['avg_rate']
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
data_product['ships_from'] = ""
|
||||
data_product['product_section'] = data[1]
|
||||
data_product['countryoforigin'] = ""
|
||||
data_product['rank'] = data[8]
|
||||
|
||||
try:
|
||||
self.db_writer.rce_product(data_product)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
#region rce_product_variant
|
||||
|
||||
variant_items = raw_data['attribute']['items']
|
||||
|
||||
df_variant = pd.DataFrame({}, columns=['product_variant_name', 'rce_source_variant_id', 'product_variant_price',
|
||||
'product_variant_stock', 'product_variant_sku'])
|
||||
|
||||
data_variant = {}
|
||||
for variant in variant_items:
|
||||
for item in variant['options']:
|
||||
data_variant['product_variant_name'] = item['long_label']
|
||||
for product in item['products']:
|
||||
data_variant['rce_source_variant_id'] = product['id']
|
||||
data_variant['product_variant_price'] = product['price']
|
||||
data_variant['product_variant_stock'] = product['quantity']
|
||||
data_variant['product_variant_sku'] = product['sku']
|
||||
|
||||
# variants_arr.append(data_variant)
|
||||
|
||||
tmp = pd.DataFrame([[data_variant['product_variant_name'],
|
||||
data_variant['rce_source_variant_id'],
|
||||
data_variant['product_variant_price'],
|
||||
data_variant['product_variant_stock'],
|
||||
data_variant['product_variant_sku']]],
|
||||
columns=['product_variant_name', 'rce_source_variant_id',
|
||||
'product_variant_price',
|
||||
'product_variant_stock', 'product_variant_sku'])
|
||||
df_variant = pd.concat([df_variant, tmp])
|
||||
|
||||
df_variant_merged = df_variant.groupby('product_variant_sku').agg({
|
||||
'product_variant_name': ' '.join,
|
||||
'rce_source_variant_id': 'first',
|
||||
'product_variant_price': 'first',
|
||||
'product_variant_stock': 'first'
|
||||
}).reset_index()
|
||||
|
||||
#logging.info(df_variant_merged.to_string())
|
||||
|
||||
for index, row in df_variant_merged.iterrows():
|
||||
try:
|
||||
data_variant = {}
|
||||
|
||||
data_variant['rce_source_variant_id'] = row['rce_source_variant_id']
|
||||
data_variant['product_variant_name'] = translate_text_to_english(row['product_variant_name'])
|
||||
data_variant['product_variant_name'] = re.sub(self.pattern, '', data_variant['product_variant_name']).replace("'","")
|
||||
data_variant['product_variant_price'] = row['product_variant_price']
|
||||
data_variant['product_variant_price_before_discount'] = 0
|
||||
data_variant['product_variant_stock'] = row['product_variant_stock']
|
||||
data_variant['product_variant_sku'] = row['product_variant_sku']
|
||||
|
||||
data_variant['rce_product_id'] = ""
|
||||
|
||||
sql = f"""
|
||||
select id from {self.config.get('crawler_schema')}.{self.config.get('product_tab')} where
|
||||
rce_source_product_id = {data_product['rce_source_product_id']} and rce_source_id = {data_product['rce_source_id']}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
data_variant['rce_product_id'] = self.cur.fetchone()[0]
|
||||
|
||||
try:
|
||||
self.db_writer.rce_product_variant(data_variant)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
#endregion
|
||||
|
||||
def rating_info(self, raw_data):
|
||||
|
||||
try:
|
||||
|
||||
reviews1 = []
|
||||
reviews2 = []
|
||||
|
||||
try:
|
||||
reviews1 = raw_data['short_rating_data']['image_reviews']
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
reviews2 = raw_data['short_rating_data']['reviews']
|
||||
except:
|
||||
pass
|
||||
|
||||
reviews = self.join_lists(reviews1, reviews2)
|
||||
|
||||
|
||||
|
||||
for review in reviews:
|
||||
data_review = {}
|
||||
|
||||
data_review["rce_product_id"] = ""
|
||||
data_review["username"] = ""
|
||||
data_review["review"] = ""
|
||||
data_review["img_url"] = ""
|
||||
data_review["review_like_count"] = 0
|
||||
data_review["user_tier"] = ""
|
||||
data_review["shop_id"] = 0
|
||||
data_review["video_url"] = ""
|
||||
data_review["rating"] = ""
|
||||
|
||||
sql = f"""
|
||||
select id from {self.config.get('crawler_schema')}.{self.config.get('product_tab')} where
|
||||
rce_source_product_id = {raw_data['id']} and rce_source_id = {self.rce_source_id}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
data_review["rce_product_id"] = self.cur.fetchone()[0]
|
||||
|
||||
try:
|
||||
data_review["username"] = str(review['user_fullname']).replace("'", "")
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
data_review["review"] = translate_text_to_english(review['content']).replace("'", "")
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
data_review["rating"] = review['rating']['star']
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
self.db_writer.rce_ratings_reviews(data_review)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
def join_lists(self, list1, list2):
|
||||
# Check if both lists are None
|
||||
if list1 is None and list2 is None:
|
||||
return None
|
||||
# Check if one of the lists is None
|
||||
elif list1 is None:
|
||||
return list2
|
||||
elif list2 is None:
|
||||
return list1
|
||||
else:
|
||||
return list1 + list2
|
||||
|
||||
def seo_info(self, raw_data):
|
||||
|
||||
try:
|
||||
data_seo = {}
|
||||
|
||||
data_seo['rce_product_id'] = 0
|
||||
data_seo['rce_source_id'] = self.rce_source_id
|
||||
data_seo['seo_title'] = ""
|
||||
data_seo['seo_description'] = ""
|
||||
data_seo['seo_url'] = ""
|
||||
data_seo['seo_url_hash'] = ""
|
||||
data_seo['seo_image'] = ""
|
||||
data_seo['seo_price_amount'] = 0
|
||||
data_seo['seo_price_currency'] = ""
|
||||
data_seo['seo_product_band'] = ""
|
||||
data_seo['seo_product_availability'] = ""
|
||||
data_seo['seo_product_category'] = ""
|
||||
data_seo['seo_product_condition'] = ""
|
||||
data_seo['seo_product_retailer_item_id'] = 0
|
||||
data_seo['seo_product_robots'] = ""
|
||||
|
||||
sql = f"""
|
||||
select id from {self.config.get('crawler_schema')}.{self.config.get('product_tab')} where
|
||||
rce_source_product_id = {raw_data['id']} and rce_source_id = {self.rce_source_id}
|
||||
"""
|
||||
self.cur.execute(sql)
|
||||
data_seo['rce_product_id'] = self.cur.fetchone()[0]
|
||||
|
||||
try: data_seo['seo_title'] = translate_text_to_english(raw_data['seo']['og:title']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_description'] = translate_text_to_english(raw_data['seo']['og:description']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_url'] = str(raw_data['seo']['og:url']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_image'] = str(raw_data['seo']['og:image']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_price_amount'] = raw_data['seo']['price:amount']
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_price_currency'] = str(raw_data['seo']['price:currency']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_product_band'] = translate_text_to_english(raw_data['seo']['product:band']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_product_availability'] = str(raw_data['seo']['product:availability']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_product_category'] = translate_text_to_english(raw_data['seo']['product:category']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_product_condition'] = translate_text_to_english(raw_data['seo']['product:condition']).replace("'","")
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_product_retailer_item_id'] = raw_data['seo']['product:retailer_item_id']
|
||||
except: pass
|
||||
|
||||
try: data_seo['seo_product_robots'] = raw_data['seo']['product:robots']
|
||||
except: pass
|
||||
|
||||
try:
|
||||
self.db_writer.rce_seo(data_seo)
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /home/ubuntu/hasaki_binary/bin/activate
|
||||
python /home/ubuntu/raena-crawler-engine/hasaki_crawler_engine/hasaki_crawler.py
|
|
@ -0,0 +1,53 @@
|
|||
import logging
|
||||
from playwright.sync_api import sync_playwright
|
||||
from fake_useragent import UserAgent
|
||||
import time
|
||||
import playwright
|
||||
from playwright_stealth import stealth_sync
|
||||
def get_raw_product_data(url):
|
||||
retries = 1
|
||||
for _ in range(retries):
|
||||
try:
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(
|
||||
headless=False,
|
||||
args=[
|
||||
"--disable-dev-shm-usage",
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
"--disable-component-extensions-with-background-pages"
|
||||
]
|
||||
)
|
||||
ua = UserAgent(platforms='mobile')
|
||||
random_mobile_ua = ua.random
|
||||
logging.info("using user agent: {}".format(random_mobile_ua))
|
||||
|
||||
context = browser.new_context(user_agent=random_mobile_ua)
|
||||
context.add_init_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")
|
||||
page = context.new_page()
|
||||
stealth_sync(page)
|
||||
|
||||
api_requests = {}
|
||||
|
||||
try:
|
||||
page.goto(url, timeout=5000)
|
||||
time.sleep(1)
|
||||
page.reload()
|
||||
with page.expect_response("**/wap/v2/product/detail**") as response:
|
||||
api_requests = response.value.json()
|
||||
except playwright._impl._errors.TimeoutError:
|
||||
logging.info("Timeout occurred. Retrying.....")
|
||||
page.reload()
|
||||
with page.expect_response("**/wap/v2/product/detail**") as response:
|
||||
api_requests = response.value.json()
|
||||
finally:
|
||||
browser.close()
|
||||
|
||||
return api_requests
|
||||
except Exception as e:
|
||||
logging.error(f"An error occurred: {str(e)}")
|
||||
logging.info("Retrying...")
|
||||
|
||||
print(api_requests)
|
||||
|
||||
|
||||
get_raw_product_data('https://hasaki.vn/san-pham/tinh-chat-chong-nang-sunplay-hieu-chinh-sac-da-50g-xanh-87613.html')
|
|
@ -0,0 +1,19 @@
|
|||
import asyncio
|
||||
from playwright.async_api import async_playwright
|
||||
|
||||
async def bypass_cloudflare():
|
||||
async with async_playwright() as p:
|
||||
browser = await p.chromium.launch(headless=False)
|
||||
page = await browser.new_page()
|
||||
await page.goto('https://hasaki.vn/san-pham/tinh-chat-chong-nang-sunplay-hieu-chinh-sac-da-50g-xanh-87613.html') # Specify the URL of the website you want to access
|
||||
|
||||
# Add any necessary code here to interact with the webpage
|
||||
|
||||
await asyncio.sleep(10) # Wait for some time for Cloudflare checks
|
||||
|
||||
content = await page.content()
|
||||
print(content)
|
||||
|
||||
await browser.close()
|
||||
|
||||
asyncio.run(bypass_cloudflare())
|
|
@ -0,0 +1,55 @@
|
|||
import logging
|
||||
from fake_useragent import UserAgent
|
||||
import brotli
|
||||
import seleniumwire.undetected_chromedriver as uc
|
||||
from selenium_stealth import stealth
|
||||
import json
|
||||
import time
|
||||
|
||||
def get_raw_product_data_selenium(url):
|
||||
ua = UserAgent(platforms='mobile')
|
||||
random_mobile_ua = ua.random
|
||||
logging.info("using user agent: {}".format(random_mobile_ua))
|
||||
|
||||
op = uc.ChromeOptions()
|
||||
op.add_argument(f"user-agent={random_mobile_ua}")
|
||||
op.add_argument('--blink-settings=imagesEnabled=false')
|
||||
#op.add_experimental_option("useAutomationExtension", False)
|
||||
#op.add_argument('--no-sandbox')
|
||||
#op.add_argument('--disable-notifications')
|
||||
#op.add_argument("--lang=en-GB")
|
||||
op.headless = False
|
||||
|
||||
driver = uc.Chrome(version_main=122, options=op)
|
||||
stealth(driver,
|
||||
languages=["en-US", "en"],
|
||||
vendor="Google Inc.",
|
||||
platform="Win32",
|
||||
webgl_vendor="Intel Inc.",
|
||||
renderer="Intel Iris OpenGL Engine",
|
||||
fix_hairline=True
|
||||
)
|
||||
|
||||
driver.get(url)
|
||||
|
||||
time.sleep(100)
|
||||
|
||||
iteminfo = ""
|
||||
|
||||
for request in driver.requests:
|
||||
if request.response:
|
||||
if '/wap/v2/product/detail' in request.url:
|
||||
encoding = request.response.headers.get('content-encoding')
|
||||
# logging.info(encoding)
|
||||
if encoding:
|
||||
iteminfo = brotli.decompress(request.response.body)
|
||||
else:
|
||||
iteminfo = request.response.body
|
||||
|
||||
driver.quit()
|
||||
|
||||
iteminfo_json = json.loads(iteminfo)
|
||||
print(iteminfo_json)
|
||||
|
||||
|
||||
get_raw_product_data_selenium('https://hasaki.vn/san-pham/tinh-chat-chong-nang-sunplay-hieu-chinh-sac-da-50g-xanh-87613.html')
|
Loading…
Reference in New Issue