aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/streamcz.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-12-02 05:21:10 +0800
committerJesús <heckyel@hyperbola.info>2022-12-02 05:21:10 +0800
commiteaeeef9c1d1bedb76fea953c332ef84d53bffe2c (patch)
treec3cb5582247e47fc67c24cd7ff8ea857fb76821e /hypervideo_dl/extractor/streamcz.py
parent1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (diff)
downloadhypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.lz
hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.xz
hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.zip
update from upstream
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,