From a8c2d997e86c6dd780bfa022d2c10ddfbe6f3f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 21 Jun 2020 19:09:43 +0200 Subject: [PATCH] [twitter] treat quoted tweets like retweets (#833) - filter them when 'retweets' is disabled - set 'author' to the creator of the quoted tweet like it was before the rewrite --- gallery_dl/extractor/twitter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 3d17eb48..005d5f40 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -41,7 +41,9 @@ class TwitterExtractor(Extractor): for tweet in self.tweets(): - if not self.retweets and "retweeted_status_id_str" in tweet or \ + if not self.retweets and ( + "retweeted_status_id_str" in tweet or + "quoted_status_id_str" in tweet) or \ not self.replies and "in_reply_to_user_id_str" in tweet: continue @@ -514,6 +516,7 @@ class TwitterAPI(): if "quoted_status_id_str" in tweet: quoted = tweets.get(tweet["quoted_status_id_str"]) if quoted: + tweet["author"] = users[quoted["user_id_str"]] tweet["full_text_quoted"] = quoted["full_text"] if "extended_entities" in quoted: tweet["extended_entities"] = \