From bcbbb98bfe5c5309f447901c2de4f793647752fc Mon Sep 17 00:00:00 2001 From: remitamine Date: Sat, 6 Feb 2016 06:47:38 +0100 Subject: [PATCH] [generic] extract dash formats detected using content type --- youtube_dl/extractor/generic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index c02fe201c..4c2c76dc5 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1229,13 +1229,15 @@ class GenericIE(InfoExtractor): # Check for direct link to a video content_type = head_response.headers.get('Content-Type', '') - m = re.match(r'^(?Paudio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P.+)$', content_type) + m = re.match(r'^(?Paudio|video|application(?=/(?:ogg$|dash\+xml|(?:vnd\.apple\.|x-)?mpegurl)))/(?P.+)$', content_type) if m: upload_date = unified_strdate( head_response.headers.get('Last-Modified')) formats = [] if m.group('format_id').endswith('mpegurl'): formats = self._extract_m3u8_formats(url, video_id, 'mp4') + elif m.group('format_id').startswith('dash+xml'): + formats = self._extract_mpd_formats(url, video_id) else: formats = [{ 'format_id': m.group('format_id'), -- 2.39.5