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

@@ -40,11 +40,11 @@ class TelegraafIE(InfoExtractor):
videoId
}
}
}''' % article_id,
}''' % article_id, # noqa: UP031
})['data']['article']['videos'][0]['videoId']
item = self._download_json(
'https://content.tmgvideo.nl/playlist/item=%s/playlist.json' % video_id,
f'https://content.tmgvideo.nl/playlist/item={video_id}/playlist.json',
video_id)['items'][0]
title = item['title']
@@ -62,7 +62,7 @@ class TelegraafIE(InfoExtractor):
formats.extend(self._extract_mpd_formats(
manifest_url, video_id, mpd_id='dash', fatal=False))
else:
self.report_warning('Unknown adaptive format %s' % ext)
self.report_warning(f'Unknown adaptive format {ext}')
for location in locations.get('progressive', []):
src = try_get(location, lambda x: x['sources'][0]['src'])
if not src:
@@ -72,7 +72,7 @@ class TelegraafIE(InfoExtractor):
'url': src,
'width': int_or_none(location.get('width')),
'height': int_or_none(location.get('height')),
'format_id': 'http' + ('-%s' % label if label else ''),
'format_id': 'http' + (f'-{label}' if label else ''),
})
return {