mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2024-12-25 22:33:01 +01:00
[dailymotion] Fix subtitles extraction
This commit is contained in:
parent
0b534d2adc
commit
cbd2ffd031
@ -174,7 +174,9 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||||||
uploader_id = metadata.get('owner', {}).get('id')
|
uploader_id = metadata.get('owner', {}).get('id')
|
||||||
|
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
for subtitle_lang, subtitle in metadata.get('subtitles', {}).get('data', {}).items():
|
subtitles_data = metadata.get('subtitles', {}).get('data', {})
|
||||||
|
if subtitles_data and isinstance(subtitles_data, dict):
|
||||||
|
for subtitle_lang, subtitle in subtitles_data.items():
|
||||||
subtitles[subtitle_lang] = [{
|
subtitles[subtitle_lang] = [{
|
||||||
'ext': determine_ext(subtitle_url),
|
'ext': determine_ext(subtitle_url),
|
||||||
'url': subtitle_url,
|
'url': subtitle_url,
|
||||||
|
Loading…
Reference in New Issue
Block a user