未验证 提交 41675745 编写于 作者: M Mort Yao

[extractor] use best quality from dash_streams if streams_sorted is empty

上级 56e4c5c9
......@@ -196,7 +196,10 @@ class VideoExtractor():
else:
# Download stream with the best quality
from .processor.ffmpeg import has_ffmpeg_installed
stream_id = self.streams_sorted[0]['id'] if 'id' in self.streams_sorted[0] else self.streams_sorted[0]['itag']
if self.streams_sorted:
stream_id = self.streams_sorted[0]['id'] if 'id' in self.streams_sorted[0] else self.streams_sorted[0]['itag']
else:
stream_id = list(self.dash_streams)[-1]
if 'index' not in kwargs:
self.p(stream_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册