Skip to content

Commit

Permalink
[ie/youtube] Fix bug with --extractor-retries inf (#8328)
Browse files Browse the repository at this point in the history
Authored by: Grub4K
  • Loading branch information
Grub4K committed Oct 12, 2023
1 parent 84e2603 commit feebf6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yt_dlp/extractor/youtube.py
Expand Up @@ -947,7 +947,10 @@ def _extract_response(self, item_id, query, note='Downloading API JSON', headers
icd_rm = next(icd_retries)
main_retries = iter(self.RetryManager())
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:
response = self._call_api(
ep=ep, fatal=True, headers=headers,
Expand Down

0 comments on commit feebf6d

Please sign in to comment.