zhangyong 7 months ago
parent
commit
954f26a76d
2 changed files with 10 additions and 10 deletions
  1. 2 2
      redis_clear_mark.py
  2. 8 8
      video_rewriting/video_processor.py

+ 2 - 2
redis_clear_mark.py

@@ -5,8 +5,8 @@ from common.redis import del_dyss_redis_key
 
 def redis_bot():
     # 定义需要处理的计数列表
-    lists = ['dyss-count', 'ss-sph-count', 'sph-count']
-    # lists = ['dyss-count', 'ss-sph-count', 'sph-count', 'ksss-count']
+    # lists = ['dyss-count', 'ss-sph-count', 'sph-count']
+    lists = ['dyss-count', 'ss-sph-count', 'sph-count', 'ksss-count']
     print("开始执行")
     # 遍历列表,删除对应的 Redis 键
     for mark_count in lists:

+ 8 - 8
video_rewriting/video_processor.py

@@ -401,7 +401,7 @@ class VideoProcessor:
         elif channel_id == '抖音搜索':
             return DyKeyword.get_key_word(url, task_mark, mark, channel_id, name, task)
         elif channel_id == '快手搜索':
-            return KsPcKeyword.get_key_word(url, task_mark, mark, channel_id, name, task)
+            return KsKeyword.get_key_word(url, task_mark, mark, channel_id, name, task)
         elif channel_id == '视频号搜索':
             return SphKeyword.get_key_word(url, task_mark, mark, channel_id, name)
 
@@ -622,13 +622,13 @@ class VideoProcessor:
                 if int(count) >= 300:
                     Common.logger(mark).log(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:
-            #         Common.logger(mark).log(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:
+                    Common.logger(mark).log(f"快手搜索接口今日已经上限")
+                    return "快手搜索上限"
             if mark == 'sph-pl-gjc':
                 mark_count = 'ss-sph-count'
                 count = get_first_value_with_prefix(mark_count)