wangkun 2 years ago
parent
commit
9a8dfbc246
1 changed files with 2 additions and 1 deletions
  1. 2 1
      main/shipinhao_recommend.py

+ 2 - 1
main/shipinhao_recommend.py

@@ -1,5 +1,6 @@
 # @Author: wangkun
 # @Time: 3月 02, 2022
+import datetime
 import os
 import sys
 import time
@@ -23,7 +24,7 @@ class Recommend:
     def run_recommend(cls, log_type, env):
         try:
             while True:
-                if len(cls.download_cnt) >= 100:
+                if len(cls.download_cnt) >= 100 or datetime.datetime.now().hour == 17:
                     Common.logger('recommend').info('已下载{}条视频\n', len(cls.download_cnt))
                     cls.download_cnt = []
                     return