fix-bug:修复抖音评论筛选
This commit is contained in:
parent
c4d68f868a
commit
5c6a636352
@ -196,8 +196,10 @@ class DOUYINClient:
|
|||||||
|
|
||||||
# 在添加评论到结果列表之前进行关键字筛选
|
# 在添加评论到结果列表之前进行关键字筛选
|
||||||
if keywords:
|
if keywords:
|
||||||
filtered_comments = [comment for comment in comments if
|
filtered_comments = []
|
||||||
not any(keyword in comment.get("text", "") for keyword in keywords)]
|
for comment in comments:
|
||||||
|
if any(keyword in comment.get("text", "") for keyword in keywords):
|
||||||
|
filtered_comments.append(comment)
|
||||||
else:
|
else:
|
||||||
filtered_comments = comments
|
filtered_comments = comments
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user