From 9dec82e6b63ab6c71c05bcf747ee732fcaba7dbd Mon Sep 17 00:00:00 2001 From: Ganden Schaffner Date: Sat, 10 Aug 2019 14:05:48 -0700 Subject: [PATCH] [redbulltv] Rewrite _VALID_URL regex for readability --- youtube_dl/extractor/redbulltv.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/redbulltv.py b/youtube_dl/extractor/redbulltv.py index 7e77e0152..3b5651fb8 100644 --- a/youtube_dl/extractor/redbulltv.py +++ b/youtube_dl/extractor/redbulltv.py @@ -11,7 +11,14 @@ import time class RedBullTVIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?redbull\.com/[^/]+/(?:videos|recap-videos|events|episodes|films)/(?PAP-\w+)(?:/live/AP-\w+)?(?:\?playlist)?(?:\?playlistId=rrn:content:collections:[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}:[\w-]+)?' + _VALID_URL = r"""(?x)^ + https?:// + (?:www\.)?redbull\.com/ + [^/]+/ # locale/language code + (?:videos|recap-videos|events|episodes|films)/ + (?PAP-\w{13})(?:/live/AP-\w{13})? + (?:\?playlist)?(?:\?playlistId=rrn:content:collections:[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}:[\w-]+)? + $""" _TESTS = [{ # videos 'url': 'https://www.redbull.com/int-en/videos/AP-1YM911N612111',