diff options
author | remitamine <remitamine@gmail.com> | 2016-03-18 11:50:04 +0100 |
---|---|---|
committer | remitamine <remitamine@gmail.com> | 2016-03-18 11:51:34 +0100 |
commit | 61870915323abd126f5440282b1fd5734ee1ce6f (patch) | |
tree | 8b7bd92a69bdb538c208f3b07bdc2cbb5cb28b98 /youtube_dl/extractor/once.py | |
parent | 0d33166ec586b9c75e20835adca927e923cb36e3 (diff) |
[once] check http formats availability
Diffstat (limited to 'youtube_dl/extractor/once.py')
-rw-r--r-- | youtube_dl/extractor/once.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/once.py b/youtube_dl/extractor/once.py index 403f8c0af..080045d4c 100644 --- a/youtube_dl/extractor/once.py +++ b/youtube_dl/extractor/once.py @@ -14,13 +14,12 @@ class OnceIE(InfoExtractor): def _extract_once_formats(self, url): domain_id, application_id, media_item_id = re.match( OnceIE._VALID_URL, url).groups() - adaptive_formats = self._extract_m3u8_formats( + formats = self._extract_m3u8_formats( self.ADAPTIVE_URL_TEMPLATE % ( domain_id, application_id, media_item_id), media_item_id, 'mp4', m3u8_id='hls', fatal=False) - formats = [] - formats.extend(adaptive_formats) - for adaptive_format in adaptive_formats: + progressive_formats = [] + for adaptive_format in formats: rendition_id = self._search_regex( r'/now/media/playlist/[^/]+/[^/]+/([^/]+)', adaptive_format['url'], 'redition id', default=None) @@ -33,5 +32,7 @@ class OnceIE(InfoExtractor): 'hls', 'http'), 'protocol': 'http', }) - formats.append(progressive_format) + progressive_formats.append(progressive_format) + self._check_formats(progressive_formats, media_item_id) + formats.extend(progressive_formats) return formats |