X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/d88adeed4f0a22f14db3a2b3fd3c59b266b97a78..eeb287ed58128659e5de200bba1e0762fb972560:/youtube_dl/extractor/bilibili.py diff --git a/youtube_dl/extractor/bilibili.py b/youtube_dl/extractor/bilibili.py index 0d5889f..75d7448 100644 --- a/youtube_dl/extractor/bilibili.py +++ b/youtube_dl/extractor/bilibili.py @@ -5,8 +5,6 @@ import re from .common import InfoExtractor from ..utils import ( - compat_parse_qs, - ExtractorError, int_or_none, unified_strdate, ) @@ -29,10 +27,9 @@ class BiliBiliIE(InfoExtractor): } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') - + video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) + video_code = self._search_regex( r'(?s)
(.*?)
', webpage, 'video code') @@ -55,45 +52,38 @@ class BiliBiliIE(InfoExtractor): thumbnail = self._html_search_meta( 'thumbnailUrl', video_code, 'thumbnail', fatal=False) - player_params = compat_parse_qs(self._html_search_regex( - r'