Case insensitive check on skipping retweets

A Twitter account renamed itself to the same name but with different capitalization. Making the check insensitive saves from needing to update the cron job.
This commit is contained in:
veryfluffybunny 2020-08-31 22:43:21 -04:00 committed by Felix Ableitner
parent 048c76d07c
commit 7ce13b095e
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ for t in reversed(d.entries[0:5]):
sys.exit(1)
# t.author is formatted like (@user) for some weird reason
if re.sub('[()@]', '', t.author) != twitter:
if re.sub('[()@]', '', t.author.lower()) != twitter.lower():
# skip retweets
continue