|
@@ -871,14 +871,14 @@ class SpApiRequest:
|
|
|
def listing_infoTable(cls): # To datatable asj_ads.Goods - Goods表,包括排名,图片,父子关系
|
|
|
conn = SpApiRequest.Data_auth()
|
|
|
cursor = conn.cursor()
|
|
|
- # TODO
|
|
|
- cursor.execute(f"""select seller_id,country_code,asin,title from asj_ads.seller_listings where title is not null and title <>'' and (seller_id,country_code,asin) in (select seller_id,countryCode,asin from asj_ads.Goods where update_time>='{datetime.today().date()}') group by seller_id,title,country_code,asin order by country_code desc""")
|
|
|
+ #
|
|
|
+ cursor.execute(f"""select seller_id,country_code,asin,title from asj_ads.seller_listings where title is not null and title <>'' and (seller_id,country_code,asin) not in (select seller_id,countryCode,asin from asj_ads.Goods where update_time>='{datetime.today().date()}') group by seller_id,title,country_code,asin order by country_code desc""")
|
|
|
query_ = cursor.fetchall()
|
|
|
# print(query_)
|
|
|
col_name = [i[0] for i in cursor.description]
|
|
|
df_datatable = pd.DataFrame(query_, columns=col_name)
|
|
|
count=0
|
|
|
- distance = 20
|
|
|
+ distance = 50
|
|
|
print(len(df_datatable))
|
|
|
while count<len(df_datatable):
|
|
|
print(f"进度:{round(count / len(df_datatable) * 100, 2)}%")
|
|
@@ -1018,9 +1018,9 @@ class SpApiRequest:
|
|
|
|
|
|
@staticmethod
|
|
|
def Goods_insert(conn,detail_info,detail_info_k): # To datatable asj.Goods
|
|
|
- print(detail_info)
|
|
|
+ # print(detail_info)
|
|
|
df = pd.DataFrame(detail_info)
|
|
|
- print(df.columns)
|
|
|
+ # print(df.columns)
|
|
|
try:
|
|
|
cursor = conn.cursor()
|
|
|
except:
|