1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-25 01:07:19 +00:00

[crunchyroll] Fix subtitle lang code extraction

This commit is contained in:
Sergey M 2014-02-25 20:27:25 +07:00
parent 344400951c
commit 70cb73922b

View 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)