From 3855d0dd3cce345656d7332868fd71164700d1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 11 Jul 2020 00:41:50 +0200 Subject: [PATCH] [twitter] add debug messages for all skipped Tweets (#867) --- gallery_dl/extractor/twitter.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index d3a6d4c5..05982eb9 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -42,9 +42,14 @@ class TwitterExtractor(Extractor): for tweet in self.tweets(): - if (not self.retweets and "retweeted_status_id_str" in tweet or - not self.replies and "in_reply_to_user_id_str" in tweet or - not self.quoted and "quoted" in tweet): + if not self.retweets and "retweeted_status_id_str" in tweet: + self.log.debug("Skipping %s (retweet)", tweet["id_str"]) + continue + if not self.replies and "in_reply_to_user_id_str" in tweet: + self.log.debug("Skipping %s (reply)", tweet["id_str"]) + continue + if not self.quoted and "quoted" in tweet: + self.log.debug("Skipping %s (quoted tweet)", tweet["id_str"]) continue if self.twitpic: @@ -525,8 +530,8 @@ class TwitterAPI(): entry["content"]["item"]["content"]["tweet"]["id"]] except KeyError: self.extractor.log.debug( - "Skipping unavailable Tweet %s", - entry["entryId"][6:]) + "Skipping %s (deleted)", + entry["entryId"][len(entry_tweet):]) continue tweet["user"] = users[tweet["user_id_str"]]