From 190a4e98afddaa8bb99a4d790c9745f517d545d5 Mon Sep 17 00:00:00 2001 From: Roboron3042 Date: Tue, 15 Oct 2024 22:01:48 +0200 Subject: [PATCH] FIX: Ignora dobles espacios --- apreciabot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apreciabot.py b/apreciabot.py index 9ca11a1..85e4b7c 100644 --- a/apreciabot.py +++ b/apreciabot.py @@ -42,8 +42,9 @@ for i in range(0, max_notifications - 5): n = notifications[i] if str(n['id']) not in last_ids: # Mentions data are HTML paragraphs so we delete everything between <> to clean it up - rawContent = n['status']['content'].replace("
", " ") + rawContent = n['status']['content'].replace("
", " ").replace("
", " ") text = BeautifulSoup(rawContent, "html.parser").get_text() + text = re.sub(" +", " ", text) content = re.sub(no_unicode_spaces_pattern, "", text).split(" ") try: first_mention = content[0]