mirror of
https://github.com/glomatico/gamdl.git
synced 2025-01-22 11:18:39 +00:00
Glomatico's ✨ Apple Music ✨ Downloader
pywidevine/L3 | ||
.gitignore | ||
gamdl.py | ||
music_video_genres.py | ||
README.md | ||
requirements.txt | ||
song_genres.py | ||
storefront_ids.py |
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
- Install Python 3.8 or higher
- Install the required packages using pip:
pip install -r requirements.txt
- Add MP4Box and mp4decrypt to your PATH
- You can get them from here:
- MP4Box: https://gpac.wp.imt.fr/downloads/
- mp4decrypt: https://www.bento4.com/downloads/
- Or you can use the ones I provided and add them to your PATH or put them on the same folder as the script:
- MP4Box (Windows): https://drive.google.com/open?id=1o202Kese9Q4dKzzgEtZnznuUx_eJp0bH
- mp4decrypt (Windows): https://drive.google.com/open?id=1K6Y98zSfHowALq4FJ6MYrhg1oFBltci9
- MP4Box (Linux): https://drive.google.com/open?id=1rgEkkmsDnzF3SECEpyxz3m-EuJzUj182
- mp4decrypt (Linux): https://drive.google.com/open?id=16qZfStVibIGgH3xSKmAE1Wuf17DTDR8q
- You can get them from here:
- Create a folder called
login
on the same folder as the script and put yourcookies.txt
andtoken.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 thelogin
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 and 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 theauthorization
header, paste it on a text file and save it astoken.txt
on thelogin
folder.
- On Google Chrome, you can do this by pressing F12 on Apple Music website and clicking on the "Network" tab. Then, start navigating throught Apple Music website, filter the requests by "amp-api" and click on one that has
- If you have previously used the old version of this script, you can just copy your
cookies.txt
andtoken.txt
files from the old version to thelogin
folder. You will have to addBearer
before your token on thetoken.txt
file.
- 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
- Put your L3 CDM (
device_client_id_blob
anddevice_private_key
files) onpywidevine/L3/cdm/devices
folder- You can get your L3 CDM by using wvdumper: https://github.com/wvdumper/dumper
Usage
python gamdl.py [OPTIONS] [URLS]