mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-19 19:58:30 +00:00
Populate formats
only after checking streamUrl
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
parent
93a2278b99
commit
26d59b5c1d
@ -119,10 +119,10 @@ def _real_extract(self, url):
|
||||
video_info = self._call_api(region, video_id, 'data', note='Trying fallback', fatal=True)
|
||||
video_extra = {}
|
||||
|
||||
formats = traverse_obj(video_info, ('extStreams', ..., {
|
||||
'url': ('streamUrl', {url_or_none}),
|
||||
'container': ('contentType', {mimetype2ext}),
|
||||
'aspect_ratio': ('aspectRatio'),
|
||||
formats = traverse_obj(video_info, ('extStreams', lambda _, v: url_or_none(v['streamUrl']), {
|
||||
'url': 'streamUrl',
|
||||
'ext': ('contentType', {mimetype2ext}),
|
||||
'aspect_ratio': ('aspectRatio', {float_or_none}),
|
||||
}))
|
||||
|
||||
for cur_format in formats:
|
||||
|
Loading…
Reference in New Issue
Block a user