DEV Community

Discussion on: Download Youtube video to mp3 with Python

Collapse
 
mbcrump profile image
Michael Crump

What do I get out of this vs just running the program itself.

Collapse
 
michaelcurrin profile image
Michael Currin • Edited

The CLI might be sufficient for the average use case.

The docs explain how to use the CLI with options.

github.com/ytdl-org/youtube-dl#des...

I guess the downside is that you have to pass those on the command-line each time, so you can write a shell script or Python script which effectively holds all that config logic and asks for user input and runs the library.

The CLI options look comprehensive so I'd guess the features are the same. And for a simple case like download a single video, the CLI way could fit on one or two lines and save having to setup a Python script of 10 or 20 lines.

But maybe using the library in a Python script helps for a level of abstraction. Like if you want to build a web or GUI interface on top or have more control on what to download and where it is saved and making directories or printing a progress report or retrying bad URLs etc.