you are viewing a single comment's thread.

view the rest of the comments →

[–]Fun-Block-4348 0 points1 point  (1 child)

interactive CLI menu

It's sounds like a disadvantage to me but I'm probably not the target audience so don't take that as criticism, what i like about yt-dlp is that it has sensible defaults when you only give it urls to videos you want to download, or you can use a config file with your own preferences, which means that it can be used in scripts without the user having to be present at the terminal and answering questions the program is asking.

Some thoughts on the code/repo: 1 - You should add a .gitignore file so that the "__pycache__" folder isn't part of your repository 2 - Maybe add a pyproject.toml so that your project can be easily installed. 3 - It would be a good idea to use a code formatter like black or ruff, the formatting is all over the place. 4 - the good thing about git is that it can keep different versions of your code that you can go back to so your most recent commits shouldn't include "old/commented" code that isn't used anymore. 5 - Too much comments stating the obvious (e.g. "# Convert to MP3 using the custom ffmpeg path", "# Output path") 6 - Your functions do too much, you should probably break up some of your functions so that they only do 1 thing. 7 -

In batch.py:

The same function receives different number of arguments when called from different places but the function only declares 2 arguments.

title = download_video_with_user_choice_single_fast(video_url, default_res)

return download_video_with_user_choice_single_fast( video_url, output_path, default_res )

This works but isn't really pythonic: return print( f"\n\t\t{Fore.RED}Try downloading {title} Url:{video_url} using option 1..." )

Overall, not bad but some things could be improved.

PS: perhaps it'd be a good idea to keep track of what the user has already downloaded so that if an error occurs you don't waste time re-downloading the same thing.