]> Skullheadx's Git Forge - youtube-downloader.git/commitdiff
add print statements
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Mon, 14 Oct 2024 02:55:04 +0000 (22:55 -0400)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Mon, 14 Oct 2024 02:55:04 +0000 (22:55 -0400)
ytdl/__main__.py
ytdl/funcmodule.py

index 7108f53e8da82bac56653bf840d90c5bfb25e813..698d70ff64459065c2aa72a6a99db6ffdb956ec6 100644 (file)
@@ -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
index ed565001e708d1444ba142b47d615158b3e48bbf..5d6031655a6622e2641a28fbf823e6ed5c10b9bd 100644 (file)
@@ -1,5 +1,4 @@
 from pytubefix import YouTube, Playlist, extract
-import ffmpeg
 import requests
 import subprocess
 import os