Skip to content

Commit

Permalink
[twitter] add 'info' as a possible 'include' value (#6114)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 31, 2024
1 parent ef8b1bc commit bd932b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4093,6 +4093,7 @@ Description
when processing a user profile.

Possible values are
``"info"``,
``"avatar"``,
``"background"``,
``"timeline"``,
Expand Down
1 change: 1 addition & 0 deletions gallery_dl/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ def finalize(self):
def items(self):
base = "{}/{}/".format(self.root, self.user)
return self._dispatch_extractors((
(TwitterInfoExtractor , base + "info"),
(TwitterAvatarExtractor , base + "photo"),
(TwitterBackgroundExtractor, base + "header_photo"),
(TwitterTimelineExtractor , base + "timeline"),
Expand Down
12 changes: 10 additions & 2 deletions test/results/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@
"#category": ("", "twitter", "user"),
"#class" : twitter.TwitterUserExtractor,
"#options" : {"include": "all"},
"#pattern" : r"https://x\.com/supernaturepics/(photo|header_photo|timeline|tweets|media|with_replies|likes)$",
"#count" : 7,
"#urls" : [
"https://x.com/supernaturepics/info",
"https://x.com/supernaturepics/photo",
"https://x.com/supernaturepics/header_photo",
"https://x.com/supernaturepics/timeline",
"https://x.com/supernaturepics/tweets",
"https://x.com/supernaturepics/media",
"https://x.com/supernaturepics/with_replies",
"https://x.com/supernaturepics/likes",
],
},

{
Expand Down

0 comments on commit bd932b6

Please sign in to comment.