zhangyong 7 月之前
父节点
当前提交
c0055ea46e
共有 3 个文件被更改,包括 11 次插入1 次删除
  1. 3 0
      data_channel/ks_keyword.py
  2. 1 1
      redis_clear_mark.py
  3. 7 0
      video_rewriting/video_processor.py

+ 3 - 0
data_channel/ks_keyword.py

@@ -1,3 +1,5 @@
+import time
+
 import requests
 import json
 
@@ -48,6 +50,7 @@ class KsKeyword:
             special = 0.0005
             short_duration_rule = 25
         try:
+            time.sleep(3)
             response = requests.request("POST", url, headers=headers, data=payload)
             response = response.json()
             code = response['code']

+ 1 - 1
redis_clear_mark.py

@@ -4,7 +4,7 @@ from common.redis import del_dyss_redis_key
 
 
 def redis_bot():
-    lists = ['dyss-count', 'sph-count', 'sphss-count']
+    lists = ['dyss-count', 'sph-count', 'sphss-count', 'ksss-count']
     print("开始执行")
     for mark_count in lists:
         print(mark_count)

+ 7 - 0
video_rewriting/video_processor.py

@@ -621,6 +621,13 @@ class VideoProcessor:
                 if int(count) >= 300:
                     Common.logger(mark).log(f"抖音搜索接口今日已经上限")
                     return "抖音搜索上限"
+            if mark == 'ks-pl-gjc' and task['channel_id'] == '抖音搜索':
+                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 = 'sphss-count'
                 count = get_first_value_with_prefix(mark_count)