A python program to download albums and songs with AAC codec in .m4a container format and music-videos up to 4K in AVC or HEVC codec in .mp4 format from Apple Music.
installed all requirements, ran the command python manzana.py https://music.apple.com/us/music-video/taki-taki-feat-selena-gomez-ozuna-cardi-b/1438473545, added the media-user-token but when I select an ID I get this error :
[13:19:26] [ManzanaCore] INFO: Checking access token found in cache...
[13:19:26] [ManzanaCore] INFO: Checking media-user-token...
[13:19:27] [ManzanaCore] INFO: Fetching api response...
[13:19:27] [ManzanaCore] INFO: Using the previous response found in cache...
[13:19:27] [ManzanaCore] INFO: Getting playback information...
[13:19:28] [ManzanaCore] INFO: Using the key found in cache...
[13:19:28] [ManzanaCore] INFO: Using the key found in cache...
[13:19:28] [ManzanaCore] INFO: Using the key found in cache...
[13:19:28] [ManzanaCore] INFO: Using the key found in cache...
[13:19:28] [ManzanaCore] INFO: Using the key found in cache...
[13:19:28] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:29] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:30] [ManzanaCore] INFO: Using the key found in cache...
[13:19:31] [ManzanaCore] INFO: Getting video streams list...
installed all requirements, ran the command
python manzana.py https://music.apple.com/us/music-video/taki-taki-feat-selena-gomez-ozuna-cardi-b/1438473545
, added the media-user-token but when I select an ID I get this error :[13:19:26] [ManzanaCore] INFO: Checking access token found in cache... [13:19:26] [ManzanaCore] INFO: Checking media-user-token... [13:19:27] [ManzanaCore] INFO: Fetching api response... [13:19:27] [ManzanaCore] INFO: Using the previous response found in cache... [13:19:27] [ManzanaCore] INFO: Getting playback information... [13:19:28] [ManzanaCore] INFO: Using the key found in cache... [13:19:28] [ManzanaCore] INFO: Using the key found in cache... [13:19:28] [ManzanaCore] INFO: Using the key found in cache... [13:19:28] [ManzanaCore] INFO: Using the key found in cache... [13:19:28] [ManzanaCore] INFO: Using the key found in cache... [13:19:28] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:29] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:30] [ManzanaCore] INFO: Using the key found in cache... [13:19:31] [ManzanaCore] INFO: Getting video streams list...
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐ │ C:\Manzana-Apple-Music-Downloader-main\manzana.py:64 in │
│ │
│ 61 if name == "main": │
│ 62 │ os.system('cls' if os.name == 'nt' else 'clear') │
│ 63 │ console.print(LOGO) │
│ > 64 │ main() │
│ │
│ C:\Manzana-Apple-Music-Downloader-main\manzana.py:59 in main │
│ │
│ 56 │ │ type=str │
│ 57 │ ) │
│ 58 │ args = parser.parse_args() │
│ > 59 │ arguments(args) │
│ 60 │
│ 61 if name == "main": │
│ 62 │ os.system('cls' if os.name == 'nt' else 'clear') │
│ │
│ C:\Manzana-Apple-Music-Downloader-main\handler.py:190 in arguments │
│ │
│ 187 │ │ │ ): │
│ 188 │ │ │ │ logger.warning(f'"{file}.mp4" is already exists!') │
│ 189 │ │ │ else: │
│ > 190 │ │ │ │ videoUrl, decryptKey = getVideos(content) │
│ 191 │ │ │ │ download( │
│ 192 │ │ │ │ │ videoUrl, │
│ 193 │ │ │ │ │ os.getcwd(), │
│ │
│ C:\Manzana-Apple-Music-Downloader-main\core\download\video.py:64 in getVideos │
│ │
│ 61 │ │ id = int(input("\n\t Enter ID: ")) │
│ 62 │ │ print() │
│ 63 │ │ │
│ > 64 │ │ if id in ids: return [getUrls(streamList[id].get("uri")), streamList[id].get(" │
│ 65 │ │ else: logger.error("ID not found in the list!", 1) │
│ 66 │ else: logger.error("No video streams available!", 1) │
│ │
│ C:\Manzana-Apple-Music-Downloader-main\core\download\video.py:21 in getUrls │
│ │
│ 18 │ │ json.dumps(data.data) │
│ 19 │ ) │
│ 20 │ │
│ > 21 │ initSegment = __data["segment_map"][0]["uri"] │
│ 22 │ urls = [baseUri + initSegment] │
│ 23 │ │
│ 24 │ for s in data["segments"]: │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
KeyError: 0
Also when trying to download an album, I get this :
[13:21:21] [ManzanaCore] INFO: Checking access token found in cache... [13:21:21] [ManzanaCore] INFO: Checking media-user-token... [13:21:22] [ManzanaCore] INFO: Fetching api response... [13:21:22] [ManzanaCore] ERROR: None - None