From de79c46c8fa86dd3cb2383fd46cdd19a48e2f81f Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Mon, 25 Nov 2013 06:06:18 +0100 Subject: [viki] Fix subtitle extraction --- youtube_dl/extractor/viki.py | 4 +++- youtube_dl/utils.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/viki.py b/youtube_dl/extractor/viki.py index ac199d410..2206a06d5 100644 --- a/youtube_dl/extractor/viki.py +++ b/youtube_dl/extractor/viki.py @@ -2,6 +2,7 @@ import re from ..utils import ( ExtractorError, + unescapeHTML, unified_strdate, ) from .subtitles import SubtitlesInfoExtractor @@ -91,7 +92,8 @@ class VikiIE(SubtitlesInfoExtractor): def _get_available_subtitles(self, video_id, info_webpage): res = {} - for sturl in re.findall(r'', info_webpage): + for sturl_html in re.findall(r'', info_webpage): + sturl = unescapeHTML(sturl_html) m = re.search(r'/(?P[a-z]+)\.vtt', sturl) if not m: continue diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index caec00e37..946e90e93 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -553,7 +553,7 @@ def make_HTTPS_handler(opts_no_check_certificate): self._tunnel() try: self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv3) - except ssl.SSLError as e: + except ssl.SSLError: self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23) class HTTPSHandlerV3(compat_urllib_request.HTTPSHandler): -- cgit v1.2.3