From 7ddddf4bf65b073e1fc268a63e170af0b60c92ed Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 4 Jan 2019 17:17:04 +0100 Subject: [PATCH] [raiplay] Add support for MPD format Some new 4K content on RaiPlay.it is served using DASH via an MPD manifest, e.g.: https://www.raiplay.it/video/2018/12/L-amica-geniale-S1E1-Le-bambole--4K-cd5f4664-261c-48d1-bed8-79cce415bea8.html Add support for MPD format to the raiplay extractor to enable downloading the video. --- youtube_dl/extractor/rai.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 youtube_dl/extractor/rai.py diff --git a/youtube_dl/extractor/rai.py b/youtube_dl/extractor/rai.py old mode 100644 new mode 100755 index 548a6553b..3cd9fb4e6 --- a/youtube_dl/extractor/rai.py +++ b/youtube_dl/extractor/rai.py @@ -71,13 +71,16 @@ class RaiBaseIE(InfoExtractor): continue ext = determine_ext(media_url) - if (ext == 'm3u8' and platform != 'mon') or (ext == 'f4m' and platform != 'flash'): + if (ext in ['m3u8', 'mpd'] and platform != 'mon') or (ext == 'f4m' and platform != 'flash'): continue if ext == 'm3u8': formats.extend(self._extract_m3u8_formats( media_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)) + elif ext == 'mpd': + formats.extend(self._extract_mpd_formats( + media_url, video_id, mpd_id='dash', fatal=False)) elif ext == 'f4m': manifest_url = update_url_query( media_url.replace('manifest#live_hds.f4m', 'manifest.f4m'),