]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[crunchyroll] Fix subtitle lang code extraction
authorSergey M <dstftw@gmail.com>
Tue, 25 Feb 2014 13:27:25 +0000 (20:27 +0700)
committerSergey M <dstftw@gmail.com>
Tue, 25 Feb 2014 13:29:53 +0000 (20:29 +0700)
youtube_dl/extractor/crunchyroll.py

index a20b88f0250279abe35b98a6a887b6be11298ec5..44d78fe5e3ca508d0da7cee895f7d952ee46ac8e 100644 (file)
@@ -166,7 +166,7 @@ class CrunchyrollIE(InfoExtractor):
             data = base64.b64decode(data)
 
             subtitle = self._decrypt_subtitles(data, iv, id).decode('utf-8')
-            lang_code = self._search_regex(r'lang_code=\'([^\']+)', subtitle, 'subtitle_lang_code', fatal=False)
+            lang_code = self._search_regex(r'lang_code=["\']([^"\']+)', subtitle, 'subtitle_lang_code', fatal=False)
             if not lang_code:
                 continue
             subtitles[lang_code] = self._convert_subtitles_to_srt(subtitle)