From e9e321aa36c69dd60e5bf700973bff7550f199ca Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 3 Aug 2021 20:53:32 +0200 Subject: [PATCH] removing link for better detection --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 4152001..6fa6d96 100644 --- a/main.py +++ b/main.py @@ -26,7 +26,7 @@ class Listener(StreamListener): def on_status(self, status): """Answer to tweets.""" if seniority(status._json["created_at"]): - tweetText = sub(r' +?\?|\?| +?\!| ?\!', '', status._json["text"]) + tweetText = sub(r'https?:\/\/\S+| +?\?|\?| +?\!| ?\!', '', status._json["text"]) if tweetText.endswith(tuple(quoi)): if status._json["user"]["screen_name"] in friends: try: