Convert Apple Music songs to MP3.
Project description
Apple Music Playlist to YouTube Audio Downloader
Description
This Python tool allows you to extract song titles and artist names from public Apple Music playlists, search for the corresponding audio on YouTube, and download the audio files as MP3s using the yt-dlp library.
The script automates the entire process efficiently, providing clear progress visibility with parallelized operations and customizable output options.
Disclaimer: Downloading copyrighted audio or video content from YouTube may violate its terms of service. This tool is intended for educational purposes only, and I am not responsible for any misuse.
Features
- Fetches song and artist details from Apple Music playlists.
- Searches YouTube for matching audio content (e.g., "Official Audio").
- Downloads the audio and saves it in MP3 format.
- Provides a progress bar for each step of the process.
- Parallelized operations for faster YouTube searches and downloads.
- Allows you to customize the output directory where MP3 files are saved.
Requirements
- Python 3.7+
- FFmpeg: Required for audio extraction when using
yt-dlp.
Install FFmpeg
Ensure FFmpeg is installed and added to your system PATH.
- On MacOS:
brew install ffmpeg - On Ubuntu/Debian:
sudo apt install ffmpeg - On Windows: Download FFmpeg, extract it, and add the bin folder to your system PATH.
Installation
Install the tool directly from PyPI using pip:
pip install AppleMusicMP3
Usage
Once installed, run the tool as a command-line program. Provide a valid Apple Music Playlist URL:
applemusicmp3 <Apple Music Playlist URL> [options]
Options:
-t, --threads: Set the number of parallel threads for faster downloads (default:5).-o, --output: Specify a custom output directory for downloaded MP3 files (default:output).
Example:
applemusicmp3 https://music.apple.com/us/playlist/replay-2024/pl.example123 -t 8 -o my_music
Output:
- Audio files will be downloaded as MP3s into the specified output folder (
my_musicin the above example). - Progress will be displayed for fetching data, searching YouTube, and downloading audio files.
Notes
- The playlist must be public for the script to fetch data successfully.
- Ensure FFmpeg is installed. If it is missing, the script will raise an error.
- Audio files are downloaded in high-quality MP3 format (192 kbps).
- Use the
-toption to take advantage of parallelized operations for faster processing.
Legal Disclaimer
Downloading content from YouTube is against YouTube's terms of service. This tool is provided for educational purposes only. By using this tool, you acknowledge that:
- You are responsible for your own actions.
- The author is not liable for any misuse of this tool.
Please ensure you have the right to download any content before proceeding.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve the tool.
License
MIT License
Author
Aidan Friedsam
GitHub: afriedsam
PyPI: Apple Music MP3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file applemusicmp3-0.1.2.tar.gz.
File metadata
- Download URL: applemusicmp3-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f0f5e3deca383256621f70147123c45f71bb757b83b67b895208d032b9bb6cb
|
|
| MD5 |
e2a174a6a46c96aa6318fc8d6f77f4ed
|
|
| BLAKE2b-256 |
1cfe76a4d3d4a02ad320b491aec75e54816976a6089faaf8afee19c3b153fd65
|
Provenance
The following attestation bundles were made for applemusicmp3-0.1.2.tar.gz:
Publisher:
python-publish.yml on afriedsam/AppleMusicMP3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
applemusicmp3-0.1.2.tar.gz -
Subject digest:
4f0f5e3deca383256621f70147123c45f71bb757b83b67b895208d032b9bb6cb - Sigstore transparency entry: 156074995
- Sigstore integration time:
-
Permalink:
afriedsam/AppleMusicMP3@6551908b5502c4faa98492035f68a9ca16c819ba -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/afriedsam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6551908b5502c4faa98492035f68a9ca16c819ba -
Trigger Event:
push
-
Statement type:
File details
Details for the file AppleMusicMP3-0.1.2-py3-none-any.whl.
File metadata
- Download URL: AppleMusicMP3-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c9bb3cc9cce40da5612bb80dacbd94a7ff1d4117ed52e830e10c9738ceef821
|
|
| MD5 |
dd4e352ff53f595439e1fba249f0a769
|
|
| BLAKE2b-256 |
7d57f2b424c834c09ac9f31999ee7aea084ebbc8739d303b98bc85f8cf147d23
|
Provenance
The following attestation bundles were made for AppleMusicMP3-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on afriedsam/AppleMusicMP3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
applemusicmp3-0.1.2-py3-none-any.whl -
Subject digest:
7c9bb3cc9cce40da5612bb80dacbd94a7ff1d4117ed52e830e10c9738ceef821 - Sigstore transparency entry: 156075000
- Sigstore integration time:
-
Permalink:
afriedsam/AppleMusicMP3@6551908b5502c4faa98492035f68a9ca16c819ba -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/afriedsam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6551908b5502c4faa98492035f68a9ca16c819ba -
Trigger Event:
push
-
Statement type: