Skip to main content

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.

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.
  • Includes error handling and logging for a smooth user experience.

Requirements

  1. Python 3.7+
  2. 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>

Example:

applemusicmp3 https://music.apple.com/us/playlist/replay-2024/pl.example123

Output:

  • Audio files will be downloaded as MP3s into the output folder.
  • 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).

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

applemusicmp3-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

AppleMusicMP3-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file applemusicmp3-0.1.1.tar.gz.

File metadata

  • Download URL: applemusicmp3-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for applemusicmp3-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9321ce5b2a87d21133835f7ad35713fcafcdba5c8f8da9db18a5a76f96ea6c65
MD5 a73ad8c9e300ee54409a90393d9328d4
BLAKE2b-256 034c27cc2e3688bdb5bd862eb6848d9cf441b5d6ba12a358abc71091ec5ed526

See more details on using hashes here.

Provenance

The following attestation bundles were made for applemusicmp3-0.1.1.tar.gz:

Publisher: python-publish.yml on afriedsam/AppleMusicMP3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file AppleMusicMP3-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: AppleMusicMP3-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for AppleMusicMP3-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d6b3fcd42e82307a10771b2a98b9e693d38de20172e68ccae92a196ef1f5217
MD5 1863fd6c103e2724a190751cd384cb3d
BLAKE2b-256 a1e06eeb7644742c1b5f3607fd918286f878c95ead120ba10a8fdf403ab36ae6

See more details on using hashes here.

Provenance

The following attestation bundles were made for AppleMusicMP3-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on afriedsam/AppleMusicMP3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page