Glomatico's Apple Music Downloader
Go to file
2022-12-11 01:25:09 -03:00
pywidevine/L3 commit 2022-11-15 22:16:18 -03:00
.gitignore commit 2022-11-15 22:16:18 -03:00
gamdl.py fixes 2022-12-11 01:24:31 -03:00
music_video_genres.py commit 2022-11-15 22:16:18 -03:00
README.md proper documentation 2022-12-11 01:25:09 -03:00
requirements.txt commit 2022-11-15 22:16:18 -03:00
song_genres.py commit 2022-11-15 22:16:18 -03:00
storefront_ids.py commit 2022-11-15 22:16:18 -03:00

Glomatico's Apple Music Downloader

A Python script to download Apple Music songs/music videos/albums/playlists.

This is a rework of a6e18de8da.

Some new features that I added:

  • MP4Box for muxing
  • Tags for music videos
  • Multiple URLs input
  • iTunes folder structure
  • Embedded lyrics and .lrc file
  • Auto set region
  • Playlist support
  • And much more!

Setup

  1. Install Python 3.8 or higher
  2. Install the required packages using pip:
pip install -r requirements.txt
  1. Add MP4Box and mp4decrypt to your PATH
  2. Create a folder called login on the same folder as the script and put your cookies.txt and token.txt files there
    • You can get your cookies by using this Google Chrome extension on Apple Music website: https://chrome.google.com/webstore/detail/cookies-txt/njabckikapfpffapmjgojcnbfjonfjfg. Make sure to export it as cookies.txt and put it on the login folder as described above.
    • You can get your token by looking at the network requests on Apple Music website.
      • On Google Chrome, you can do this by pressing F12 on Apple Music website then clicking on the Network tab. Then, start navigating throught Apple Music website, filter the requests by amp-api and click on one that has authorization on the Request Headers section. Copy the value of the authorization header, paste it on a text file and save it as token.txt on the login folder. Google Chrome token grab example
    • If you have previously used the old version of this script, you can just copy your cookies.txt and token.txt files from the old version to the login folder. You will have to add Bearer before your token on the token.txt file.
  3. Put your L3 CDM (device_client_id_blob and device_private_key files) on pywidevine/L3/cdm/devices folder

Usage

python gamdl.py [OPTIONS] [URLS]

Windows CMD usage example Use --help argument to see all available options.