** Updated 28th July 2025: Im happy to anounce that I still use this tool fairly often. Ive had to make a few adjustments to maintain it, and the API looks either incorrect or incomplete
This will be a short post about a command line tool I wrote to extract and download mp3 streams from youtube videos. I wrote it for myself primarly because I listen to a lot of music and theres a lot of tracks on youtube which you cant get on spotify or other streaming apps.
General usage:
$ dp3 search <regex>|[url] <file_name>
The path to the folder in which the files are saved is set in a configuration file.
Examples:
$ dp3 https://www.youtube.com/watch?v=LaCd3YrEteE "Kudasai - Technicolor"

$ dp3 https://www.youtube.com/watch?v=LaCd3YrEteE

$ dp3 search [artist]

I wrote this in python 3, trying not to use too many external dependencies, and its available to clone or download on my github page. Ive verified it on MAC OS Mojave and Ubuntu 18.04 but I can vouch for other platforms.