[lynda] Fix download if subtitles were not requested
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 7 Jan 2014 06:17:49 +0000 (07:17 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 7 Jan 2014 06:17:49 +0000 (07:17 +0100)
youtube_dl/extractor/lynda.py

index d26e22cd8181d559c4000fa78f4397ec4e28dbc8..19a4b10d5fa7fd32d780cf8c04070c6247ac224a 100644 (file)
@@ -68,6 +68,9 @@ class LyndaIE(SubtitlesInfoExtractor):
     _TIMECODE_REGEX = r'\[(?P<timecode>\d+:\d+:\d+[\.,]\d+)\]'
 
     def _fix_subtitles(self, subtitles):
+        if subtitles is None:
+            return subtitles  # subtitles not requested
+
         fixed_subtitles = {}
         for k, v in subtitles.items():
             subs = json.loads(v)