Skip to content

Commit

Permalink
[ie/bilibili] Fix festival URL support (#10740)
Browse files Browse the repository at this point in the history
Closes #10739
Authored by: grqz, bashonly

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
  • Loading branch information
grqz and bashonly authored Aug 15, 2024
1 parent 232e6db commit b43bd86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yt_dlp/extractor/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _get_interactive_entries(self, video_id, cid, metainfo, headers=None):


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',
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit b43bd86

Please sign in to comment.