aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-09-06 16:26:22 +0200
committerIsmael Mejia <iemejia@gmail.com>2013-09-06 16:30:13 +0200
commitd6e203b3dcef8f291b57021903e629d3e30e1f0b (patch)
tree273314821cd68587dc96f527a9ccaf9fdf252731 /youtube_dl/extractor/youtube.py
parent06a401c845289344bfe8998a0acad07f79fe7818 (diff)
[subtitles] fixed multiple subtitles language separated by comma after merge
As mentioned in the pull request, I forgot to include this changes. https://github.com/rg3/youtube-dl/commit/aa6a10c44a8e2e86f709c5301f9ea6ac3f01f002
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 370cc64cc..b3400df0a 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -160,7 +160,7 @@ class YoutubeSubtitlesIE(SubtitlesIE):
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') or 'en'
+ sub_lang = (self._downloader.params.get('subtitleslangs') or ['en'])[0]
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)