adding 3dots char
This commit is contained in:
parent
258eaca327
commit
5f060f9e24
1 changed files with 1 additions and 1 deletions
2
main.py
2
main.py
|
@ -34,7 +34,7 @@ class Listener(StreamListener):
|
|||
if status._json["user"]["id"] in self.listOfFriendsID: # verification of the author of the tweet
|
||||
if seniority(status._json["created_at"]): # verification of the age of the tweet
|
||||
# recovery of the last "usable" word of the tweet
|
||||
regex = r"https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~|(?<=ui)i+|@\S+|\.+|(?<=na)a+(?<!n)|(?<=quoi)i+|(?<=no)o+(?<!n)"
|
||||
regex = r"https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~|(?<=ui)i+|@\S+|\.+|(?<=na)a+(?<!n)|(?<=quoi)i+|(?<=no)o+(?<!n)|…"
|
||||
tweetText = sub(regex, "", status._json["text"].lower())
|
||||
lastWord = tweetText.split()[-1:][0]
|
||||
print(f"Tweet trouvé (dernier mot: \"{lastWord}\")...", end = " ")
|
||||
|
|
Reference in a new issue