From f5b7e0dafd7096049097ca90d5e4e4d4fa183666 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 5 Aug 2021 12:22:45 +0200 Subject: [PATCH] Update REGEX --- main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index b366862..2cd8c1d 100644 --- a/main.py +++ b/main.py @@ -42,13 +42,12 @@ class Listener(StreamListener): if seniority(status._json["created_at"]): # verification of the age of the tweet if not hasattr(status, "retweeted_status"): # ignore Retweet try: # retrieve the entire tweet - tweet = status.extended_tweet["full_text"] + tweet = status.extended_tweet["full_text"].lower() except AttributeError: - tweet = status.text + tweet = status.text.lower() # recovery of the last "usable" word of the tweet - regex = r"https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~|(?<=ui)i+|@\S+|\.+|(?<=na)a+(?