From 2aa47e838258fa2b09c0f318e11b0659cbd8773a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 3 Mar 2022 01:56:14 +0100 Subject: [PATCH] [twitter] handle Tweets with "softIntervention" entries or other such things where the actual Tweet data is one level deeper than usual --- gallery_dl/extractor/twitter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 7505d0db..6d518342 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -649,6 +649,10 @@ class TwitterTweetExtractor(TwitterExtractor): ("https://twitter.com/i/web/status/1460044411165888515", { "count": 0, }), + # "Misleading" content + ("https://twitter.com/i/web/status/1486373748911575046", { + "count": 4, + }), ) def __init__(self, match): @@ -1166,6 +1170,8 @@ class TwitterAPI(): if "tombstone" in tweet: self._report_tombstone(entry, tweet["tombstone"]) continue + if "tweet" in tweet: + tweet = tweet["tweet"] legacy = tweet["legacy"] except KeyError: extr.log.debug(