This commit is contained in:
+2
-3
@@ -55,7 +55,7 @@ class Bot:
|
|||||||
self.api = Api(username=self.username, password=self.password)
|
self.api = Api(username=self.username, password=self.password)
|
||||||
|
|
||||||
def rsleepii(self):
|
def rsleepii(self):
|
||||||
time.sleep(random.randint(1, 3))
|
time.sleep(random.randint(1, 60))
|
||||||
|
|
||||||
@method_cache
|
@method_cache
|
||||||
def login(self):
|
def login(self):
|
||||||
@@ -91,7 +91,6 @@ class Bot:
|
|||||||
def is_flagged_as_sus(self, rant_id, num_comments):
|
def is_flagged_as_sus(self, rant_id, num_comments):
|
||||||
if not num_comments:
|
if not num_comments:
|
||||||
return False
|
return False
|
||||||
self.rsleepii()
|
|
||||||
rant = self.api.get_rant(rant_id)
|
rant = self.api.get_rant(rant_id)
|
||||||
for comment in rant.get("comments", []):
|
for comment in rant.get("comments", []):
|
||||||
if self.names.get(self.username, "") in comment.get("body", ""):
|
if self.names.get(self.username, "") in comment.get("body", ""):
|
||||||
@@ -127,8 +126,8 @@ class Bot:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def mark_as_sus(self, rant):
|
def mark_as_sus(self, rant):
|
||||||
self.rsleepii()
|
|
||||||
self.api.post_comment(rant["id"], self.mark_text)
|
self.api.post_comment(rant["id"], self.mark_text)
|
||||||
|
self.rsleepii()
|
||||||
|
|
||||||
def fight(self):
|
def fight(self):
|
||||||
self.rsleepii()
|
self.rsleepii()
|
||||||
|
|||||||
Reference in New Issue
Block a user