Skip to content

Commit

Permalink
[twitter] raise error for invalid 'strategy' values (#4953)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 1, 2024
1 parent 516c692 commit 9fa4f54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gallery_dl/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,11 @@ def _select_tweet_source(self):
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):
Expand Down

0 comments on commit 9fa4f54

Please sign in to comment.