Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 amusic-dl

Python License: MIT Dependency: yt--dlp

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.


⚡ Quick Install (One-Liner)

Copy and paste the command for your system into your terminal:

🐧 Linux / 🍎 macOS

python3 -m pip install git+https://github.com/uchumeow/amusic-dl.git

🪟 Windows (PowerShell)

python -m pip install git+https://github.com/uchumeow/amusic-dl.git

Note: Ensure you have Python and Git installed and added to your PATH.


✨ Features

  • 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.

🚀 Getting Started

Prerequisites

You'll need a few tools installed on your system:

  1. Python 3.8+
  2. yt-dlp: The engine for downloading.
  3. FFmpeg: Required for audio conversion and metadata embedding.

Installation on Arch Linux

sudo pacman -S yt-dlp ffmpeg python-requests

Installation on Ubuntu/Debian

sudo apt update
sudo apt install yt-dlp ffmpeg python3-requests

Installation

  1. Clone this repository:

    git clone https://github.com/uchumeow/amusic-dl.git
    cd amusic-dl
  2. (Optional) Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # Linux/macOS
  3. Install dependencies:

    pip install -r requirements.txt

📖 Usage

Run the script and follow the prompts, or pass a URL directly.

Command Line Argument

python amusic_dl.py "https://music.apple.com/us/album/your-favorite-album/123456789"

Interactive Mode

Simply run the script:

python amusic_dl.py

You will be prompted to paste your Apple Music link and choose a download directory (defaults to ~/Music).


🛠️ How it Works

  1. Scrape: It extracts the unique ID from your Apple Music URL.
  2. Lookup: It hits the Apple Music/iTunes API to get the "canonical" metadata.
  3. Search: It searches YouTube for Artist - Title.
  4. Process: yt-dlp downloads the audio, while ffmpeg converts it to MP3 and writes the metadata tags.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


⚠️ Disclaimer

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages