From dcbf3d6fe72c7c2eb0d0916d2680ef80ff8fafea Mon Sep 17 00:00:00 2001 From: Josh Holly Date: Sun, 30 Apr 2023 05:09:53 -0500 Subject: [PATCH] Fixed video download error by enabling authentication --- video_creation/background.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_creation/background.py b/video_creation/background.py index 0458ce6..bdfe2c0 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -72,7 +72,7 @@ def download_background(background_config: Tuple[str, str, str, Any]): ) print_substep("Downloading the backgrounds videos... please be patient 🙏 ") print_substep(f"Downloading {filename} from {uri}") - YouTube(uri, on_progress_callback=on_progress).streams.filter( + YouTube(uri, use_oauth=True, allow_oauth_cache=True, on_progress_callback=on_progress).streams.filter( res="1080p" ).first().download("assets/backgrounds", filename=f"{credit}-{filename}") print_substep("Background video downloaded successfully! 🎉", style="bold green")