[lynda] Use 'lstrip' for the subtitles
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 27 Feb 2015 15:18:18 +0000 (16:18 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 27 Feb 2015 15:18:18 +0000 (16:18 +0100)
The newlines at the end are important, they separate each piece of text.

youtube_dl/extractor/lynda.py

index bfd9b73d250c0b90c50a5579d0e5283471e381c1..5dc22da22a6a5324887379fdff339f09f13d0309 100644 (file)
@@ -155,7 +155,7 @@ class LyndaIE(InfoExtractor):
                 continue
             appear_time = m_current.group('timecode')
             disappear_time = m_next.group('timecode')
-            text = seq_current['Caption'].strip()
+            text = seq_current['Caption'].lstrip()
             srt += '%s\r\n%s --> %s\r\n%s' % (str(pos), appear_time, disappear_time, text)
         if srt:
             return srt