mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-12-18 07:05:41 +07:00
[viki] Fix subtitle extraction
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user