[redbulltv] Fix cache retry system printing error multiple times
This commit is contained in:
parent
262b8aecd6
commit
88d61c8c14
@ -95,14 +95,15 @@ class RedBullTVIE(InfoExtractor):
|
|||||||
webpage = self._download_webpage(url, video_id, note='Redownloading webpage')
|
webpage = self._download_webpage(url, video_id, note='Redownloading webpage')
|
||||||
# extract response cache
|
# extract response cache
|
||||||
response_cache = json.loads(self._html_search_regex(r'<script type="application/json" id="response-cache">(.+?)</script>', webpage, 'response-cache'))
|
response_cache = json.loads(self._html_search_regex(r'<script type="application/json" id="response-cache">(.+?)</script>', webpage, 'response-cache'))
|
||||||
break
|
|
||||||
except RegexNotFoundError:
|
except RegexNotFoundError:
|
||||||
if i < tries - 1:
|
if i < tries - 1:
|
||||||
self.to_screen('Waiting before redownloading webpage')
|
self.to_screen('Waiting before redownloading webpage')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
self.to_screen('Failed to download/locate response cache. Wait a few seconds and try running the command again.')
|
self.to_screen('Failed to download/locate response cache. Wait a few seconds and try running the command again.')
|
||||||
raise
|
raise
|
||||||
|
break
|
||||||
|
|
||||||
# select the key that includes the string 'pageConfig'
|
# select the key that includes the string 'pageConfig'
|
||||||
metadata = json.loads(
|
metadata = json.loads(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user