From d96ceaba86be755d9f010f23a5b2f10c64a4210e Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Fri, 11 Apr 2025 03:24:30 +0300 Subject: [PATCH] clown flag + poo flag = clownpoo --- post_parser.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/post_parser.py b/post_parser.py index 1e04b27..c049a6e 100644 --- a/post_parser.py +++ b/post_parser.py @@ -164,7 +164,7 @@ class PostParser: # Check if we have a web_page with title and text is basically just a URL if message.web_page and message.web_page.title: - # Проверяем, что текст - это по сути только URL + # Text is basically just a URL url_match = re.match(r'^(https?://[^\s<>"\']+)$', text_stripped) if url_match: return f"🔗 {message.web_page.title}" @@ -322,18 +322,14 @@ class PostParser: if re.search(r'https?://(?:www\.)?t\.me/boost/', message_text): flags.append("donat") - # Check if the post's reactions contain more clown emojis (🤡). + # Check if the post's reactions contain more clown emojis (🤡) or poo emojis (💩). if getattr(message, "reactions", None): for reaction in message.reactions.reactions: if reaction.emoji == "🤡" and reaction.count >= 30: - flags.append("clown") + flags.append("clownpoo") break - - # Check if the post's reactions contain more poo emojis (💩). - if getattr(message, "reactions", None): - for reaction in message.reactions.reactions: if reaction.emoji == "💩" and reaction.count >= 30: - flags.append("poo") + flags.append("clownpoo") break # Check if the message text contains "#реклама", "Партнерский пост", "по промокоду", "скидка на курс", "регистрируйтесь тут" in a case-insensitive manner.