about summary refs log tree commit diff
path: root/youtube_dl/extractor/redbulltv.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-06-07 23:48:57 +0700
committerSergey M․ <dstftw@gmail.com>2019-06-07 23:48:57 +0700
commit2efefddafd1c83a900b091c0051f84a1ba2fcbfa (patch)
treec28436469fec68fc044438f57b3ff42af52a7ce4 /youtube_dl/extractor/redbulltv.py
parentbf3c9326634f4a918d0336b2c5f104ac492b5510 (diff)
downloadyoutube-dl-2efefddafd1c83a900b091c0051f84a1ba2fcbfa.tar.gz
youtube-dl-2efefddafd1c83a900b091c0051f84a1ba2fcbfa.tar.xz
youtube-dl-2efefddafd1c83a900b091c0051f84a1ba2fcbfa.zip
[redbulltv:rrn:content] Add extractor (closes #21297)
Diffstat (limited to 'youtube_dl/extractor/redbulltv.py')
-rw-r--r--youtube_dl/extractor/redbulltv.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/youtube_dl/extractor/redbulltv.py b/youtube_dl/extractor/redbulltv.py
index 5a03e8e11..dbe1aaded 100644
--- a/youtube_dl/extractor/redbulltv.py
+++ b/youtube_dl/extractor/redbulltv.py
@@ -104,3 +104,25 @@ class RedBullTVIE(InfoExtractor):
             'formats': formats,
             'subtitles': subtitles,
         }
+
+
+class RedBullTVRrnContentIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?redbull(?:\.tv|\.com(?:/[^/]+)?(?:/tv)?)/(?:video|live)/rrn:content:[^:]+:(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})'
+    _TESTS = [{
+        'url': 'https://www.redbull.com/int-en/tv/video/rrn:content:live-videos:e3e6feb4-e95f-50b7-962a-c70f8fd13c73/mens-dh-finals-fort-william',
+        'only_matching': True,
+    }, {
+        'url': 'https://www.redbull.com/int-en/tv/video/rrn:content:videos:a36a0f36-ff1b-5db8-a69d-ee11a14bf48b/tn-ts-style?playlist=rrn:content:event-profiles:83f05926-5de8-5389-b5e4-9bb312d715e8:extras',
+        'only_matching': True,
+    }]
+
+    def _real_extract(self, url):
+        display_id = self._match_id(url)
+
+        webpage = self._download_webpage(url, display_id)
+
+        video_url = self._og_search_url(webpage)
+
+        return self.url_result(
+            video_url, ie=RedBullTVIE.ie_key(),
+            video_id=RedBullTVIE._match_id(video_url))