Upgrade yt_dlp and download script
This commit is contained in:
@@ -5,6 +5,7 @@ from ..utils import (
|
||||
determine_ext,
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
join_nonempty,
|
||||
mimetype2ext,
|
||||
try_get,
|
||||
urljoin,
|
||||
@@ -102,7 +103,7 @@ class YandexDiskIE(InfoExtractor):
|
||||
'format_id': 'source',
|
||||
'ext': determine_ext(title, meta.get('ext') or mimetype2ext(meta.get('mime_type')) or 'mp4'),
|
||||
'quality': 1,
|
||||
'filesize': int_or_none(meta.get('size'))
|
||||
'filesize': int_or_none(meta.get('size')),
|
||||
})
|
||||
|
||||
for video in (video_streams.get('videos') or []):
|
||||
@@ -116,12 +117,9 @@ class YandexDiskIE(InfoExtractor):
|
||||
else:
|
||||
size = video.get('size') or {}
|
||||
height = int_or_none(size.get('height'))
|
||||
format_id = 'hls'
|
||||
if height:
|
||||
format_id += '-%dp' % height
|
||||
formats.append({
|
||||
'ext': 'mp4',
|
||||
'format_id': format_id,
|
||||
'format_id': join_nonempty('hls', height and f'{height}p'),
|
||||
'height': height,
|
||||
'protocol': 'm3u8_native',
|
||||
'url': format_url,
|
||||
|
Reference in New Issue
Block a user