Downloads music as MP3 from YouTube. Files are saved to ~/Music/Downloads/.
- Python 3.x
- yt-dlp:
python -m pip install yt-dlp - FFmpeg:
winget install ffmpeg
# Search by name
python music.py Bohemian Rhapsody Queen
# Use a direct URL
python music.py https://www.youtube.com/watch?v=...
# Download a whole list at once (one song per line)
python music.py -f songs.txt
# Or pipe the list in
python music.py < songs.txtOne song per line — title and artist, no quotes, no numbering. Direct YouTube URLs work too, mixed freely with search terms.
Him & I G-Eazy Halsey
Karma Mahmood Woodkid
T'Amo Mahmood
Faded Alan Walker
https://www.youtube.com/watch?v=...
- No quotes needed for search terms
- Playlists (as in YouTube playlist URLs) are ignored — each line is treated as one song
- Batch mode continues past failures and prints a summary at the end
- Audio quality: 192kbps MP3