Browse Source

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.
master
veryfluffybunny 1 year ago
committed by Felix Ableitner
parent
commit
7ce13b095e
  1. 2
      files/tootbot.py

2
files/tootbot.py

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

Loading…
Cancel
Save