mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 05:36:56 +01:00
This commit is contained in:
parent
0facd2af3e
commit
59a9efe85b
@ -74,7 +74,7 @@ def extract_formats(node):
|
|||||||
preference = -1 if proto == 'rtmp' else 1
|
preference = -1 if proto == 'rtmp' else 1
|
||||||
label = child.get('label')
|
label = child.get('label')
|
||||||
tbr = int_or_none(child.get('bitrate'))
|
tbr = int_or_none(child.get('bitrate'))
|
||||||
width, height = [int_or_none(x) for x in child.get('resolution', 'x').split('x')]
|
width, height = [int_or_none(x) for x in child.get('resolution', 'x').split('x')[:2]]
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': '%s-%s' % (proto, label if label else tbr),
|
'format_id': '%s-%s' % (proto, label if label else tbr),
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
|
Loading…
Reference in New Issue
Block a user