Commit 06d8363b authored by nanahira's avatar nanahira

fix ghost ban

parent 5093a721
Pipeline #12504 passed with stage
in 36 seconds
......@@ -223,7 +223,7 @@ def searchban(screen_name):
print("Current entry of {} is: {}".format(screen_name, ent["entryId"]))
if ent["entryId"].startswith("conversationthread"):
ghostban = True
inReplyTo = "-1"
inReplyTo = reply["id_str"]
for item in ent["content"]["items"]:
if "tweet_results" in item["item"]["itemContent"]:
......@@ -235,7 +235,7 @@ def searchban(screen_name):
inReplyTo = item["item"]["itemContent"]["tweet_results"]["result"]["legacy"]["id_str"]
if ghostban:
print("{} is ghost banned.".format(screen_name))
returnjson["tests"]["ghost"] = {"ban": True, "in_reply_to": item["item"]["itemContent"]["tweet_results"]["result"]["legacy"]["id_str"]}
returnjson["tests"]["ghost"] = {"ban": True, "in_reply_to": inReplyTo}
if ent["entryId"].startswith("cursor-bottom"):
print("{}'s test touched bottom.".format(screen_name))
#returnjson["tests"]["ghost"] = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment