Coder Social home page Coder Social logo

dropcreations / manzana-apple-music-downloader Goto Github PK

View Code? Open in Web Editor NEW
142.0 7.0 19.0 45.65 MB

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.

Home Page: https://music.apple.com

License: GNU General Public License v3.0

Python 100.00%
4k aac apple applemusic downloader music python video widevine

manzana-apple-music-downloader's Introduction

Manzana Apple Music Downloader

A python program to download albums and songs with AAC codec in .m4a container format and music-videos upto 4K in AVC or HEVC codec in .mp4 format from Apple Music. This python program uses the module called pywidevine that is a python implementation of Google's Widevine DRM (Digital Rights Management) CDM (Content Decryption Module). This doesn't support to download spatial audios (Dolby Atmos) and Apple Lossless audios (ALAC) because those are not protected with Widevine. They are protected with the FairPlay. FairPlay is a digital rights management (DRM) technology developed by Apple Inc.

Apple Music

! DISCLAIMER

  • THIS REPOSITORY IS ONLY FOR EDUCATIONAL PURPOSES.

This will help you to understand how the Apple Music API works and how to deal with python scripts. You can use the source code to run and test this program or you can also use the compiled binary files from the releases.

Features

  • Can download album urls.
  • Can download song urls.
  • Can download music-video urls.
  • Can download playlist urls.
  • Can download artist urls (all albums, singles, music-videos).
  • Can download animated-cover.
  • Can download time-synced lyrics as .lrc.

Required

Make sure you have installed below in your PC or have added into the PATH.

  • MP4Box
  • mp4decrypt (bento4)
  • ccextractor

Usage

First of all you have to clone this project to your pc. If you're using git, you can do it simply by following command.

git clone https://github.com/dropcreations/Manzana-Apple-Music-Downloader.git

or you're not using git, just download the source code as a .zip file and extract it. Then go to the project directory.

This is a python program. So, you have to install python first (Recommended python version is 3.9). Then you have to install all dependancies that need to run this program. You can approach this using below command.

pip install -r requirements.txt

NOTE: Use python3 or pip3 if python or pip doesn't work for you.

Now you can run the program. In first run it will create all directories that need to deal inside the program. You have to fill the things that it will ask for. Firstly, it will ask to put your Widevine device files into device directory.

So, copy your widevine device directory to it. it should contain device_client_id_blob and device_private_key files. Example for the file structure inside the device directory given below.

.
.
|--config
|--device
|  |--{device_name}
|      |--device_client_id_blob
|      |--device_private_key
|--keys
.
.

Then it will also ask for your mediaUserToken. Get it from cookies and add it to the program. You can get help page using below command.

python manzana.py -h

it will show you the help page.

usage: manzana [-h] [-v] [-a] [-s] [-ln] [-tn] [-cn] url [url ...]

Manzana: Apple Music Downloader

positional arguments:
  url               Apple Music URL(s) for artist, album, song, playlist or music-video

optional arguments:
  -h, --help        show this help message and exit
  -v, --version     show program's version number and exit
  -a, --anim-cover  save animated artwork. [default: False]
  -s, --skip-video  skip music-videos inside albums. [default: False]
  -ln, --no-lrc     don't save time-synced lyrics. [default: False]
  -tn, --no-tags    don't add credits info. [default: False]
  -cn, --no-cover   don't save album artwork. [default: False]

Now you can start.

python manzana.py {url(s)},...

You can input multiple urls at one time. Just add url_01 url_02 url_03... with a space separator. You also can add text files that have urls. Just like url_01 txt_file_path_01 url_02.... If you're going to use a text file, urls must be in line by line as below.

https://music.apple.com/url_01
https://music.apple.com/url_02
https://music.apple.com/url_03
https://music.apple.com/url_04
.
.

NOTE: When you're downloading an artist, if you want all items, just type all keyword when it ask for an ID.

THIS IS FOR PRIVATE USE ONLY. TAKE YOUR OWN RISK AND USE IT!

Demo

musicVideo

album

artist

Note

manzana-apple-music-downloader's People

Contributors

dropcreations avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

manzana-apple-music-downloader's Issues

500 internal Service Error

Hi,

I have a problem when using this script by a lot of albums and playlists. I often receive a 500 internal service error: none. Normally I would assume the problem would lay by Apple, but I'm not quite sure, if this is correct. What could here be wrong?

I added two log files, one working and the other not. From both log files, I would interpret, that the script cannot find the song id.
working.log
not_working.log

When I try the Windows version, I get a more prominent error message:
ERROR: 500 Internal Service Error: None
in :88
in run:41
in ger_info:384
in __get_info:274
in __get:api:264

NameError: Name 'exit' is not defined
744 Failed to execute script 'manzana' due to unhandled exception!

"ERROR: Need device private key..."

Hi, @dropcreations! Hoping you can help me again with this issue.

After adding a fresh device_client_id_blob and device_private_key and running the script I keep running into the same issue:
image

I copied and used the mediaUserToken from the same device which the keys are from.
Thanks!

Too slow!!!

The program is very useful, but can it support multi-threaded downloading? Downloading one song at a time is too slow. It would be great if we could download all the songs by an artist with one click.

Chinese support is not very good:[3752] Failed to execute script 'manzana' due to unhandled exception!

System & SoftWare info

OS: Windows 10 Enterprise LTSC 21H2  19044.4291
Experience Windows Feature Experience Pack 1000.19056.1000.0

Manzana: Apple Music Downloader v2.4.0

Shell

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\Users\Ahaxzh> manzana.exe https://music.apple.com/cn/artist/%E6%9E%97%E5%AE%A5%E5%98%89/436847316



    $$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\
    $$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
    $$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
    $$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
    \__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                        ──── Apple Music Downloader ────


[10:53:51] [ManzanaCore] INFO: Loading device...
[10:53:51] [ManzanaCore] INFO: Checking accessToken...
[10:53:51] [ManzanaCore] INFO: Checking mediaUserToken...
[10:53:52] [ManzanaCore] INFO: Checking passed urls...
[10:53:53] [ManzanaCore] INFO: Fetching artist contents...

         Artist: æ宥å
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module>:83                                                                                   │
│                                                                                                  │
│ in run:35                                                                                        │
│                                                                                                  │
│ in get_urls:411                                                                                  │
│                                                                                                  │
│ in __get_artist:229                                                                              │
│                                                                                                  │
│ in __get_res:176                                                                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'data'
[3752] Failed to execute script 'manzana' due to unhandled exception!

https://music.apple.com/cn/artist/%E6%9E%97%E5%AE%A5%E5%98%89/436847316
Artist: æ宥å == 林宥嘉

more Log:


[12-04-24 10:54:09] [Manzana] INFO: Loading device...
[12-04-24 10:54:09] [Manzana] DEBUG: Using device: android-generic...
[12-04-24 10:54:09] [Manzana] INFO: Checking accessToken...
[12-04-24 10:54:09] [Manzana] DEBUG: Starting new HTTPS connection (1): amp-api.music.apple.com:443
[12-04-24 10:54:09] [Manzana] DEBUG: https://amp-api.music.apple.com:443 "GET /v1/catalog/us/songs/1450330685 HTTP/1.1" 200 916
[12-04-24 10:54:09] [Manzana] DEBUG: accessToken is working! access-token: eyJh###############fMxNdKaHw
[12-04-24 10:54:09] [Manzana] INFO: Checking mediaUserToken...
[12-04-24 10:54:10] [Manzana] DEBUG: https://amp-api.music.apple.com:443 "GET /v1/me/storefront HTTP/1.1" 200 223
[12-04-24 10:54:10] [Manzana] DEBUG: mediaUserToken is working! mediaUserToken: AobAg/b#########################NBCUuFkMmPVkYlrabfIaq0UfJWENg==
[12-04-24 10:54:10] [Manzana] INFO: Checking passed urls...
[12-04-24 10:54:10] [Manzana] DEBUG: Parsing url...
[12-04-24 10:54:10] [Manzana] DEBUG: UrlParseResult(kind="artist", id="216635866", songId="None")
[12-04-24 10:54:10] [Manzana] DEBUG: Starting new HTTPS connection (1): music.apple.com:443
[12-04-24 10:54:11] [Manzana] DEBUG: https://music.apple.com:443 "GET /cn/artist/%E6%9E%97%E4%BF%8A%E6%9D%B0/216635866 HTTP/1.1" 200 None
[12-04-24 10:54:11] [Manzana] INFO: Fetching artist contents...
[12-04-24 10:54:11] [Manzana] DEBUG: https://amp-api.music.apple.com:443 "GET /v1/catalog/cn/artists/216635866/view/full-albums?limit=100 HTTP/1.1" 200 9377
[12-04-24 10:54:12] [Manzana] DEBUG: https://amp-api.music.apple.com:443 "GET /v1/catalog/cn/artists/216635866/view/singles?limit=100 HTTP/1.1" 200 9718
[12-04-24 10:54:12] [Manzana] DEBUG: https://amp-api.music.apple.com:443 "GET /v1/catalog/cn/artists/216635866/view/music-videos?limit=100 HTTP/1.1" 200 16297


AttributeError: 'NoneType' object has no attribute 'get'

Got this error while trying to run the script.

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in :83 │
│ │
│ in run:44 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'NoneType' object has no attribute 'get'
[26064] Failed to execute script 'manzana' due to unhandled exception!

Tagging artistID,releaseDate..

1.artistID
I added two lines in the tagger.py to support more tags:
"----:com.apple.itunes:plID": data.get("id"),
"----:com.apple.itunes:atID": data.get("artistid"),
plID is working fine, atID failed.
After analysing the codes, I added one line in the tag section of album.py:
s = {
"id": item.get("id"),
"artistid": attr.get("artistId"),
But it's still not working. What should I do?( I use this value to auto-classify the same artist in different languages, cuz some albums are only available in certain areas )

2.releaseDate
The default setting only support the YYYY-MM-DD format,is it possible to tag like the iTunes Store do (in YYYY-MM-DDTHH:MM:SSZ format)?

Expired token issue

I had an issue with the script after the token expired and I tried to update it. I deleted the existing config.bat file in the config folder and added the new one through the cmd which created another config.bat with an updated token but when I tried to download any content I kept getting "EOFError: Ran out of input"

Also, anyone facing issues with mixing should add the attached mp4box.exe into their binaries file
mp4box.zip
Manzana

Unable to get license!

I get this output:

$$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\  
$$  _$$  _$$\  \____$$\ $$  __$$\ \____$$  |\____$$\ $$  __$$\  \____$$\ 
$$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
$$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
$$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
\__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                    ──── Apple Music Downloader ────

[21:54:23] [ManzanaCore] INFO: Loading device...
[21:54:23] [ManzanaCore] INFO: Checking accessToken...
[21:54:23] [ManzanaCore] INFO: Checking mediaUserToken...
[21:54:23] [ManzanaCore] INFO: Checking passed urls...
[21:54:23] [ManzanaCore] INFO: Starting download process...

    URL: https://music.apple.com/si/album/omoiyari/1453228182

[21:54:23] [ManzanaCore] INFO: Fetching API response...

[21:54:24] [ManzanaCore] INFO: Getting webplayback...
[21:54:25] [ManzanaCore] INFO: Parsing song uri...
[21:54:25] [ManzanaCore] INFO: Checking decrypt keys...
[21:54:25] [ManzanaCore] INFO: Requesting decrypt keys...
[21:54:26] [ManzanaCore] ERROR: Unable to get license!

CAN YOU HELP to debug this?

I have my files "token.bin
device_private_key
device_client_id_blob
config.json" inside device--android_generic folder and have input media-user-token

Muxing failed

When you run it it shows the following error, why does it happen?

Captura de pantalla 2023-12-19 042959

"SyntaxError: Non-ASCII character"

Hello,

What is the reason for this error and how can I solve it?

root@serve:/home/Manzana-Apple-Music-Downloader# python manzana.py https://music.apple.com/lk/music-video/taki-taki-feat-selena-gomez-ozuna-cardi-b/1438473545
  File "manzana.py", line 21
SyntaxError: Non-ASCII character '\xe2' in file manzana.py on line 22, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
root@serve:/home/Manzana-Apple-Music-Downloader#

on Debian 10 server.

Thank you!

bit Depth is 16bit?

is the files that we gonna download are 24bit or 16bit depth? i mean, we need the hi-res music. Is it possible to download this quality or is it way much lower than that?
thanks

How do i run this script?

I know this may be dumb of me to ask, but im not very tech savvy, and i wasnt able to understand the instructions you provided. any help will be appreciated :)

Not Recognizing "CCExtractor" in PATH

Thanks for your work on this project! Really excited to start using it.

Using a fresh Windows install, I'm running into an issue when trying to run either the compiled EXE or python.
I have CCExtractor installed, however, I keep running into this issue in the command line:
[ManzanaCore] ERROR: Unable to find 'ccextractor' in PATH!

I have CCExtractor added into my PATH environment variables...
image

Any idea why I'm receiving this error?

Error

Hello, it's always showing this error when i type "manzana.py -h"

Traceback (most recent call last):
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\manzana.py", line 4, in
from core import run
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\core_init_.py", line 1, in
from core.control import run
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\core\control.py", line 8, in
from core.api import AppleMusic
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\core\api_init_.py", line 1, in
from core.api.aplm import AppleMusic
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\core\api\aplm.py", line 14, in
from utils import logger
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\utils_init_.py", line 1, in
from utils.widevine import Device
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\utils\widevine_init_.py", line 1, in
from utils.widevine.formats.widevine_pssh_data_pb2 import WidevinePsshData
File "D:\Downloads\Free Download Manager\Manzana-Apple-Music-Downloader-2.4.0\utils\widevine\formats\widevine_pssh_data_pb2.py", line 19, in
_WIDEVINEPSSHDATA = DESCRIPTOR.message_types_by_name['WidevinePsshData']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

ValueError: could not convert string to float: '709m'

getting this error for this specific url:

https://music.apple.com/si/album/big-thing-deluxe-edition/693604737

[21:47:05] [ManzanaCore] INFO: Fetching API response...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/manzana.py:83 in │
│ │
│ 80 │ print(LOGO) │
│ 81 │ args = main() │
│ 82 │ config.get_config() │
│ ❱ 83 │ run(args) │
│ 84 │
│ │
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/core/control.py:41 in run │
│ │
│ 38 │ │ │
│ 39 │ │ for url in urls: │
│ 40 │ │ │ cons.print(f"\n\t[italic bold]URL: {url}[/]\n") │
│ ❱ 41 │ │ │ data = aplm.get_info(url) │
│ 42 │ │ │ │
│ 43 │ │ │ for sub_data in data: │
│ 44 │ │ │ │ dn = sub_data.get("dir") │
│ │
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/core/api/aplm.py:418 in get_info │
│ │
│ 415 │ │
│ 416 │ def get_info(self, url): │
│ 417 │ │ self.__parse_url(url) │
│ ❱ 418 │ │ return [self.__get_info()] │
│ 419 │ │
│ 420 │ def get_content(self, data): │
│ 421 │ │ id = data.get("id") │
│ │
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/core/api/aplm.py:303 in │
│ __get_info │
│ │
│ 300 │ │ │ return data │
│ 301 │ │ │
│ 302 │ │ if self.kind == "album": │
│ ❱ 303 │ │ │ data = album.parse_data( │
│ 304 │ │ │ │ self.__get_api()["data"][0] │
│ 305 │ │ │ ) │
│ 306 │ │ elif self.kind == "music-video": │
│ │
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/core/api/album.py:118 in │
│ parse_data │
│ │
│ 115 │ │ │ if rela["lyrics"].get("data"): │
│ 116 │ │ │ │ if rela["lyrics"]["data"][0].get("attributes"): │
│ 117 │ │ │ │ │ s.update( │
│ ❱ 118 │ │ │ │ │ │ lyrics.parse( │
│ 119 │ │ │ │ │ │ │ rela["lyrics"]["data"][0]["attributes"]["ttml"] │
│ 120 │ │ │ │ │ │ ) │
│ 121 │ │ │ │ │ ) │
│ │
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/core/api/lyrics.py:40 in parse │
│ │
│ 37 │ │ else: │
│ 38 │ │ │ b = line.get("begin") │
│ 39 │ │ │ if b: │
│ ❱ 40 │ │ │ │ begin = __get_ts(b) │
│ 41 │ │ │ │ timeSyncedLyrics.append(f"[{begin}]{line.text}") │
│ 42 │ │
│ 43 │ return { │
│ │
│ /Users/urosch/Documents/Gitanje/Manzana-Apple-Music-Downloader/core/api/lyrics.py:5 in __get_ts │
│ │
│ 2 │
│ 3 def __get_ts(ts): │
│ 4 │ ts = str(ts).replace('s', '') │
│ ❱ 5 │ secs = float(ts.split(':')[-1]) │
│ 6 │ │
│ 7 │ if ":" in ts: │
│ 8 │ │ mins = ts.split(':')[-2] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: could not convert string to float: '709m'

entries from my log file:
[24-03-24 21:47:05] [Manzana] INFO: Checking passed urls...
[24-03-24 21:47:05] [Manzana] INFO: Starting download process...
[24-03-24 21:47:05] [Manzana] DEBUG: Parsing url...
[24-03-24 21:47:05] [Manzana] DEBUG: UrlParseResult(kind="album", id="693604737", songId="None")
[24-03-24 21:47:05] [Manzana] INFO: Fetching API response...
[24-03-24 21:47:05] [Manzana] DEBUG: https://amp-api.music.apple.com:443 "GET /v1/catalog/si/albums/693604737?l=en-GB&extend=editorialVideo&include%5Bsongs%5D=lyrics%2Ccredits HTTP/1.1" 200 None

ALAC Support?

Hey, is it possible to load directly into .alac?

if so how do I set this?

proto missing some fields

missing fields 9 and 10:

message DeviceCertificate {
enum CertificateType {
ROOT = 0;
INTERMEDIATE = 1;
USER_DEVICE = 2;
SERVICE = 3;
}
//ProvisionedDeviceInfo.WvSecurityLevel Type = 1; // is this how one is supposed to call it? (it's an enum) there might be a bug here, with CertificateType getting confused with WvSecurityLevel, for now renaming it (verify against other binaries)
CertificateType Type = 1;
bytes SerialNumber = 2;
uint32 CreationTimeSeconds = 3;
bytes PublicKey = 4;
uint32 SystemId = 5;
uint32 TestDeviceDeprecated = 6; // is it bool or int?
bytes ServiceId = 7; // service URL for service certificates
}

Decryption failed error

Thank you for making this , but I'm having a bit of a problem using it.

same as #15 , in the decrypting step after completing the download, the command prompt shows [17:48:07] [ManzanaCore] ERROR: Decryption failed! (same in PowerShell)

F:\_爱好\_manualani\Manzana-Apple-Music-Downloader>python manzana.py https://music.apple.com/cn/album/a-rainy-dancer-2021/1564766292?i=1564766414



    $$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\
    $$  _$$  _$$\  \____$$\ $$  __$$\ \____$$  |\____$$\ $$  __$$\  \____$$\
    $$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
    $$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
    $$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
    \__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                        ──── Apple Music Downloader ────


[17:47:57] [ManzanaCore] INFO: Loading device...
[17:47:57] [ManzanaCore] INFO: Checking accessToken...
[17:47:58] [ManzanaCore] INFO: Checking mediaUserToken...
[17:47:58] [ManzanaCore] INFO: Checking passed urls...
[17:47:58] [ManzanaCore] INFO: Starting download process...

        URL: https://music.apple.com/cn/album/a-rainy-dancer-2021/1564766292?i=1564766414

[17:47:58] [ManzanaCore] INFO: Fetching API response...
------------------------------
[17:48:00] [ManzanaCore] INFO: Getting webplayback...
[17:48:00] [ManzanaCore] INFO: Parsing song uri...
[17:48:01] [ManzanaCore] INFO: Checking decrypt keys...
[17:48:01] [ManzanaCore] INFO: Requesting decrypt keys...
[17:48:02] [ManzanaCore] INFO: Saving decrypt keys...
[17:48:02] [ManzanaCore] INFO: Downloading "08 - A rainy dancer 2021"...

         Downloading ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 9.1/9.1 MB 6.1 MB/s eta 0:00:00

[17:48:07] [ManzanaCore] INFO: Decrypting audio...
[17:48:07] [ManzanaCore] ERROR: Decryption failed!

F:\_爱好\_manualani\Manzana-Apple-Music-Downloader>

And I've added mp4decrypt, CCExtractor and mp4box to PATH:
image

If there's any help will be appreciated!

ERROR NONE - NONE

in some videos (not all of them) i try to download i get this error
any solution ?

    $$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\
    $$  _$$  _$$\  \____$$\ $$  __$$\ \____$$  |\____$$\ $$  __$$\  \____$$\
    $$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
    $$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
    $$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
    \__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                        ──── Apple Music Downloader ────

[15:13:45] [ManzanaCore] INFO: Checking access token found in cache...
[15:13:45] [ManzanaCore] INFO: Checking media-user-token...
[15:13:46] [ManzanaCore] INFO: Fetching api response...
[15:13:47] [ManzanaCore] ERROR: None - None

Decryption failed.

Hi, when I use this downloader, I got decryption error like this:

[ManzanaCore] ERROR: Decryption failed!

Any help will be appreciated :)

2 errors encountered

An error is to enter the URL directly in the terminal to download, like this: python manzana.py https://music.apple.com/cn/album/%E7%BB%83%E4%B9%A0/720247917? i=720247948, the error message after displaying that the download has been completed is as follows:
`[10-11-23 15:08:33] [Manzana] INFO: Loading device...
[10-11-23 15:08:33] [Manzana] INFO: Checking accessToken...
[10-11-23 15:08:34] [Manzana] INFO: Checking mediaUserToken...
[10-11-23 15:08:34] [Manzana] INFO: Checking passed urls...
[10-11-23 15:08:34] [Manzana] INFO: Starting download process...

    URL: https://music.apple.com/cn/album/%E7%BB%83%E4%B9%A0/720247917?i=720247948

[10-11-23 15:08:34] [Manzana] INFO: Fetching API response...

[10-11-23 15:08:35] [Manzana] INFO: Getting webplayback...
[10-11-23 15:08:36] [Manzana] INFO: Parsing song uri...
[10-11-23 15:08:36] [Manzana] INFO: Checking decrypt keys...
[10-11-23 15:08:36] [Manzana] INFO: Requesting decrypt keys...
[10-11-23 15:08:37] [Manzana] INFO: Saving decrypt keys...
[10-11-23 15:08:38] [Manzana] INFO: Downloading "01 - 练习"...

     Downloading ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 8.7/8.7 MB 24.0 MB/s eta 0:00:00

[10-11-23 15:08:38] [Manzana] INFO: Decrypting audio...
[10-11-23 15:08:39] [Manzana] INFO: Muxing audio...
[10-11-23 15:08:39] [Manzana] INFO: Tagging audio...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\manzana.py:88 in │
│ │
│ 85 │ cons.print(LOGO) │
│ 86 │ args = main() │
│ 87 │ config.get_config() │
│ ❱ 88 │ run(args) │
│ 89 │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\control.py:246 in run │
│ │
│ 243 │ │ │ │ │ │ │ if not st["isTagged"]: │
│ 244 │ │ │ │ │ │ │ │ logger.info("Tagging audio...") │
│ 245 │ │ │ │ │ │ │ │ │
│ ❱ 246 │ │ │ │ │ │ │ │ tag( │
│ 247 │ │ │ │ │ │ │ │ │ _mux_fp, │
│ 248 │ │ │ │ │ │ │ │ │ track, │
│ 249 │ │ │ │ │ │ │ │ │ cover_data, │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\process\tagger.py:45 in tag │
│ │
│ 42 │ │ │ │ if key.startswith("----:com.apple.itunes:"): │
│ 43 │ │ │ │ │ value = [val.encode() for val in value] │
│ 44 │ │ │ │ │
│ ❱ 45 │ │ │ │ tags[key] = value │
│ 46 │ │ │ else: │
│ 47 │ │ │ │ if key.startswith("----:com.apple.itunes:"): │
│ 48 │ │ │ │ │ value = value.encode() │
│ │
│ C:\Users\alway\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen_file.py:73 in │
setitem
│ │
│ 70 │ │ │
│ 71 │ │ if self.tags is None: │
│ 72 │ │ │ self.add_tags() │
│ ❱ 73 │ │ self.tags[key] = value │
│ 74 │ │
│ 75 │ def delitem(self, key): │
│ 76 │ │ """Delete a metadata tag key. │
│ │
│ C:\Users\alway\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen\mp4_init
.py │
│ :372 in setitem
│ │
│ 369 │ def setitem(self, key, value): │
│ 370 │ │ if not isinstance(key, str): │
│ 371 │ │ │ raise TypeError("key has to be str") │
│ ❱ 372 │ │ self.render(key, value) │
│ 373 │ │ super(MP4Tags, self).setitem(key, value) │
│ 374 │ │
│ 375 │ @classmethod
│ │
│ C:\Users\alway\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen\mp4_init
.py │
│ :380 in _render │
│ │
│ 377 │ │ return b"moov.udta.meta.ilst" in atoms │
│ 378 │ │
│ 379 │ def _render(self, key, value): │
│ ❱ 380 │ │ atom_name = _key2name(key)[:4] │
│ 381 │ │ if atom_name in self.__atoms: │
│ 382 │ │ │ render_func = self.__atoms[atom_name][1] │
│ 383 │ │ │ render_args = self._atoms[atom_name][2:] │
│ │
│ C:\Users\alway\AppData\Local\Programs\Python\Python311\Lib\site-packages\mutagen\mp4_init
.py │
│ :213 in _key2name │
│ │
│ 210 │
│ 211 │
│ 212 def _key2name(key): │
│ ❱ 213 │ return key.encode("latin-1") │
│ 214 │
│ 215 │
│ 216 def _find_padding(atom_path): │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 22-24: ordinal not in range(256)`


An error is to create a bat file. The content of the bat file is: python manzana.py "D:\Portable Soft\Downloads\Manzana Apple Music Downloader\url.txt" &pause. Double-click the bat file and display the following error after the download is completed:
`[10-11-23 15:20:25] [Manzana] INFO: Loading device...
[10-11-23 15:20:25] [Manzana] INFO: Checking accessToken...
[10-11-23 15:20:25] [Manzana] INFO: Checking mediaUserToken...
[10-11-23 15:20:26] [Manzana] INFO: Checking passed urls...
[10-11-23 15:20:26] [Manzana] INFO: Starting download process...

    URL: https://music.apple.com/cn/album/%E9%9A%BE%E5%BF%B5%E7%9A%84%E7%BB%8F/1072048491?i=1072048505

[10-11-23 15:20:26] [Manzana] INFO: Fetching API response...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\manzana.py:88 in │
│ │
│ 85 │ cons.print(LOGO) │
│ 86 │ args = main() │
│ 87 │ config.get_config() │
│ ❱ 88 │ run(args) │
│ 89 │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\control.py:41 in run │
│ │
│ 38 │ │ │
│ 39 │ │ for url in urls: │
│ 40 │ │ │ cons.print(f"\n\t[italic bold]URL: {url}[/]\n") │
│ ❱ 41 │ │ │ data = aplm.get_info(url) │
│ 42 │ │ │ │
│ 43 │ │ │ for sub_data in data: │
│ 44 │ │ │ │ dn = sub_data.get("dir") │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\api\aplm.py:332 in get_info │
│ │
│ 329 │ │
│ 330 │ def get_info(self, url): │
│ 331 │ │ self.__parse_url(url) │
│ ❱ 332 │ │ return [self.__get_info()] │
│ 333 │ │
│ 334 │ def get_content(self, data): │
│ 335 │ │ id = data.get("id") │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\api\aplm.py:221 in __get_info │
│ │
│ 218 │ │ │ return data │
│ 219 │ │ │
│ 220 │ │ if self.kind == "album": │
│ ❱ 221 │ │ │ data = album.parse_data( │
│ 222 │ │ │ │ self.__get_api()["data"][0] │
│ 223 │ │ │ ) │
│ 224 │ │ elif self.kind == "music-video": │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\api\album.py:114 in parse_data │
│ │
│ 111 │ │ │ if rela["lyrics"].get("data"): │
│ 112 │ │ │ │ if rela["lyrics"]["data"][0].get("attributes"): │
│ 113 │ │ │ │ │ s.update( │
│ ❱ 114 │ │ │ │ │ │ lyrics.parse( │
│ 115 │ │ │ │ │ │ │ rela["lyrics"]["data"][0]["attributes"]["ttml"] │
│ 116 │ │ │ │ │ │ ) │
│ 117 │ │ │ │ │ ) │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\api\lyrics.py:38 in parse │
│ │
│ 35 │ │ │ │ begin = __get_ts(s.get("begin")) │
│ 36 │ │ │ │ timeSyncedLyrics.append(f"[{begin}]{s.text}") │
│ 37 │ │ else: │
│ ❱ 38 │ │ │ begin = __get_ts(line.get("begin")) │
│ 39 │ │ │ timeSyncedLyrics.append(f"[{begin}]{line.text}") │
│ 40 │ │
│ 41 │ return { │
│ │
│ D:\Portable Soft\Downloads\Manzana Apple Music Downloader\core\api\lyrics.py:5 in __get_ts │
│ │
│ 2 │
│ 3 def __get_ts(ts): │
│ 4 │ ts = str(ts).replace('s', '') │
│ ❱ 5 │ secs = float(ts.split(':')[-1]) │
│ 6 │ │
│ 7 │ if ":" in ts: │
│ 8 │ │ mins = ts.split(':')[-2] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: could not convert string to float: 'None'`

Connection Reset Error

Hi! I am trying to download a playlist filled with music videos and I get the following errors quite often:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in _error_catcher:710                                                                            │
│                                                                                                  │
│ in _raw_read:814                                                                                 │
│                                                                                                  │
│ in _fp_read:799                                                                                  │
│                                                                                                  │
│ in read:463                                                                                      │
│                                                                                                  │
│ in readinto:507                                                                                  │
│                                                                                                  │
│ in readinto:704                                                                                  │
│                                                                                                  │
│ in recv_into:1242                                                                                │
│                                                                                                  │
│ in read:1100                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

The above exception was the direct cause of the following exception:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in generate:816                                                                                  │
│                                                                                                  │
│ in stream:936                                                                                    │
│                                                                                                  │
│ in read:879                                                                                      │
│                                                                                                  │
│ in _raw_read:835                                                                                 │
│                                                                                                  │
│ in __exit__:137                                                                                  │
│                                                                                                  │
│ in _error_catcher:727                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ProtocolError: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the
remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly closed by the remotehost', None, 10054, None))

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module>:83                                                                                   │
│                                                                                                  │
│ in run:291                                                                                       │
│                                                                                                  │
│ in download:34                                                                                   │
│                                                                                                  │
│ in generate:818                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ChunkedEncodingError: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by
the remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly closed by the
remote host', None, 10054, None))
[9872] Failed to execute script 'manzana' due to unhandled exception!

Do you know what might cause it? Thank you!

not available for downloading artist

PS E:\manzana> python manzana.py https://music.apple.com/us/artist/jacob-lavallee/152533595

$$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\
$$  _$$  _$$\  \____$$\ $$  __$$\ \____$$  |\____$$\ $$  __$$\  \____$$\
$$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
$$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
$$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
\__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                    ──── Apple Music Downloader ────

[19:46:02] [ManzanaCore] INFO: Loading device...
[19:46:02] [ManzanaCore] INFO: Checking accessToken...
[19:46:03] [ManzanaCore] INFO: Checking mediaUserToken...
[19:46:03] [ManzanaCore] INFO: Checking passed urls...
[19:46:04] [ManzanaCore] INFO: Fetching artist contents...

     Artist: Jacob LaVallee

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ E:\manzana\manzana.py:83 in │
│ │
│ 80 │ print(LOGO) │
│ 81 │ args = main() │
│ 82 │ config.get_config() │
│ ❱ 83 │ run(args) │
│ 84 │
│ │
│ E:\manzana\core\control.py:35 in run │
│ │
│ 32 │ │ logger.info("Checking passed urls...") │
│ 33 │ │ │
│ 34 │ │ urls = parse.input_urls(args.url) │
│ ❱ 35 │ │ urls = aplm.get_urls(urls) │
│ 36 │ │ │
│ 37 │ │ logger.info("Starting download process...") │
│ 38 │
│ │
│ E:\manzana\core\api\aplm.py:411 in get_urls │
│ │
│ 408 │ │ for url in urls: │
│ 409 │ │ │ if "/artist/" in url: │
│ 410 │ │ │ │ self.__parse_url(url) │
│ ❱ 411 │ │ │ │ for ul in self.__get_artist(url): │
│ 412 │ │ │ │ │ u.append(ul) │
│ 413 │ │ │ else: u.append(url) │
│ 414 │ │ return u │
│ │
│ E:\manzana\core\api\aplm.py:229 in __get_artist │
│ │
│ 226 │ │ │ │ self.session, │
│ 227 │ │ │ │ f"https://amp-api.music.apple.com/v1/catalog/{self.storefront}/artists/{
│ 228 │ │ │ ), │
│ ❱ 229 │ │ │ __get_res( │
│ 230 │ │ │ │ self.session, │
│ 231 │ │ │ │ f"https://amp-api.music.apple.com/v1/catalog/{self.storefront}/artists/{
│ 232 │ │ │ ), │
│ │
│ E:\manzana\core\api\aplm.py:176 in __get_res │
│ │
│ 173 │ │ │ │ r = session.get(apiUrl) │
│ 174 │ │ │ │ r = json.loads(r.text) │
│ 175 │ │ │ │ │
│ ❱ 176 │ │ │ │ for item in r["data"]: │
│ 177 │ │ │ │ │ name = item["attributes"]["name"] │
│ 178 │ │ │ │ │ if " - EP" in name: name = name.replace(" - EP", "") + " [EP]" │
│ 179 │ │ │ │ │ if " - Single" in name: name = name.replace(" - Single", "") + " [S] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'data'
PS E:\manzana>

KeyError: 0

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 :

    $$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\
    $$  _$$  _$$\  \____$$\ $$  __$$\ \____$$  |\____$$\ $$  __$$\  \____$$\
    $$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
    $$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
    $$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
    \__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                        ──── Apple Music Downloader ────

[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...

    ┌────┬───────┬────────────┬────────────┬────────┬───────┐
    │ ID │ Codec │ Bitrate    │ Resolution │  FPS   │ Range │
    ├────┼───────┼────────────┼────────────┼────────┼───────┤
    │ 0  │ AVC   │ 2.22 Mb/s  │ 1252x468   │ 23.976 │  SDR  │
    │ 1  │ HEVC  │ 1.58 Mb/s  │ 1252x468   │ 23.976 │  SDR  │
    │ 2  │ AVC   │ 0.3 Mb/s   │ 588x220    │ 23.976 │  SDR  │
    │ 3  │ AVC   │ 0.4 Mb/s   │ 664x248    │ 23.976 │  SDR  │
    │ 4  │ AVC   │ 0.55 Mb/s  │ 744x278    │ 23.976 │  SDR  │
    │ 5  │ AVC   │ 0.8 Mb/s   │ 822x308    │ 23.976 │  SDR  │
    │ 6  │ AVC   │ 1.16 Mb/s  │ 860x322    │ 23.976 │  SDR  │
    │ 7  │ AVC   │ 1.56 Mb/s  │ 862x322    │ 23.976 │  SDR  │
    │ 8  │ AVC   │ 2.99 Mb/s  │ 1566x586   │ 23.976 │  SDR  │
    │ 9  │ AVC   │ 4.01 Mb/s  │ 1566x586   │ 23.976 │  SDR  │
    │ 10 │ AVC   │ 5.25 Mb/s  │ 1920x718   │ 23.976 │  SDR  │
    │ 11 │ AVC   │ 6.87 Mb/s  │ 1920x718   │ 23.976 │  SDR  │
    │ 12 │ AVC   │ 10.2 Mb/s  │ 1920x718   │ 23.976 │  SDR  │
    │ 13 │ HEVC  │ 0.29 Mb/s  │ 588x220    │ 23.976 │  SDR  │
    │ 14 │ HEVC  │ 0.44 Mb/s  │ 744x278    │ 23.976 │  SDR  │
    │ 15 │ HEVC  │ 0.62 Mb/s  │ 822x308    │ 23.976 │  SDR  │
    │ 16 │ HEVC  │ 0.87 Mb/s  │ 860x322    │ 23.976 │  SDR  │
    │ 17 │ HEVC  │ 1.15 Mb/s  │ 862x322    │ 23.976 │  SDR  │
    │ 18 │ HEVC  │ 2.26 Mb/s  │ 1566x586   │ 23.976 │  SDR  │
    │ 19 │ HEVC  │ 2.88 Mb/s  │ 1566x586   │ 23.976 │  SDR  │
    │ 20 │ HEVC  │ 4.04 Mb/s  │ 1920x718   │ 23.976 │  SDR  │
    │ 21 │ HEVC  │ 5.1 Mb/s   │ 1920x718   │ 23.976 │  SDR  │
    │ 22 │ HEVC  │ 7.19 Mb/s  │ 1920x718   │ 23.976 │  SDR  │
    │ 23 │ HEVC  │ 12.37 Mb/s │ 3832x1434  │ 23.976 │  SDR  │
    └────┴───────┴────────────┴────────────┴────────┴───────┘

     Enter ID: 8

┌─────────────────────────────── 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 :

    $$$$$$\$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\ $$$$$$\  $$$$$$$\   $$$$$$\
    $$  _$$  _$$\  \____$$\ $$  __$$\ \____$$  |\____$$\ $$  __$$\  \____$$\
    $$ / $$ / $$ | $$$$$$$ |$$ |  $$ |  $$$$ _/ $$$$$$$ |$$ |  $$ | $$$$$$$ |
    $$ | $$ | $$ |$$  __$$ |$$ |  $$ | $$  _/  $$  __$$ |$$ |  $$ |$$  __$$ |
    $$ | $$ | $$ |\$$$$$$$ |$$ |  $$ |$$$$$$$$\\$$$$$$$ |$$ |  $$ |\$$$$$$$ |
    \__| \__| \__| \_______|\__|  \__|\________|\_______|\__|  \__| \_______|

                        ──── Apple Music Downloader ────

[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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.