From 14c835962ccbe7c7269792e11517d5fada73cfbf Mon Sep 17 00:00:00 2001 From: PC Date: Sat, 10 Oct 2015 15:09:19 +0100 Subject: [PATCH] multimedia_id extracted from meta still uses old method as fallback --- youtube_dl/extractor/iol.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/iol.py b/youtube_dl/extractor/iol.py index 1605ca7c3..7d22f6610 100644 --- a/youtube_dl/extractor/iol.py +++ b/youtube_dl/extractor/iol.py @@ -52,9 +52,14 @@ class IOLIE(InfoExtractor): m3u8_url = self._html_search_regex(r'''videoUrl:\s*'([^']+\.m3u8[^']*)'\s*,''', webpage, 'm3u8 playlist') formats = self._extract_m3u8_formats(m3u8_url, video_id, ext='mp4') - match = re.search(r'smil:([0-9a-f]{24})-L', m3u8_url, re.IGNORECASE) - if match: - multimedia_id = match.group(1) + multimedia_id = self._html_search_meta('iol:id', webpage, 'multimedia_id', fatal=False, default=None) + if multimedia_id is None: + match = re.search(r'smil:([0-9a-f]{24})-L', m3u8_url, re.IGNORECASE) + self.report_extraction('multimedia_id (fallback)') + if match: + multimedia_id = match.group(1) + + if multimedia_id is not None: m3u8_url_default = 'http://video-on-demand.iol.pt/vod_http/mp4:' + multimedia_id + '-L-500k.mp4/playlist.m3u8' formats_m3u8_default = self._extract_m3u8_formats(m3u8_url_default, video_id, ext='mp4') formats.extend(formats_m3u8_default)