mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-05-12 16:25:42 -05:00
[RedBullIE] Fixed API-endpoint changes.
This commit is contained in:
parent
0b6b7742c2
commit
edf7d0ebd3
1 changed files with 40 additions and 11 deletions
|
@ -168,12 +168,26 @@ class RedBullIE(InfoExtractor):
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'AA-1MT8DQWA91W14',
|
'id': 'AA-1MT8DQWA91W14',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Grime - Hashtags S2E4',
|
'title': 'Grime',
|
||||||
'description': 'md5:5546aa612958c08a98faaad4abce484d',
|
'description': 'md5:5546aa612958c08a98faaad4abce484d',
|
||||||
|
'duration': 904.0,
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.redbull.com/int-en/films/kilimanjaro-mountain-of-greatness',
|
'url': 'https://www.redbull.com/int-en/films/kilimanjaro-mountain-of-greatness',
|
||||||
'only_matching': True,
|
'md5': 'db8271a7200d40053a1809ed0dd574ff',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'AA-1UDTFEPTW1W12',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Kilimanjaro: Mountain of Greatness',
|
||||||
|
'description': 'md5:e44aedc87ff8587307a4a20fdfe8db61',
|
||||||
|
'duration': 1834.0,
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.redbull.com/int-en/recap-videos/uci-mountain-bike-world-cup-2017-mens-xco-finals-from-vallnord',
|
'url': 'https://www.redbull.com/int-en/recap-videos/uci-mountain-bike-world-cup-2017-mens-xco-finals-from-vallnord',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
@ -210,14 +224,29 @@ def _real_extract(self, url):
|
||||||
regions.append('INT')
|
regions.append('INT')
|
||||||
locale = '>'.join([f'{lang}-{reg}' for reg in regions])
|
locale = '>'.join([f'{lang}-{reg}' for reg in regions])
|
||||||
|
|
||||||
rrn_id = self._download_json(
|
rrn_data = self._download_json(
|
||||||
'https://www.redbull.com/v3/api/graphql/v1/v3/query/' + locale,
|
'https://www.redbull.com/v3/api/graphql/v1/v3/feed/' + locale,
|
||||||
display_id, query={
|
display_id, query={
|
||||||
'filter[type]': filter_type,
|
'filter[type]': filter_type, 'page[limit]': 1, 'filter[uriSlug]': display_id,
|
||||||
'filter[uriSlug]': display_id,
|
'disableUsageRestrictions': 'true', 'rb3Schema': 'v1:pageConfig',
|
||||||
'rb3Schema': 'v1:hero',
|
'rb3PageUrl': '/' + region.lower() + '-' + lang.lower() + '/' + filter_type + '/' + display_id,
|
||||||
})['data']['id']
|
})['data']
|
||||||
|
|
||||||
return self.url_result(
|
video_info = self._download_json(
|
||||||
'https://www.redbull.com/embed/' + rrn_id,
|
'https://api-player.redbull.com/rbcom/videoresource', display_id, query={
|
||||||
RedBullEmbedIE.ie_key(), rrn_id)
|
'videoId': rrn_data['id'],
|
||||||
|
'localeMixing': locale,
|
||||||
|
})
|
||||||
|
|
||||||
|
video_id = video_info['assetId']
|
||||||
|
formats, subtitles = self._extract_m3u8_formats_and_subtitles(video_info['videoUrl'],
|
||||||
|
video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'title': video_info['title'],
|
||||||
|
'description': rrn_data['pageMeta'].get('description') or None,
|
||||||
|
'duration': float_or_none(video_info['duration']),
|
||||||
|
'formats': formats,
|
||||||
|
'subtitles': subtitles,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue