1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-04 16:41:19 +00:00

[bloomberg] Improve video id regex

This commit is contained in:
Sergey M․ 2015-11-28 22:41:39 +06:00
parent 9a4f12be98
commit 4191fdf147

View file

@ -28,7 +28,9 @@ class BloombergIE(InfoExtractor):
def _real_extract(self, url): def _real_extract(self, url):
name = self._match_id(url) name = self._match_id(url)
webpage = self._download_webpage(url, name) webpage = self._download_webpage(url, name)
video_id = self._search_regex(r'"bmmrId":"(.+?)"', webpage, 'id') video_id = self._search_regex(
r'["\']bmmrId["\']\s*:\s*(["\'])(?P<url>.+?)\1',
webpage, 'id', group='url')
title = re.sub(': Video$', '', self._og_search_title(webpage)) title = re.sub(': Video$', '', self._og_search_title(webpage))
embed_info = self._download_json( embed_info = self._download_json(