handle spam for the "ui" word ("uiiii")
This commit is contained in:
parent
0271c1c6a0
commit
9d47e52782
1 changed files with 1 additions and 1 deletions
2
main.py
2
main.py
|
@ -33,7 +33,7 @@ class Listener(StreamListener):
|
||||||
"""Answer to tweets."""
|
"""Answer to tweets."""
|
||||||
if status._json["user"]["id"] in self.listOfFriendsID:
|
if status._json["user"]["id"] in self.listOfFriendsID:
|
||||||
if seniority(status._json["created_at"]):
|
if seniority(status._json["created_at"]):
|
||||||
tweetText = sub(r'https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~', '', status._json["text"])
|
tweetText = sub(r'https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~', '', sub(r'(?<=ui)i+', '', status._json["text"].lower()))
|
||||||
lastWord = tweetText.split()[-1:][0].lower()
|
lastWord = tweetText.split()[-1:][0].lower()
|
||||||
if lastWord in universalBase:
|
if lastWord in universalBase:
|
||||||
if lastWord in quoiBase:
|
if lastWord in quoiBase:
|
||||||
|
|
Reference in a new issue