From 9fa4f54c246165789d147ababa5370242c658a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 1 Jan 2024 22:58:42 +0100 Subject: [PATCH] [twitter] raise error for invalid 'strategy' values (#4953) --- gallery_dl/extractor/twitter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index fdcefddc..aa9ab9f6 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -552,9 +552,11 @@ class TwitterTimelineExtractor(TwitterExtractor): return self.api.user_media if strategy == "tweets": return self.api.user_tweets + if strategy == "media": + return self.api.user_media if strategy == "with_replies": return self.api.user_tweets_and_replies - return self.api.user_media + raise exception.StopExtraction("Invalid strategy '%s'", strategy) class TwitterTweetsExtractor(TwitterExtractor):