mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-10 20:24:33 +01:00
[Amara] Add additional properties to info
This commit is contained in:
parent
18844dbac3
commit
df6d4f30cd
@ -24,7 +24,10 @@ class AmaraIE(InfoExtractor):
|
|||||||
{'ext': 'vtt', 'url': 'https://amara.org/api/videos/jVx79ZKGK1ky/languages/en/subtitles/?format=vtt'},
|
{'ext': 'vtt', 'url': 'https://amara.org/api/videos/jVx79ZKGK1ky/languages/en/subtitles/?format=vtt'},
|
||||||
{'ext': 'srt', 'url': 'https://amara.org/api/videos/jVx79ZKGK1ky/languages/en/subtitles/?format=srt'}
|
{'ext': 'srt', 'url': 'https://amara.org/api/videos/jVx79ZKGK1ky/languages/en/subtitles/?format=srt'}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
'upload_date': '20160813',
|
||||||
|
'uploader': 'PBS NewsHour',
|
||||||
|
'uploader_id': 'PBSNewsHour'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -249,7 +252,8 @@ class AmaraIE(InfoExtractor):
|
|||||||
{'ext': 'vtt', 'url': 'https://amara.org/api/videos/s8KL7I3jLmh6/languages/my/subtitles/?format=vtt'},
|
{'ext': 'vtt', 'url': 'https://amara.org/api/videos/s8KL7I3jLmh6/languages/my/subtitles/?format=vtt'},
|
||||||
{'ext': 'srt', 'url': 'https://amara.org/api/videos/s8KL7I3jLmh6/languages/my/subtitles/?format=srt'}
|
{'ext': 'srt', 'url': 'https://amara.org/api/videos/s8KL7I3jLmh6/languages/my/subtitles/?format=srt'}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
'upload_date': '20131206'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -284,11 +288,11 @@ class AmaraIE(InfoExtractor):
|
|||||||
] + ie_info.get('subtitles', {}).get(language['code'], [])
|
] + ie_info.get('subtitles', {}).get(language['code'], [])
|
||||||
], filter(lambda language: language['published'], meta.get('languages', [])))))
|
], filter(lambda language: language['published'], meta.get('languages', [])))))
|
||||||
|
|
||||||
return {
|
info = ie_info.copy()
|
||||||
'id': video_id,
|
info.update({ 'id': video_id, 'subtitles': subtitles })
|
||||||
'title': meta.get('title') or ie_info.get('title'),
|
|
||||||
'description': meta.get('description') or ie_info.get('description'),
|
if meta['title']: info.update({ 'title': meta['title' ]})
|
||||||
'thumbnail': meta.get('thumbnail') or ie_info.get('thumbnail'),
|
if meta['description']: info.update({ 'description': meta['description' ]})
|
||||||
'formats': ie_info.get('formats'),
|
if meta['thumbnail']: info.update({ 'thumbnail': meta['thumbnail' ]})
|
||||||
'subtitles': subtitles
|
|
||||||
}
|
return info
|
||||||
|
Loading…
Reference in New Issue
Block a user