|
@@ -512,14 +512,10 @@ class SpApiRequest:
|
|
|
imageurl = temp_df['image_link']
|
|
|
temp = df_rel.query("""listing_id==@listing_id and asin==@asin and sku==@sku and quantity==@quantity and fulfillment_channel==@fulfillment_channel and price==@price and product_id==@product_id and country_code==@country_code and seller_id==@seller_id and title==@title and image_link==@imageurl""")
|
|
|
print("需要关注数据(是否异常):",len(temp),temp.to_numpy().tolist()) if len(temp)>1 else 1
|
|
|
- if len(temp)>1:
|
|
|
- # temp = temp.head(1).to_numpy().tolist()
|
|
|
- df_data = df_data.append(temp_df, ignore_index=True)
|
|
|
- delete_list.append((seller_id, marketplace_id, sku, listing_id, product_id))
|
|
|
- # print(len(temp))
|
|
|
- elif len(temp)==0:
|
|
|
- df_data = df_data.append(temp_df,ignore_index=True)
|
|
|
- delete_list.append((seller_id,marketplace_id,sku,listing_id,product_id))
|
|
|
+
|
|
|
+ df_data = df_data.append(temp_df, ignore_index=True)
|
|
|
+ delete_list.append((seller_id, marketplace_id, sku, listing_id, product_id))
|
|
|
+
|
|
|
row += 1
|
|
|
print("判断不同数据条数",len(delete_list))
|
|
|
print("预计更新数据条数",len(df_data))
|
|
@@ -722,6 +718,7 @@ class SpApiRequest:
|
|
|
def func_run():
|
|
|
SpApiRequest.get_allShops("GET_FLAT_FILE_OPEN_LISTINGS_DATA")
|
|
|
|
|
|
+# func_run()
|
|
|
if __name__ == '__main__':
|
|
|
sched = BlockingScheduler()
|
|
|
sched.add_job(func_run,'cron',hour=1,minute=30,second=0)
|