123456789101112131415161718192021222324 |
- import schedule
- import time
- from spider.crawler_offline.xng_zhanghao import XNGZH
- def bot_xng_count_recommend():
- try:
- xng = XNGZH()
- xng.get_video_info_2()
- except Exception as e:
- print(f"异常了{e}")
- def schedule_tasks():
- schedule.every().day.at("00:50").do(bot_xng_count_recommend)
- if __name__ == '__main__':
- schedule_tasks() # 调用任务调度函数
- while True:
- schedule.run_pending()
- time.sleep(1) # 每秒钟检查一次
|