From: Skullheadx <94652084+Skullheadx@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:55:04 +0000 (-0400) Subject: add print statements X-Git-Url: http://git.skullheadx.com/nixos/static/gitweb.css?a=commitdiff_plain;h=6cdea0ca8d654a2282b4dba3ce768eed34c54c46;p=youtube-downloader.git add print statements --- diff --git a/ytdl/__main__.py b/ytdl/__main__.py index 7108f53..698d70f 100644 --- a/ytdl/__main__.py +++ b/ytdl/__main__.py @@ -10,6 +10,7 @@ def main(): links = [] mode = "-d" + assert len(args) > 0, "no args :(" for arg in args: if arg in modes: mode = arg @@ -19,25 +20,29 @@ def main(): assert len(links) > 0, "Should pass at least one link as arg" assert mode in modes, f"Mode should be one of {modes}" - + print("Processing links") # remove empty strings links = list(filter(None, links)) assert len(links) > 0, "Should not remove all links" - + print("Checking for playlists") links = check_playlist(links) assert len(links) > 0, "Should be at least one song in playlist" + print("Checking if links exist") assert links_work(links), "Links don't work :(" + print("Getting audio streams") streams = get_audio_streams(links) assert len(streams) > 0, "was not able to get audio streams" + print("Getting video metadata") metadata = get_metadata(links) assert len(metadata) == len(streams), "make sure metadata for every stream" if arg == "-d": pass elif arg == "-a": + print("Downloading audio streams") download_audio_streams(streams, metadata) elif arg == "-v": pass diff --git a/ytdl/funcmodule.py b/ytdl/funcmodule.py index ed56500..5d60316 100644 --- a/ytdl/funcmodule.py +++ b/ytdl/funcmodule.py @@ -1,5 +1,4 @@ from pytubefix import YouTube, Playlist, extract -import ffmpeg import requests import subprocess import os