Sus algorithm.
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m38s
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m38s
This commit is contained in:
parent
fccf37e553
commit
971a500ae6
@ -142,7 +142,7 @@ class Bot:
|
|||||||
|
|
||||||
log.info("Comments of rant are sus + user sus. Will flag as spam.")
|
log.info("Comments of rant are sus + user sus. Will flag as spam.")
|
||||||
elif rant["user_username"] in self.sus_users:
|
elif rant["user_username"] in self.sus_users:
|
||||||
pass
|
pass
|
||||||
elif not self.is_sus_rant(rant["id"], rant["text"]):
|
elif not self.is_sus_rant(rant["id"], rant["text"]):
|
||||||
log.info(
|
log.info(
|
||||||
"{}: Rant by {} is not sus.".format(
|
"{}: Rant by {} is not sus.".format(
|
||||||
@ -150,9 +150,7 @@ class Bot:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
if self.is_flagged_as_sus(rant["id"], rant.get("num_comments")):
|
|
||||||
self.rant_history.append(rant["id"])
|
|
||||||
continue
|
|
||||||
log.warning(
|
log.warning(
|
||||||
"{}: Rant is not {} flagged as sus yet.".format(
|
"{}: Rant is not {} flagged as sus yet.".format(
|
||||||
self.name, rant["user_username"]
|
self.name, rant["user_username"]
|
||||||
|
@ -55,7 +55,7 @@ def main():
|
|||||||
"JamesMedina",
|
"JamesMedina",
|
||||||
]
|
]
|
||||||
|
|
||||||
with Executor(len(usernames) + 1) as executor:
|
with Executor(len(usernames)) as executor:
|
||||||
for username in usernames:
|
for username in usernames:
|
||||||
executor.submit(bot_task, f"{username}@molodetz.nl", args.password)
|
executor.submit(bot_task, f"{username}@molodetz.nl", args.password)
|
||||||
executor.shutdown(wait=True)
|
executor.shutdown(wait=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user