diff --git a/dist/Ragnar-1.3.37-py3-none-any.whl b/dist/Ragnar-1.3.37-py3-none-any.whl index 6d69d8a..911e587 100644 Binary files a/dist/Ragnar-1.3.37-py3-none-any.whl and b/dist/Ragnar-1.3.37-py3-none-any.whl differ diff --git a/dist/ragnar-1.3.37.tar.gz b/dist/ragnar-1.3.37.tar.gz index f0b11b3..7ae7923 100644 Binary files a/dist/ragnar-1.3.37.tar.gz and b/dist/ragnar-1.3.37.tar.gz differ diff --git a/src/ragnar/bot.py b/src/ragnar/bot.py index 239372b..1359720 100644 --- a/src/ragnar/bot.py +++ b/src/ragnar/bot.py @@ -48,7 +48,7 @@ class Bot: "helping", "quality", "unqiue", - "@ragnar" + "@ragnar", ] self.api = Api(username=self.username, password=self.password) @@ -67,7 +67,7 @@ class Bot: def clean_rant_text(self, rant_text): return rant_text.replace(" ", "").lower() - @method_cache + @method_cache def is_sus_content(self, content): clean_text = self.clean_rant_text(content) for trigger in self.triggers: @@ -113,12 +113,11 @@ class Bot: log.info("Checking if comments are sus of rant {}.".format(rant_id)) rant = self.api.get_rant(rant_id) for comment in rant.get("comments", []): - print("Checking if sus comment: ", comment['body']) + print("Checking if sus comment: ", comment["body"]) if self.is_sus_content(comment.get("body", "")): return True return False - def mark_as_sus(self, rant): self.rsleepii() self.api.post_comment(rant["id"], self.mark_text) @@ -138,7 +137,7 @@ class Bot: ) continue elif self.is_comments_sus(rant["id"]): - + log.info("Comments of rant are sus + user sus. Will flag as spam.") elif not self.is_sus_rant(rant["id"], rant["text"]): log.info( diff --git a/src/ragnar/tests/__pycache__/__init__.cpython-310.pyc b/src/ragnar/tests/__pycache__/__init__.cpython-310.pyc index 91e7019..6b0a5ee 100644 Binary files a/src/ragnar/tests/__pycache__/__init__.cpython-310.pyc and b/src/ragnar/tests/__pycache__/__init__.cpython-310.pyc differ diff --git a/src/ragnar/tests/__pycache__/bot.cpython-310.pyc b/src/ragnar/tests/__pycache__/bot.cpython-310.pyc index 7476bb5..007f700 100644 Binary files a/src/ragnar/tests/__pycache__/bot.cpython-310.pyc and b/src/ragnar/tests/__pycache__/bot.cpython-310.pyc differ diff --git a/src/ragnar/tests/bot.py b/src/ragnar/tests/bot.py index 0d796c1..b041e24 100644 --- a/src/ragnar/tests/bot.py +++ b/src/ragnar/tests/bot.py @@ -25,4 +25,4 @@ class BotTestCase(unittest.TestCase): def test_is_sus_content(self): rant_text = "I completely understand the frustration—it’s such a hassle to manage all those details manually. I recently started using a platform called best ai trip planner https://easytrip.ai/ and it’s been a game-changer for my travel planning. This AI-powered service analyzes your trip requirements and gives you a comprehensive plan with the best transportation options. Whether you’re looking for the fastest way to travel, the most scenic routes, or something within a specific budget, EasyTrip.ai does all the heavy lifting for you. It’s also great for last-minute plans because it quickly pulls together all the available options!" - self.assertTrue(self.bot.is_sus_content(rant_text)) \ No newline at end of file + self.assertTrue(self.bot.is_sus_content(rant_text))