diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-12-17 23:03:13 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-12-17 23:03:13 +0700 |
commit | 87a449c1edbbb3761fbb6fc3a100152aa961f95b (patch) | |
tree | ef6f1369238a713867c0a9542fa13ac45c48cf0b /youtube_dl/extractor | |
parent | 93753aad20991c3fc23566b9fb7db8299dbc9ba8 (diff) |
[extractor/common] Recognize DASH formats in html5 media entries
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/common.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 6ae946569..40f3e2323 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -1888,7 +1888,7 @@ class InfoExtractor(object): }) return formats - def _parse_html5_media_entries(self, base_url, webpage, video_id, m3u8_id=None, m3u8_entry_protocol='m3u8'): + def _parse_html5_media_entries(self, base_url, webpage, video_id, m3u8_id=None, m3u8_entry_protocol='m3u8', mpd_id=None): def absolute_url(video_url): return compat_urlparse.urljoin(base_url, video_url) @@ -1905,11 +1905,16 @@ class InfoExtractor(object): def _media_formats(src, cur_media_type): full_url = absolute_url(src) - if determine_ext(full_url) == 'm3u8': + ext = determine_ext(full_url) + if ext == 'm3u8': is_plain_url = False formats = self._extract_m3u8_formats( full_url, video_id, ext='mp4', entry_protocol=m3u8_entry_protocol, m3u8_id=m3u8_id) + elif ext == 'mpd': + is_plain_url = False + formats = self._extract_mpd_formats( + full_url, video_id, mpd_id=mpd_id) else: is_plain_url = True formats = [{ |