diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2016-04-04 20:44:06 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2016-04-04 20:44:06 +0200 |
commit | 8c7d6e8e2279beccf638cd0fae9d91876e0486b2 (patch) | |
tree | efa2b47a0d6eec57e616956c31a40db8e5d581e7 /youtube_dl/extractor/zdf.py | |
parent | 6d4fc66bfc9bb3ed2a4f68366f372a9bedf6e708 (diff) | |
download | youtube-dl-8c7d6e8e2279beccf638cd0fae9d91876e0486b2.tar.gz youtube-dl-8c7d6e8e2279beccf638cd0fae9d91876e0486b2.zip |
[zdf] Extract subtitles (closes #9081)
Diffstat (limited to 'youtube_dl/extractor/zdf.py')
-rw-r--r-- | youtube_dl/extractor/zdf.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube_dl/extractor/zdf.py b/youtube_dl/extractor/zdf.py index 81c22a627..2ef177275 100644 --- a/youtube_dl/extractor/zdf.py +++ b/youtube_dl/extractor/zdf.py @@ -85,6 +85,13 @@ class ZDFIE(InfoExtractor): 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 @@ class ZDFIE(InfoExtractor): 'uploader_id': uploader_id, 'upload_date': upload_date, 'formats': formats, + 'subtitles': subtitles, } def _real_extract(self, url): |