1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 10:32:54 +08:00

[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.
This commit is contained in:
Antonio Ospite 2019-01-04 17:17:04 +01:00
parent c87f65e43d
commit 7ddddf4bf6

5
youtube_dl/extractor/rai.py Normal file → Executable file
View File

@ -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'),