From b11d692bd6acb5d5956e73244c9947ff80864801 Mon Sep 17 00:00:00 2001 From: Leon Banik <57633748+wallbloggerbeing@users.noreply.github.com> Date: Sun, 21 May 2023 20:55:03 +0200 Subject: [PATCH] Fixed background downloading Youtube made an update, so there is an issue with pytube which is fixed by only authenticating once --- 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..f91e5fd 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, on_progress_callback=on_progress, use_oauth=True, allow_oauth_cache=True).streams.filter( res="1080p" ).first().download("assets/backgrounds", filename=f"{credit}-{filename}") print_substep("Background video downloaded successfully! 🎉", style="bold green")