From 88d61c8c14e2ff984f5589b04228665cebf3a22b Mon Sep 17 00:00:00 2001 From: Ganden Schaffner Date: Sat, 10 Aug 2019 13:14:39 -0700 Subject: [PATCH] [redbulltv] Fix cache retry system printing error multiple times --- youtube_dl/extractor/redbulltv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/redbulltv.py b/youtube_dl/extractor/redbulltv.py index d48593878..49935466f 100644 --- a/youtube_dl/extractor/redbulltv.py +++ b/youtube_dl/extractor/redbulltv.py @@ -95,14 +95,15 @@ class RedBullTVIE(InfoExtractor): webpage = self._download_webpage(url, video_id, note='Redownloading webpage') # extract response cache response_cache = json.loads(self._html_search_regex(r'', webpage, 'response-cache')) - break except RegexNotFoundError: if i < tries - 1: self.to_screen('Waiting before redownloading webpage') time.sleep(2) + continue else: self.to_screen('Failed to download/locate response cache. Wait a few seconds and try running the command again.') raise + break # select the key that includes the string 'pageConfig' metadata = json.loads(