[redbulltv] Support .com w/ rrn ID when api.redbull.tv/v3/products/ works
URLs that now work: https://www.redbull.com/int-en/episodes/AP-1PMHKJFCW1W11 (working api.redbull.tv/v3/products/, "AP-..." ID) https://www.redbull.com/us-en/events/AP-1XJS6EYM12111/live/AP-1YM8YVH1D2111 (working api.redbull.tv/v3/products/, "rrn:..." ID) URLs that fail: https://www.redbull.com/int-en/films/AP-1ZSMAW8FH2111 (failing api.redbull.tv/v3/products/, "rrn:..." ID)
This commit is contained in:
parent
ffddb11264
commit
8682f760f5
@ -10,7 +10,7 @@ from ..utils import (
|
||||
|
||||
|
||||
class RedBullTVIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?redbull(?:\.tv|\.com(?:/[^/]+)?(?:/tv)?)(?:/events/[^/]+)?/(?:videos?|live)/(?P<id>AP-\w+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?redbull\.com/[^/]+/(?:videos|recap-videos|events|episodes|films)/(?P<id>AP-\w+)'
|
||||
_TESTS = [{
|
||||
# film
|
||||
'url': 'https://www.redbull.tv/video/AP-1Q6XCDTAN1W11',
|
||||
@ -76,6 +76,12 @@ class RedBullTVIE(InfoExtractor):
|
||||
|
||||
title = video['title'].strip()
|
||||
|
||||
# use an 'rrn:...' ID instead of an 'AP-...' ID if necessary
|
||||
content_path = video.get('status', {}).get('play')
|
||||
if content_path:
|
||||
# trim '/content/' from '/content/rrn:...'
|
||||
video_id = content_path[9:]
|
||||
|
||||
formats = self._extract_m3u8_formats(
|
||||
'https://dms.redbull.tv/v3/%s/%s/playlist.m3u8' % (video_id, token),
|
||||
video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
|
||||
|
Loading…
x
Reference in New Issue
Block a user