From 22f65f4bb906103d3460d1a43834540c5d783c45 Mon Sep 17 00:00:00 2001 From: sean1832 Date: Mon, 27 Mar 2023 03:18:07 +1100 Subject: [PATCH] fix: youtube re-attempt too fast --- src/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.py b/src/util.py index b14455f..6d31b69 100644 --- a/src/util.py +++ b/src/util.py @@ -66,6 +66,7 @@ def _get_caption(url: str, lang_code: str | List[str] = 'a.en') -> str: try: if source_captions == {}: info_display.error(f'❌ No captions found in this video. Please try another one.') + time.sleep(1) except KeyError: info_display.error(f'❌ Caption language currently not supported.\n\n' f'{source_captions}\n\n'