Skip to content

Commit de79c46

Browse files
committed
[viki] Fix subtitle extraction
1 parent 94ccb6f commit de79c46

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

youtube_dl/extractor/viki.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from ..utils import (
44
ExtractorError,
5+
unescapeHTML,
56
unified_strdate,
67
)
78
from .subtitles import SubtitlesInfoExtractor
@@ -91,7 +92,8 @@ def _real_extract(self, url):
9192

9293
def _get_available_subtitles(self, video_id, info_webpage):
9394
res = {}
94-
for sturl in re.findall(r'<track src="([^"]+)"/>', info_webpage):
95+
for sturl_html in re.findall(r'<track src="([^"]+)"/>', info_webpage):
96+
sturl = unescapeHTML(sturl_html)
9597
m = re.search(r'/(?P<lang>[a-z]+)\.vtt', sturl)
9698
if not m:
9799
continue

youtube_dl/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def connect(self):
553553
self._tunnel()
554554
try:
555555
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv3)
556-
except ssl.SSLError as e:
556+
except ssl.SSLError:
557557
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23)
558558

559559
class HTTPSHandlerV3(compat_urllib_request.HTTPSHandler):

0 commit comments

Comments
 (0)