diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py index 7413b5a0bd..3bd06489d9 100644 --- a/gallery_dl/extractor/weibo.py +++ b/gallery_dl/extractor/weibo.py @@ -225,9 +225,6 @@ class WeiboUserExtractor(WeiboExtractor): pattern = USER_PATTERN + r"(?:$|#)" example = "https://weibo.com/USER" - def initialize(self): - pass - def items(self): base = "{}/u/{}?tabtype=".format(self.root, self._user_id()) return self._dispatch_extractors(( diff --git a/test/results/weibo.py b/test/results/weibo.py index 639994c08b..68e27f8f88 100644 --- a/test/results/weibo.py +++ b/test/results/weibo.py @@ -13,7 +13,35 @@ "#url" : "https://weibo.com/1758989602", "#category": ("", "weibo", "user"), "#class" : weibo.WeiboUserExtractor, - "#pattern" : r"^https://weibo\.com/u/1758989602\?tabtype=feed$", + "#urls" : "https://weibo.com/u/1758989602?tabtype=feed", +}, + +{ + "#url" : "https://weibo.com/1758989602", + "#category": ("", "weibo", "user"), + "#class" : weibo.WeiboUserExtractor, + "#options" : {"include": "all"}, + "#urls" : ( + "https://weibo.com/u/1758989602?tabtype=home", + "https://weibo.com/u/1758989602?tabtype=feed", + "https://weibo.com/u/1758989602?tabtype=video", + "https://weibo.com/u/1758989602?tabtype=newVideo", + "https://weibo.com/u/1758989602?tabtype=album", + ), +}, + +{ + "#url" : "https://weibo.com/zhouyuxi77", + "#category": ("", "weibo", "user"), + "#class" : weibo.WeiboUserExtractor, + "#urls" : "https://weibo.com/u/7488709788?tabtype=feed", +}, + +{ + "#url" : "https://www.weibo.com/n/周于希Sally", + "#category": ("", "weibo", "user"), + "#class" : weibo.WeiboUserExtractor, + "#urls" : "https://weibo.com/u/7488709788?tabtype=feed", }, { @@ -69,9 +97,11 @@ "#class" : weibo.WeiboFeedExtractor, "#range" : "1", - "status": {"user": { - "id" : 7488709788, -}}, + "status": { + "user": { + "id": 7488709788, + }, + }, }, { @@ -80,9 +110,12 @@ "#class" : weibo.WeiboFeedExtractor, "#range" : "1", - "status": {"user": { - "id" : 7488709788, -}}, + + "status": { + "user": { + "id": 7488709788, + }, + }, }, {