]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
YoutubeIE: If not subtitles language is given default to English for automatic captio...
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 22 Jun 2013 10:14:24 +0000 (12:14 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 22 Jun 2013 10:14:24 +0000 (12:14 +0200)
youtube_dl/InfoExtractors.py

index 8d228d40dc9df44406e96b1eb568d918ccc04544..ed2beac783eb83ca41dc843af648ee471f598488 100755 (executable)
@@ -420,7 +420,7 @@ class YoutubeIE(InfoExtractor):
     def _request_automatic_caption(self, video_id, webpage):
         """We need the webpage for getting the captions url, pass it as an
            argument to speed up the process."""
-        sub_lang = self._downloader.params.get('subtitleslang')
+        sub_lang = self._downloader.params.get('subtitleslang') or 'en'
         sub_format = self._downloader.params.get('subtitlesformat')
         self.to_screen(u'%s: Looking for automatic captions' % video_id)
         mobj = re.search(r';ytplayer.config = ({.*?});', webpage)