mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-18 03:08:31 +00:00
Only add filesize
if found, rather than using int_or_none
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
parent
26d59b5c1d
commit
2fad19eea0
@ -125,8 +125,9 @@ def _real_extract(self, url):
|
|||||||
'aspect_ratio': ('aspectRatio', {float_or_none}),
|
'aspect_ratio': ('aspectRatio', {float_or_none}),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
for cur_format in formats:
|
if filesize := traverse_obj(video_extract, ('storageSize', {int_or_none})):
|
||||||
cur_format['filesize'] = int_or_none(video_extra.get('storageSize'))
|
for fmt in formats:
|
||||||
|
fmt['filesize'] = filesize
|
||||||
|
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
for current_subs in video_info.get('subtitles'):
|
for current_subs in video_info.get('subtitles'):
|
||||||
|
Loading…
Reference in New Issue
Block a user