diff options
author | Remita Amine <remitamine@gmail.com> | 2017-01-31 14:47:56 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2017-01-31 14:47:56 +0100 |
commit | ae9a173b6421a3fdf70dd50d2dc0386f8861fe71 (patch) | |
tree | 50275d55b369a1c01bc162003351ba62c4d1d8ab /youtube_dl | |
parent | dadb836139f070da9364439bf3b148eec8bc0b11 (diff) |
[vimeo] extract both mixed and separated dash formats
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index c12eeadd4..8b6a5cc3c 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -142,10 +142,19 @@ class VimeoBaseInfoExtractor(InfoExtractor): note='Downloading %s m3u8 information' % cdn_name, fatal=False)) elif files_type == 'dash': - formats.extend(self._extract_mpd_formats( - manifest_url.replace('/master.json', '/master.mpd'), video_id, format_id, - 'Downloading %s MPD information' % cdn_name, - fatal=False)) + mpd_pattern = r'/%s/(?:sep/)?video/' % video_id + mpd_manifest_urls = [] + if re.search(mpd_pattern, manifest_url): + for suffix, repl in (('', 'video'), ('_sep', 'sep/video')): + mpd_manifest_urls.append((format_id + suffix, re.sub( + mpd_pattern, '/%s/%s/' % (video_id, repl), manifest_url))) + else: + mpd_manifest_urls = [(format_id, manifest_url)] + for f_id, m_url in mpd_manifest_urls: + formats.extend(self._extract_mpd_formats( + m_url.replace('/master.json', '/master.mpd'), video_id, f_id, + 'Downloading %s MPD information' % cdn_name, + fatal=False)) subtitles = {} text_tracks = config['request'].get('text_tracks') |