@@ -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']
@@ -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)
@@ -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)