A lightweight batch music downloader based on the excellent musicdl.
This tool automates the downloading process by:
-
Reading songs from a TXT file
-
Automatically selecting the first search result
-
Downloading songs without any interactive selection
-
Organizing downloaded files into a clean folder
-
Renaming files to:
-
Removing temporary files generated by musicdl
- Batch download from TXT
- Automatic first-result selection
- No interactive keyboard input
- Automatic output folder creation
- Automatic file renaming
- Automatic cleanup
- Failed download report
- API-based implementation (no subprocess)
Install Python 3.11+
Install musicdl
Create a txt file:
Alan Walker - Faded Adele - Hello Linkin Park - Numb
Run
python batch_musicdl.py songs.txt
Output:
CloudMusic/ └── songs/ ├── Alan Walker - Faded.flac ├── Adele - Hello.mp3 └── Linkin Park - Numb.flac
Configuration
Edit these variables in the script:
DOWNLOAD_ROOT = Path(r"D:\CloudMusic")
PLATFORM = "QQMusicClient"
musicdl