add support for BVID of bilibili

This commit is contained in:
brainbush 2020-03-23 15:52:15 +08:00
parent 50318b1e4d
commit b4ea5976fb

View File

@ -159,7 +159,7 @@ class Bilibili(VideoExtractor):
sort = 'live' sort = 'live'
elif re.match(r'https?://vc\.bilibili\.com/video/(\d+)', self.url): elif re.match(r'https?://vc\.bilibili\.com/video/(\d+)', self.url):
sort = 'vc' sort = 'vc'
elif re.match(r'https?://(www\.)?bilibili\.com/video/av(\d+)', self.url): elif re.match(r'https?://(www\.)?bilibili\.com/video/(av(\d+)|(BV(\S+)))', self.url):
sort = 'video' sort = 'video'
else: else:
self.download_playlist_by_url(self.url, **kwargs) self.download_playlist_by_url(self.url, **kwargs)