Thanks to visit codestin.com
Credit goes to github.com

Skip to content

j-jzk/yt-dl-music

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yt-dlp Music Downloader

A useful youtube-dl wrapper to download music

Usage

Install the yt-dlp and music-tag packages:

pip3 install yt-dlp
pip3 install music-tag

Specify the songs to download. This is done using a csv file with these columns:

  • url
  • artist
  • title
  • album

The columns are separated with a "|" and the first line of the file must be like this:

url|artist|title|album

The album column can be empty (but you have to keep the | at the end). Multiple artists can be specified by separating them with &&. See example.csv for an example.

You then run the script like this:

python3 download.py <filename>

The downloaded files are automatically converted to OGG/Vorbis and tagged properly.

Running from a virtual environment

Some Python installations nowadays (such as in Debian) complain when you try to install PIP packages globally. To make invoking the script with a virtual environment easier, there is a download.sh script which activates the virutal environment (must be named venv) and runs download.py.

Practical example:

python3 -m venv venv
. venv/bin/activate
pip3 install yt-dlp
pip3 install music-tag

# in a different terminal
./download.sh list.csv

The script even works when being symlinked to, so you don't have to clutter your music directory with the venv:

ln -s <repo path>/download.sh ~/Music/download.sh
cd ~/Music
./download.sh list.csv

About

A useful youtube-dl wrapper to download music

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published