From 2bbdfede1175fce02e4a7aed55535b9c45b17061 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 1 Dec 2019 14:46:13 +0100 Subject: [PATCH] Fix conditional to detect retweets --- tootbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tootbot.py b/tootbot.py index 8821c93..2e67508 100755 --- a/tootbot.py +++ b/tootbot.py @@ -72,7 +72,8 @@ for t in reversed(d.entries[0:5]): print("ERROR: First Login Failed!") sys.exit(1) - if t.author != '(%s)' % twitter: + # t.author is formatted like (@user) for some weird reason + if re.sub('[()@]', '', t.author) != twitter: # skip retweets continue