aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/anvato.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-10-15 01:44:57 +0700
committerSergey M․ <dstftw@gmail.com>2017-10-15 01:44:57 +0700
commit210a2720bcdaf4f98561fefea021f42cae39462d (patch)
tree90031689ee03c9df3dee64069098f5bfa87eacaa /youtube_dl/extractor/anvato.py
parent685e87b61f785b096745cda5ea64ea0b950f56d1 (diff)
downloadyoutube-dl-210a2720bcdaf4f98561fefea021f42cae39462d.tar.xz
[anvato] Process master m3u8 manifests
>>> Individual m3u8 manifests are not always present, e.g. anvato:anvato_scripps_app_web_prod_0837996dbe373629133857ae9eb72e740424d80a:4173834
Diffstat (limited to 'youtube_dl/extractor/anvato.py')
-rw-r--r--youtube_dl/extractor/anvato.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/youtube_dl/extractor/anvato.py b/youtube_dl/extractor/anvato.py
index 8023da702..e443ecff6 100644
--- a/youtube_dl/extractor/anvato.py
+++ b/youtube_dl/extractor/anvato.py
@@ -197,12 +197,16 @@ class AnvatoIE(InfoExtractor):
'tbr': tbr if tbr != 0 else None,
}
- if ext == 'm3u8' or media_format in ('m3u8', 'm3u8-variant'):
- if tbr is not None:
- a_format.update({
- 'format_id': '-'.join(filter(None, ['hls', compat_str(tbr)])),
- 'ext': 'mp4',
- })
+ if media_format == 'm3u8' and tbr is not None:
+ a_format.update({
+ 'format_id': '-'.join(filter(None, ['hls', compat_str(tbr)])),
+ 'ext': 'mp4',
+ })
+ elif media_format == 'm3u8-variant' or ext == 'm3u8':
+ formats.extend(self._extract_m3u8_formats(
+ video_url, video_id, 'mp4', entry_protocol='m3u8_native',
+ m3u8_id='hls', fatal=False))
+ continue
elif ext == 'mp3' or media_format == 'mp3':
a_format['vcodec'] = 'none'
else: