|
@@ -40,7 +40,8 @@ def douyin_search(keyword, sensitive_words, trace_id):
|
|
|
duration = int(obj['duration'])
|
|
|
if sensitive_flag(sensitive_words, title) and duration < 30000:
|
|
|
res = douyin_detail(video_id)
|
|
|
- L.append(res)
|
|
|
+ if res:
|
|
|
+ L.append(res)
|
|
|
else:
|
|
|
continue
|
|
|
except Exception as e:
|
|
@@ -80,4 +81,7 @@ def douyin_detail(video_id):
|
|
|
}
|
|
|
response = requests.request("POST", url, headers=headers, data=payload).json()
|
|
|
video_info = response['data']['data']
|
|
|
- return video_info
|
|
|
+ if video_info['content_type'] == "note":
|
|
|
+ return None
|
|
|
+ else:
|
|
|
+ return video_info
|