From e2d5f1cba698635af66a70cf114ac806713f83cd Mon Sep 17 00:00:00 2001 From: Vyacheslav Karpukhin Date: Thu, 28 May 2020 23:23:55 +0200 Subject: [PATCH] Added subtitles support for NDR extractor --- youtube_dl/extractor/ndr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/ndr.py b/youtube_dl/extractor/ndr.py index 2447c812e..0cdbd012b 100644 --- a/youtube_dl/extractor/ndr.py +++ b/youtube_dl/extractor/ndr.py @@ -239,6 +239,8 @@ class NDREmbedBaseIE(InfoExtractor): 'preference': quality_key(thumbnail.get('quality')), }) + subs = {it['srclang']: [{'url': urljoin(url, it['src']), 'ext': 'ttml'}] for it in config.get('tracks', [])} + return { 'id': video_id, 'title': title, @@ -248,6 +250,7 @@ class NDREmbedBaseIE(InfoExtractor): 'duration': duration, 'thumbnails': thumbnails, 'formats': formats, + 'subtitles': subs, }