Upgrade yt_dlp and download script

This commit is contained in:
2025-05-02 16:11:08 -05:00
parent 3a2e8eeb08
commit d68d9ce4f9
1194 changed files with 60099 additions and 44436 deletions

View File

@@ -1,10 +1,10 @@
from base64 import b64decode
import base64
from .common import InfoExtractor
from ..utils import (
merge_dicts,
parse_iso8601,
parse_duration,
parse_iso8601,
parse_resolution,
try_get,
url_basename,
@@ -37,11 +37,11 @@ class MicrosoftStreamIE(InfoExtractor):
sub_dict = automatic_captions if track.get('autoGenerated') else subtitles
sub_dict.setdefault(track['language'], []).append({
'ext': 'vtt',
'url': track.get('url')
'url': track.get('url'),
})
return {
'subtitles': subtitles,
'automatic_captions': automatic_captions
'automatic_captions': automatic_captions,
}
def extract_all_subtitles(self, *args, **kwargs):
@@ -66,7 +66,7 @@ class MicrosoftStreamIE(InfoExtractor):
f'{api_url}/videos/{video_id}', video_id,
headers=headers, query={
'$expand': 'creator,tokens,status,liveEvent,extensions',
'api-version': '1.4-private'
'api-version': '1.4-private',
})
video_id = video_data.get('id') or video_id
language = video_data.get('language')
@@ -81,7 +81,7 @@ class MicrosoftStreamIE(InfoExtractor):
'url': thumbnail_url,
}
thumb_name = url_basename(thumbnail_url)
thumb_name = str(b64decode(thumb_name + '=' * (-len(thumb_name) % 4)))
thumb_name = str(base64.b64decode(thumb_name + '=' * (-len(thumb_name) % 4)))
thumb.update(parse_resolution(thumb_name))
thumbnails.append(thumb)