1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[twitter] raise error for invalid 'strategy' values (#4953)

This commit is contained in:
Mike Fährmann 2024-01-01 22:58:42 +01:00
parent 516c69297d
commit 9fa4f54c24
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -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):