zhangyong 4 ماه پیش
والد
کامیت
5eb0b15f03
2فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 1 1
      common/tts_help.py
  2. 8 1
      video_rewriting/video_processor.py

+ 1 - 1
common/tts_help.py

@@ -239,7 +239,7 @@ class TTS:
                         srt_content = cls.generate_srt(result)
                         return srt_content
             except Exception as e:
-                
+
                 continue
         return None
 

+ 8 - 1
video_rewriting/video_processor.py

@@ -626,7 +626,7 @@ class VideoProcessor:
         cookie_sheet = data["cookie_sheet"]
         data = get_data(mark, feishu_id, feishu_sheet)
         if not data:
-            Common.logger("redis").error(f"{mark}任务开始新的一轮\n")
+            logger.info(f"[+] {name}-{mark}没有获取到数据任务开始新的一轮")
             return
         task = json.loads(data)
         try:
@@ -637,24 +637,30 @@ class VideoProcessor:
                 if int(limit_number) <= int(makr_count[0][0]):
                     AliyunLogger.logging((task["channel_id"]), name, task["channel_url"], '', f"{task_mark}标识任务每日指定条数已足够,指定条数{limit_number},实际生成条数{int(makr_count[0][0])}",
                                          "1111")
+                    logger.info(f"[+] {task_mark}标识任务每日指定条数已足够,指定条数{limit_number},实际生成条数{int(makr_count[0][0])}")
+
                     return
             if mark == 'dy-pl-gjc' and task['channel_id'] == '抖音搜索':
                 mark_count = 'dyss-count'
                 count = get_first_value_with_prefix(mark_count)
                 increment_key(mark_count)
                 if int(count) >= 300:
+                    logger.info(f"[+] 抖音搜索上限")
                     return "抖音搜索上限"
             if mark == 'ks-pl-gjc':
                 mark_count = 'ksss-count'
                 count = get_first_value_with_prefix(mark_count)
                 increment_key(mark_count)
                 if int(count) >= 300:
+                    logger.info(f"[+] 快手搜索上限")
                     return "快手搜索上限"
             if mark == 'sph-pl-gjc':
                 mark_count = 'ss-sph-count'
                 count = get_first_value_with_prefix(mark_count)
                 increment_key(mark_count)
                 if int(count) >= 300:
+                    logger.info(f"[+] 视频号搜索上限")
+
                     time.sleep(10)
                     return "视频号搜索上限"
             if mark == 'sph-plzh'and task['channel_id'] == '视频号':
@@ -662,6 +668,7 @@ class VideoProcessor:
                 count = get_first_value_with_prefix(mark_count)
                 increment_key(mark_count)
                 if int(count) >= 400:
+                    logger.info(f"[+] 视频号获取用户主页视频上限")
                     time.sleep(10)
                     return "视频号获取用户主页视频上限"
             VideoProcessor.process_task(task, mark, name, feishu_id, cookie_sheet)