From d33227fc3803c588084d2af6ab7efc86724fa798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 29 Jan 2022 23:08:33 +0100 Subject: [PATCH] [twitter] restore errors for protected timelines etc (fixes #2237) --- gallery_dl/extractor/twitter.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index f924292a..699c1bce 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -1083,13 +1083,15 @@ class TwitterAPI(): instructions = (data["user"]["result"]["timeline"] ["timeline"]["instructions"]) else: + instructions = data for key in path: - data = data[key] - instructions = data["instructions"] + instructions = instructions[key] + instructions = instructions["instructions"] entries = instructions[0]["entries"] except (KeyError, IndexError): - return + self.extractor.log.debug(data) + raise exception.StopExtraction("Unable to retrieve Tweets") tweets = [] tweet = cursor = None