1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-15 08:58:28 +00:00

[ie/icareus] Fix subtitle info reading

This commit is contained in:
Aarni Koskela 2024-11-15 18:28:51 +02:00
parent a3c0321825
commit 7bcddc1061

View File

@ -97,10 +97,12 @@ def _real_extract(self, url):
'token': self._search_regex(r"_icareus\['token'\]\s*=\s*'([a-f0-9]+)'", webpage, 'icareus_token'),
}))
subtitles = {
remove_end(sdesc.split(' ')[0], ':'): [{'url': url_or_none(surl)}]
for _, sdesc, surl in assets.get('subtitles') or []
}
subtitles = {}
for sub_info in assets.get('subtitles') or []:
_, sdesc, surl = sub_info[:3]
sub_name = remove_end(sdesc.split(' ')[0], ':')
subtitles[sub_name] = [{'url': url_or_none(surl)}]
formats = [{
'format': item.get('name'),