amusic-dl is a lightweight, efficient Python tool to bridge the gap between Apple Music and your local library. It fetches high-quality metadata from Apple Music and downloads the corresponding audio from YouTube using yt-dlp, ensuring your music is perfectly tagged and organized.
Copy and paste the command for your system into your terminal:
python3 -m pip install git+https://github.com/uchumeow/amusic-dl.gitpython -m pip install git+https://github.com/uchumeow/amusic-dl.gitNote: Ensure you have Python and Git installed and added to your PATH.
- High-Quality Metadata: Automatically fetches track titles, artists, albums, release years, and genres.
- Smart Search: Uses optimized YouTube search queries to find the best audio match.
- Batch Downloading: Supports entire Albums and Playlists with a single link.
- Auto-Tagging: Embeds ID3 tags and album artwork directly into the MP3 files.
- Clean Organization: Automatically creates folders for albums and playlists to keep your library tidy.
You'll need a few tools installed on your system:
- Python 3.8+
- yt-dlp: The engine for downloading.
- FFmpeg: Required for audio conversion and metadata embedding.
sudo pacman -S yt-dlp ffmpeg python-requestssudo apt update
sudo apt install yt-dlp ffmpeg python3-requests-
Clone this repository:
git clone https://github.com/uchumeow/amusic-dl.git cd amusic-dl -
(Optional) Create a virtual environment:
python -m venv .venv source .venv/bin/activate # Linux/macOS
-
Install dependencies:
pip install -r requirements.txt
Run the script and follow the prompts, or pass a URL directly.
python amusic_dl.py "https://music.apple.com/us/album/your-favorite-album/123456789"Simply run the script:
python amusic_dl.pyYou will be prompted to paste your Apple Music link and choose a download directory (defaults to ~/Music).
- Scrape: It extracts the unique ID from your Apple Music URL.
- Lookup: It hits the Apple Music/iTunes API to get the "canonical" metadata.
- Search: It searches YouTube for
Artist - Title. - Process:
yt-dlpdownloads the audio, whileffmpegconverts it to MP3 and writes the metadata tags.
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational purposes and personal use only. Please support the artists by streaming their music on official platforms or purchasing their albums.