main.py 564 B

12345678910111213141516171819202122232425262728
  1. import os
  2. import sys
  3. sys.path.append(os.getcwd())
  4. from video_capture.douyin.douyin_author.douyin_author import douyinAuthor
  5. from video_stitching.video_stitching import VideoStitching
  6. import schedule
  7. import time
  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("12: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)