From bd932b686045045d002442e860fd905ab3420071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 31 Aug 2024 17:01:58 +0200 Subject: [PATCH] [twitter] add 'info' as a possible 'include' value (#6114) --- docs/configuration.rst | 1 + gallery_dl/extractor/twitter.py | 1 + test/results/twitter.py | 12 ++++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 049626d90f..b9eca00d81 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -4093,6 +4093,7 @@ Description when processing a user profile. Possible values are + ``"info"``, ``"avatar"``, ``"background"``, ``"timeline"``, diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 432161fa56..d4ec343cd3 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -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"), diff --git a/test/results/twitter.py b/test/results/twitter.py index d83c41129a..6da5d68e42 100644 --- a/test/results/twitter.py +++ b/test/results/twitter.py @@ -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", + ], }, {