Fixed background downloading

Youtube made an update, so there is an issue with pytube which is fixed by only authenticating once
pull/1656/head
Leon Banik 2 years ago committed by GitHub
parent f2d89a10dd
commit b11d692bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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")

Loading…
Cancel
Save