1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-24 05:42:52 +08:00

[streamcz] Add subtitle extractor

This commit is contained in:
Ondřej Caletka 2017-05-21 09:12:01 +02:00
parent 3de76ab438
commit 747d367d3f

View File

@ -85,6 +85,14 @@ class StreamCZIE(InfoExtractor):
else:
title = data['name']
subtitles = {}
srt_url = data.get('subtitles_srt')
if srt_url:
subtitles['cs'] = [{
'ext': 'srt',
'url': srt_url,
}]
return {
'id': video_id,
'title': title,
@ -93,4 +101,5 @@ class StreamCZIE(InfoExtractor):
'description': data.get('web_site_text'),
'duration': int_or_none(data.get('duration')),
'view_count': int_or_none(data.get('views')),
'subtitles': subtitles,
}