[ie/youtube] Fix bug with `--extractor-retries inf` (#8328)

Authored by: Grub4K
This commit is contained in:
Simon Sawicki 2023-10-12 12:20:52 +02:00 committed by GitHub
parent 84e26038d4
commit feebf6d02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -947,7 +947,10 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
icd_rm = next(icd_retries) icd_rm = next(icd_retries)
main_retries = iter(self.RetryManager()) main_retries = iter(self.RetryManager())
main_rm = next(main_retries) main_rm = next(main_retries)
for _ in range(main_rm.retries + icd_rm.retries + 1): # Manual retry loop for multiple RetryManagers
# The proper RetryManager MUST be advanced after an error
# and it's result MUST be checked if the manager is non fatal
while True:
try: try:
response = self._call_api( response = self._call_api(
ep=ep, fatal=True, headers=headers, ep=ep, fatal=True, headers=headers,