From 608bc7519f1059b72f7d590c821fba859d332972 Mon Sep 17 00:00:00 2001 From: jeancf Date: Sun, 13 Nov 2022 22:35:46 +0100 Subject: [PATCH] Corrected condition on retweet tag --- twoot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twoot.py b/twoot.py index 1b72cf2..37f348d 100755 --- a/twoot.py +++ b/twoot.py @@ -415,7 +415,7 @@ def main(argv): # Check if retweets must be skipped if suppress_retweets: # Check if this tweet is a retweet - if len(status.select("div.tweet-body > div > div.tweet-header")) != 0: + if len(status.select("div.tweet-body > div > div.retweet-header")) != 0: logging.debug("Retweet ignored per command-line configuration") continue @@ -453,7 +453,7 @@ def main(argv): tweet_text += 'Replying to ' + replying_to_class[0].a.get_text() + '\n\n' # Check it the tweet is a retweet from somebody else - if len(status.select("div.tweet-body > div > div.tweet-header")) != 0: + if len(status.select("div.tweet-body > div > div.retweet-header")) != 0: tweet_text = 'RT from ' + author + ' (@' + author_account + ')\n\n' # extract iterator over tweet text contents