diff options
author | N/Ame <173015200+grqz@users.noreply.github.com> | 2024-08-16 07:33:41 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 19:33:41 +0000 |
commit | b43bd864851f2862e26caa85461c5d825d49d463 (patch) | |
tree | 832224da50d19c8d11a305061f282efc8d3d6a4a | |
parent | 232e6db30c474d1b387e405342f34173ceeaf832 (diff) |
[ie/bilibili] Fix festival URL support (#10740)
Closes #10739
Authored by: grqz, bashonly
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
-rw-r--r-- | yt_dlp/extractor/bilibili.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index a84b7a6f7..3163df8ab 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -298,7 +298,7 @@ class BilibiliBaseIE(InfoExtractor): class BiliBiliIE(BilibiliBaseIE): - _VALID_URL = r'https?://(?:www\.)?bilibili\.com/(?:video/|festival/\w+\?(?:[^#]*&)?bvid=)[aAbB][vV](?P<id>[^/?#&]+)' + _VALID_URL = r'https?://(?:www\.)?bilibili\.com/(?:video/|festival/[^/?#]+\?(?:[^#]*&)?bvid=)[aAbB][vV](?P<id>[^/?#&]+)' _TESTS = [{ 'url': 'https://www.bilibili.com/video/BV13x41117TL', @@ -622,6 +622,10 @@ class BiliBiliIE(BilibiliBaseIE): 'ext': 'mp4', }, 'skip': 'geo-restricted', + }, { + 'note': 'has - in the last path segment of the url', + 'url': 'https://www.bilibili.com/festival/bh3-7th?bvid=BV1tr4y1f7p2&', + 'only_matching': True, }] def _real_extract(self, url): |