mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-06 02:49:35 +02:00
[zdf] Extract subtitles (closes #9081)
This commit is contained in:
parent
6d4fc66bfc
commit
8c7d6e8e22
@ -85,6 +85,13 @@ def extract_from_xml_url(self, video_id, xml_url):
|
||||
uploader = xpath_text(doc, './/details/originChannelTitle', 'uploader')
|
||||
uploader_id = xpath_text(doc, './/details/originChannelId', 'uploader id')
|
||||
upload_date = unified_strdate(xpath_text(doc, './/details/airtime', 'upload date'))
|
||||
subtitles = {}
|
||||
captions_url = doc.find('.//caption/url')
|
||||
if captions_url is not None:
|
||||
subtitles['de'] = [{
|
||||
'url': captions_url.text,
|
||||
'ext': 'ttml',
|
||||
}]
|
||||
|
||||
def xml_to_thumbnails(fnode):
|
||||
thumbnails = []
|
||||
@ -190,6 +197,7 @@ def get_quality(elem):
|
||||
'uploader_id': uploader_id,
|
||||
'upload_date': upload_date,
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
Loading…
Reference in New Issue
Block a user