This commit is contained in:
parent
2ec002135a
commit
a7fd05c094
@ -55,7 +55,7 @@ class Bot:
|
||||
self.api = Api(username=self.username, password=self.password)
|
||||
|
||||
def rsleepii(self):
|
||||
time.sleep(random.randint(1, 300))
|
||||
time.sleep(random.randint(10, 60))
|
||||
|
||||
@method_cache
|
||||
def login(self):
|
||||
@ -91,6 +91,7 @@ class Bot:
|
||||
def is_flagged_as_sus(self, rant_id, num_comments):
|
||||
if not num_comments:
|
||||
return False
|
||||
self.rsleepii()
|
||||
rant = self.api.get_rant(rant_id)
|
||||
for comment in rant.get("comments", []):
|
||||
if self.names.get(self.username, "") in comment.get("body", ""):
|
||||
@ -112,6 +113,7 @@ class Bot:
|
||||
|
||||
def is_comments_sus(self, rant_id):
|
||||
log.info(f"Checking if comments are sus of rant {rant_id}.")
|
||||
self.rsleepii()
|
||||
rant = self.api.get_rant(rant_id)
|
||||
for comment in rant.get("comments", []):
|
||||
print("Checking if sus comment: ", comment["body"])
|
||||
|
Loading…
Reference in New Issue
Block a user