mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-06 02:49:35 +02:00
[viki] Fix subtitle extraction
This commit is contained in:
parent
94ccb6fa2e
commit
de79c46c8f
@ -2,6 +2,7 @@
|
||||
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
unescapeHTML,
|
||||
unified_strdate,
|
||||
)
|
||||
from .subtitles import SubtitlesInfoExtractor
|
||||
@ -91,7 +92,8 @@ def _real_extract(self, url):
|
||||
|
||||
def _get_available_subtitles(self, video_id, info_webpage):
|
||||
res = {}
|
||||
for sturl in re.findall(r'<track src="([^"]+)"/>', info_webpage):
|
||||
for sturl_html in re.findall(r'<track src="([^"]+)"/>', info_webpage):
|
||||
sturl = unescapeHTML(sturl_html)
|
||||
m = re.search(r'/(?P<lang>[a-z]+)\.vtt', sturl)
|
||||
if not m:
|
||||
continue
|
||||
|
@ -553,7 +553,7 @@ def connect(self):
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user