diff options
author | Remita Amine <[email protected]> | 2016-10-19 11:34:15 +0100 |
---|---|---|
committer | Remita Amine <[email protected]> | 2016-10-19 11:34:46 +0100 |
commit | 791d29dbf879261f539875009c3f7882d6d116d4 (patch) | |
tree | 7e9826043c4f04e8e867159fb560468807cd1fd0 | |
parent | 481cc7335c90dba8c0e7954fc99a38d2022eecfb (diff) | |
download | youtube-dl-791d29dbf879261f539875009c3f7882d6d116d4.tar.gz youtube-dl-791d29dbf879261f539875009c3f7882d6d116d4.zip |
[orf] add subtitles support(closes #10939)
-rw-r--r-- | youtube_dl/extractor/orf.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py index c7b107572..b4cce7ea9 100644 --- a/youtube_dl/extractor/orf.py +++ b/youtube_dl/extractor/orf.py @@ -115,12 +115,22 @@ class ORFTVthekIE(InfoExtractor): self._check_formats(formats, video_id) self._sort_formats(formats) + subtitles = {} + for sub in sd.get('subtitles', []): + sub_src = sub.get('src') + if not sub_src: + continue + subtitles.setdefault(sub.get('lang', 'de-AT'), []).append({ + 'url': sub_src, + }) + upload_date = unified_strdate(sd.get('created_date')) entries.append({ '_type': 'video', 'id': video_id, 'title': title, 'formats': formats, + 'subtitles': subtitles, 'description': sd.get('description'), 'duration': int_or_none(sd.get('duration_in_seconds')), 'upload_date': upload_date, |