From 418e0457cb221db83b7ccdf6045cd5ce2de71657 Mon Sep 17 00:00:00 2001 From: DimaSheiko <67640628+DimaSheiko@users.noreply.github.com> Date: Fri, 17 Dec 2021 11:16:25 -0400 Subject: [PATCH] Fixed the number of seconds to wait to download the subtitles. `time.sleep()` Expects an integer with the number of seconds to wait, it was waiting between 1000 seconds and 4000 seconds. --- course-downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course-downloader.py b/course-downloader.py index e154b45..2fdb710 100644 --- a/course-downloader.py +++ b/course-downloader.py @@ -77,7 +77,7 @@ def get_video_info(url, quality=1080, language='en'): if args.subtitle: try: print(video_info['title'], f": Downloading Subtitle...") - time.sleep(random.randint(1000, 4000)) + time.sleep(random.randint(1, 4)) subtitle = requests.get(video_info['subtitle'], allow_redirects=True, ) with open(f"{video_info['filename']}.vtt", 'wb') as f: f.write(subtitle.content)