This commit is contained in:
Samik Some 2020-02-07 18:35:43 +05:30
parent 974aaa407b
commit 6586c71c70
1 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ class RoosterTeethIE(InfoExtractor):
'id': k, 'id': k,
'url': img_url, 'url': img_url,
}) })
subtitles = {} subtitles = {}
res = self._download_webpage_handle( res = self._download_webpage_handle(
subtitle_m3u8_url, display_id, subtitle_m3u8_url, display_id,
@ -134,9 +134,9 @@ class RoosterTeethIE(InfoExtractor):
parts = line.split(',') parts = line.split(',')
for part in parts: for part in parts:
if 'LANGUAGE' in part: if 'LANGUAGE' in part:
lang = part[part.index('=')+2:-1] lang = part[part.index('=') + 2:-1]
elif 'URI' in part: elif 'URI' in part:
uri = part[part.index('=')+2:-1] uri = part[part.index('=') + 2:-1]
res = self._download_webpage_handle( res = self._download_webpage_handle(
uri, display_id, uri, display_id,
'Downloading m3u8 information', 'Downloading m3u8 information',
@ -145,7 +145,7 @@ class RoosterTeethIE(InfoExtractor):
doc, _ = res doc, _ = res
for l in doc.split('\n'): for l in doc.split('\n'):
if not l.startswith('#'): if not l.startswith('#'):
subtitles[lang] = [{'url':uri[:-uri[::-1].index('/')]+l}] subtitles[lang] = [{'url': uri[:-uri[::-1].index('/')] + l}]
break break
return { return {