123456789101112131415161718192021222324252627282930 |
- # -*- coding: utf-8 -*-
- # @Author: wangkun
- # @Time: 2022/8/31
- import datetime
- import os
- import sys
- import time
- sys.path.append(os.getcwd())
- # from crawler_shipinhao.main.common import Common
- # from crawler_shipinhao.main.shipinhao_recommend import Recommend
- from main.common import Common
- from main.download_publish import Download
- from main.shipinhao_recommend import Recommend
- class Main:
- @classmethod
- def main(cls, env):
- while True:
- if 20 >= datetime.datetime.now().hour >= 10:
- Recommend.start_wechat('recommend')
- Download.run_download_publish('recommend', env)
- Common.del_logs('recommend')
- time.sleep(5)
- else:
- pass
- if __name__ == '__main__':
- Main.main('prod')
|