From 722e7192ddb3f8c321f127f455ca84b2e813cb50 Mon Sep 17 00:00:00 2001 From: cquest Date: Fri, 9 Jun 2017 15:00:10 +0200 Subject: [PATCH] missing @ to detect retweets --- tootbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tootbot.py b/tootbot.py index fb5f889..291cb5c 100755 --- a/tootbot.py +++ b/tootbot.py @@ -72,8 +72,8 @@ for t in reversed(d.entries): #h = BeautifulSoup(t.summary_detail.value, "html.parser") c = t.title - if t.author != '(%s)' % twitter: - c = ("RT %s\n" % t.author[1:-1]) + c + if t.author.lower() != ('(@%s)' % twitter).lower(): + c = ("RT https://twitter.com/%s\n" % t.author[2:-1]) + c toot_media = [] # get the pictures... for p in re.finditer(r"https://pbs.twimg.com/[^ \xa0\"]*", t.summary):