aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-08-29 21:52:41 +0700
committerSergey M․ <dstftw@gmail.com>2016-08-29 21:52:41 +0700
commit547993dcd09dd46fda2fd429ed0ed72db7263503 (patch)
treeb23b5563eb16817c3e5f52a8f08375a966353acd
parent6c9b71bc0862560cbb9c4c2d9ec295072c208838 (diff)
[turner] Fix subtitles extraction
-rw-r--r--youtube_dl/extractor/turner.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/youtube_dl/extractor/turner.py b/youtube_dl/extractor/turner.py
index 108caa9d8..d69977b56 100644
--- a/youtube_dl/extractor/turner.py
+++ b/youtube_dl/extractor/turner.py
@@ -135,11 +135,12 @@ class TurnerBaseIE(InfoExtractor):
subtitles = {}
for source in video_data.findall('closedCaptions/source'):
for track in source.findall('track'):
- source_url = source.get('url')
- if not source_url:
+ track_url = track.get('url')
+ if not track_url:
continue
- subtitles.set_default(source.get('lang') or source.get('label') or 'en', []).append({
- 'url': source_url,
+ lang = track.get('lang') or track.get('label') or 'en'
+ subtitles.setdefault(lang, []).append({
+ 'url': track_url,
'ext': {
'scc': 'scc',
'webvtt': 'vtt',