aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/streamcz.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/streamcz.py')
-rw-r--r--hypervideo_dl/extractor/streamcz.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/hypervideo_dl/extractor/streamcz.py b/hypervideo_dl/extractor/streamcz.py
index 4cb9923..c4537ba 100644
--- a/hypervideo_dl/extractor/streamcz.py
+++ b/hypervideo_dl/extractor/streamcz.py
@@ -1,4 +1,3 @@
-# coding: utf-8
import json
from .common import InfoExtractor
@@ -53,8 +52,8 @@ class StreamCZIE(InfoExtractor):
def _extract_formats(self, spl_url, video):
for ext, pref, streams in (
- ('ts', -1, traverse_obj(video, ('http_stream', 'qualities'))),
- ('mp4', 1, video.get('mp4'))):
+ ('ts', -1, traverse_obj(video, ('http_stream', 'qualities')) or {}),
+ ('mp4', 1, video.get('mp4') or {})):
for format_id, stream in streams.items():
if not stream.get('url'):
continue
@@ -110,7 +109,6 @@ class StreamCZIE(InfoExtractor):
})
formats = list(self._extract_formats(spl_url, video))
- self._sort_formats(formats)
return {
'id': video_id,