main.py 565 B

1234567891011121314151617181920212223242526272829
  1. import os
  2. import sys
  3. import schedule
  4. import time
  5. sys.path.append(os.getcwd())
  6. from video_capture.douyin.douyin_author.douyin_author import douyinAuthor
  7. from video_stitching.video_stitching import VideoStitching
  8. def job_video_stitching():
  9. VideoStitching.video_cookie()
  10. def job_douyin_data():
  11. douyinAuthor.get_token()
  12. # 设置上午10点运行任务
  13. schedule.every().day.at("14:00").do(job_douyin_data)
  14. # 设置上午4点运行任务
  15. schedule.every().day.at("04:00").do(job_video_stitching)
  16. while True:
  17. schedule.run_pending()
  18. time.sleep(1)