From fd5869f7df0ce6a161494457705b1bf683bba172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 18 Dec 2024 08:53:27 +0100 Subject: [PATCH] [bilibili] support '/upload/opus' URLs (#6687) --- gallery_dl/extractor/bilibili.py | 3 ++- test/results/bilibili.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/bilibili.py b/gallery_dl/extractor/bilibili.py index 3b814218b20..b9de1656914 100644 --- a/gallery_dl/extractor/bilibili.py +++ b/gallery_dl/extractor/bilibili.py @@ -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): diff --git a/test/results/bilibili.py b/test/results/bilibili.py index 9786fbd0cd7..d608f78b0b9 100644 --- a/test/results/bilibili.py +++ b/test/results/bilibili.py @@ -60,4 +60,9 @@ "#count" : range(50, 100), }, +{ + "#url" : "https://space.bilibili.com/405279279/upload/opus", + "#class" : bilibili.BilibiliUserArticlesExtractor, +}, + )