mirror of https://github.com/yt-dlp/yt-dlp.git
[hidive] Fix typo in b5ae35ee6d
This commit is contained in:
parent
8063de5109
commit
e8f726a57f
|
@ -72,8 +72,9 @@ class HiDiveIE(InfoExtractor):
|
||||||
parsed_urls.add(cc_url)
|
parsed_urls.add(cc_url)
|
||||||
subtitles.setdefault(cc_lang, []).append({'url': cc_url})
|
subtitles.setdefault(cc_lang, []).append({'url': cc_url})
|
||||||
|
|
||||||
def _get_subtitles(self, url, video_id, title, key, subtitles, parsed_urls):
|
def _get_subtitles(self, url, video_id, title, key, parsed_urls):
|
||||||
webpage = self._download_webpage(url, video_id, fatal=False) or ''
|
webpage = self._download_webpage(url, video_id, fatal=False) or ''
|
||||||
|
subtitles = {}
|
||||||
for caption in set(re.findall(r'data-captions=\"([^\"]+)\"', webpage)):
|
for caption in set(re.findall(r'data-captions=\"([^\"]+)\"', webpage)):
|
||||||
renditions = self._call_api(
|
renditions = self._call_api(
|
||||||
video_id, title, key, {'Captions': caption}, fatal=False,
|
video_id, title, key, {'Captions': caption}, fatal=False,
|
||||||
|
@ -93,7 +94,7 @@ class HiDiveIE(InfoExtractor):
|
||||||
raise ExtractorError(
|
raise ExtractorError(
|
||||||
'%s said: %s' % (self.IE_NAME, restriction), expected=True)
|
'%s said: %s' % (self.IE_NAME, restriction), expected=True)
|
||||||
|
|
||||||
formats, parsed_urls = [], {}, {None}
|
formats, parsed_urls = [], {None}
|
||||||
for rendition_id, rendition in settings['renditions'].items():
|
for rendition_id, rendition in settings['renditions'].items():
|
||||||
audio, version, extra = rendition_id.split('_')
|
audio, version, extra = rendition_id.split('_')
|
||||||
m3u8_url = url_or_none(try_get(rendition, lambda x: x['bitrates']['hls']))
|
m3u8_url = url_or_none(try_get(rendition, lambda x: x['bitrates']['hls']))
|
||||||
|
|
Loading…
Reference in New Issue