Skip to content

Commit

Permalink
[bilibili] support '/upload/opus' URLs (#6687)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Dec 18, 2024
1 parent 5fbd0c3 commit fd5869f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def _init(self):
class BilibiliUserArticlesExtractor(BilibiliExtractor):
"""Extractor for a bilibili user's articles"""
subcategory = "user-articles"
pattern = r"(?:https?://)?space\.bilibili\.com/(\d+)/article"
pattern = (r"(?:https?://)?space\.bilibili\.com/(\d+)"
r"/(?:article|upload/opus)")
example = "https://space.bilibili.com/12345/article"

def items(self):
Expand Down
5 changes: 5 additions & 0 deletions test/results/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,9 @@
"#count" : range(50, 100),
},

{
"#url" : "https://space.bilibili.com/405279279/upload/opus",
"#class" : bilibili.BilibiliUserArticlesExtractor,
},

)

0 comments on commit fd5869f

Please sign in to comment.