1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-03 21:22:51 +08:00

Handle video_id_type for older-type Bloomberg videos.

This commit is contained in:
Adam Buchbinder 2016-09-12 19:43:00 -07:00
parent 6bb6620208
commit d4d790d0e5

View File

@ -47,7 +47,9 @@ class BloombergIE(InfoExtractor):
video_id = self._search_regex(
r'["\']bmmrId["\']\s*:\s*(["\'])(?P<url>.+?)\1',
webpage, 'id', group='url', default=None)
if not video_id:
if video_id:
video_id_type = 'BMMR'
else:
bplayer_json = self._search_regex(r'BPlayer\(null,\s*({[^;]+})\);',
webpage, 'id')
# It's not good JSON; it uses single quotes and contains function