mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-29 10:41:23 +01:00
Compare commits
No commits in common. "716972da6b48cc59c71cd11d3dd575b5610512c1" and "9438d15dff75e7c2066f1aee1ba7879f748de0ec" have entirely different histories.
716972da6b
...
9438d15dff
|
@ -1620,7 +1620,7 @@ class YoutubeDL:
|
|||
def _handle_extraction_exceptions(func):
|
||||
@functools.wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
wait_retries = 0
|
||||
wait_retries = 1
|
||||
max_wait_retries = self.params.get('wait_retries')
|
||||
while True:
|
||||
try:
|
||||
|
@ -1628,9 +1628,9 @@ class YoutubeDL:
|
|||
except (CookieLoadError, DownloadCancelled, LazyList.IndexError, PagedList.IndexError):
|
||||
raise
|
||||
except ReExtractInfo as e:
|
||||
if wait_retries >= max_wait_retries:
|
||||
if wait_retries > max_wait_retries:
|
||||
if max_wait_retries > 0:
|
||||
self.report_error(f'Giving up after {wait_retries} {"retries" if wait_retries > 1 else "retry"} while waiting.')
|
||||
self.report_error(f'Giving up after {wait_retries - 1} {"retries" if wait_retries > 2 else "retry"} while waiting.')
|
||||
else:
|
||||
self.report_error('Video is still unavailable after waiting.')
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user