[RedBullTV] Parse subtitles from manifest (#2200)

Closes #2151
Authored by: Ashish0804
This commit is contained in:
Ashish Gupta 2022-01-02 02:38:36 +05:30 committed by GitHub
parent f522573787
commit a9f5f5d6eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,12 +81,11 @@ def extract_info(self, video_id):
title = video['title'].strip() title = video['title'].strip()
formats = self._extract_m3u8_formats( formats, subtitles = self._extract_m3u8_formats_and_subtitles(
'https://dms.redbull.tv/v3/%s/%s/playlist.m3u8' % (video_id, token), 'https://dms.redbull.tv/v3/%s/%s/playlist.m3u8' % (video_id, token),
video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls') video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
self._sort_formats(formats) self._sort_formats(formats)
subtitles = {}
for resource in video.get('resources', []): for resource in video.get('resources', []):
if resource.startswith('closed_caption_'): if resource.startswith('closed_caption_'):
splitted_resource = resource.split('_') splitted_resource = resource.split('_')