diff options
author | remitamine <remitamine@gmail.com> | 2016-05-23 13:04:50 +0100 |
---|---|---|
committer | remitamine <remitamine@gmail.com> | 2016-05-23 13:04:50 +0100 |
commit | 05b651e3a58081492eb35d896c80dd1bdb87081c (patch) | |
tree | 47b0dc73174d96ab8f2c34dc2248366a5a31d182 | |
parent | 42a7439717610530b0f7c630ef0eecf1b0638475 (diff) |
[washingtonpost] reduce requests for m3u8 manifests
-rw-r--r-- | youtube_dl/extractor/washingtonpost.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/washingtonpost.py b/youtube_dl/extractor/washingtonpost.py index c2c5bae05..839cad986 100644 --- a/youtube_dl/extractor/washingtonpost.py +++ b/youtube_dl/extractor/washingtonpost.py @@ -44,7 +44,7 @@ class WashingtonPostIE(InfoExtractor): video_type = s.get('type') if video_type == 'smil': continue - elif video_type in ('ts', 'hls'): + elif video_type in ('ts', 'hls') and ('_master.m3u8' in s_url or '_mobile.m3u8' in s_url): m3u8_formats = self._extract_m3u8_formats( s_url, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False) for m3u8_format in m3u8_formats: @@ -74,6 +74,8 @@ class WashingtonPostIE(InfoExtractor): 'vcodec': s.get('videoCodec') if has_width else 'none', 'filesize': int_or_none(s.get('fileSize')), 'url': s_url, + 'ext': 'mp4', + 'protocol': 'm3u8_native' if video_type in ('ts', 'hls') else None, }) source_media_url = video_data.get('sourceMediaURL') if source_media_url: |