sync_get_open_listing_data.py 762 B

123456789101112131415161718192021222324252627
  1. import warnings
  2. warnings.filterwarnings('ignore')
  3. from apscheduler.schedulers.blocking import BlockingScheduler
  4. from sync_amz_data.public import sp_api_client
  5. def func_run():
  6. try:
  7. sp_api_client.SpApiRequest.get_allShops("GET_FLAT_FILE_OPEN_LISTINGS_DATA")
  8. except:
  9. sp_api_client.SpApiRequest.get_allShops("GET_FLAT_FILE_OPEN_LISTINGS_DATA")
  10. print("="*40)
  11. print("="*40)
  12. print("="*40)
  13. try:
  14. sp_api_client.SpApiRequest.listing_infoTable()
  15. except:
  16. sp_api_client.SpApiRequest.listing_infoTable()
  17. sp_api_client.SpApiRequest.Goods_drop_duplicates()
  18. # func_run()
  19. #
  20. #
  21. if __name__ == '__main__':
  22. sched = BlockingScheduler()
  23. sched.add_job(func_run,'cron',hour=4,minute=30,second=0)
  24. sched.start()