removing link for better detection

This commit is contained in:
Mylloon 2021-08-03 20:53:32 +02:00
parent 2c7dff41ef
commit e9e321aa36

View file

@ -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: