|
@@ -2,10 +2,13 @@
|
|
|
@author: luojunhui
|
|
|
"""
|
|
|
import json
|
|
|
+import traceback
|
|
|
+
|
|
|
import requests
|
|
|
|
|
|
from applications.functions.common import sensitive_flag
|
|
|
from applications.log import logging
|
|
|
+from applications.feishu import bot
|
|
|
|
|
|
|
|
|
def douyin_search(keyword, sensitive_words, trace_id):
|
|
@@ -45,6 +48,7 @@ def douyin_search(keyword, sensitive_words, trace_id):
|
|
|
else:
|
|
|
continue
|
|
|
except Exception as e:
|
|
|
+ print(traceback.format_exc())
|
|
|
continue
|
|
|
logging(
|
|
|
code="8001",
|
|
@@ -56,6 +60,16 @@ def douyin_search(keyword, sensitive_words, trace_id):
|
|
|
},
|
|
|
trace_id=trace_id
|
|
|
)
|
|
|
+ if not L and len(dt_list) > 0:
|
|
|
+ bot(
|
|
|
+ title="抖音搜索失败",
|
|
|
+ detail={
|
|
|
+ "keys": keyword,
|
|
|
+ "搜索的视频数量": len(dt_list),
|
|
|
+ "详情请求的视频数量": len(L)
|
|
|
+ },
|
|
|
+ mention=False
|
|
|
+ )
|
|
|
return L
|
|
|
except Exception as e:
|
|
|
logging(
|