From fbec4004f904b885af5bee1e73045e1e97bad48f Mon Sep 17 00:00:00 2001 From: jeancf Date: Thu, 17 Dec 2020 17:56:12 +0100 Subject: [PATCH] Handled reply-to --- twoot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/twoot.py b/twoot.py index 294ea21..225ebc0 100755 --- a/twoot.py +++ b/twoot.py @@ -295,9 +295,14 @@ def main(argv): # Extract URL of full status page (for video download) full_status_url = 'https://twitter.com' + tweet_id + # Initialize tweet text + tweet_text = '' + # TODO Check if the tweet is a reply-to #
Replying to @tomwarren
- being_replied_to = status.find('div', class_='replying-to').a.get_text() + replying_to_class = status.find('div', class_='replying-to') + if replying_to_class is not None: + tweet_text += 'Replying to ' + replying_to_class.a.get_text() # Check it the tweet is a retweet from somebody else if author_account.lower() != twit_account.lower():