glomatico / gamdl

A Python CLI app for downloading Apple Music songs/music videos/posts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(URL 1/1) Failed to check

Gamer4Life2020 opened this issue · comments

Not sure what I'm doing incorrectly if anything and have uninstalled and reinstalled. Keep getting (URL 1/1) Failed to check.

Microsoft Windows [Version 10.0.22631.3296]
(c) Microsoft Corporation. All rights reserved.

C:\Users\USER>gamdl "https://music.apple.com/us/album/never-gonna-give-you-up-2022-remaster/1626265761?i=1626265765"
[ERROR 15:44:34] (URL 1/1) Failed to check "https://music.apple.com/us/album/never-gonna-give-you-up-2022-remaster/1626265761?i=1626265765"
[INFO 15:44:34] Done (1 error(s))

Please send the output of the same command but with --print-exceptions included on it.

C:\Users\USER>gamdl "https://music.apple.com/us/album/never-gonna-give-you-up-2022-remaster/1626265761?i=1626265765" --print-exceptions
[ERROR 17:05:49] (URL 1/1) Failed to check "https://music.apple.com/us/album/never-gonna-give-you-up-2022-remaster/1626265761?i=1626265765"
Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\apple_music_api.py", line 78, in _check_amp_api_response
response.raise_for_status()
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://amp-api.music.apple.com/v1/catalog/us/songs/1626265765?l=en-US&include=lyrics%2Calbums&extend=extendedAssetUrls

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\cli.py", line 434, in main
download_queue = downloader.get_download_queue(url_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\downloader.py", line 120, in get_download_queue
return self._get_download_queue(url_info.type, url_info.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\downloader.py", line 125, in _get_download_queue
download_queue.append(DownloadQueueItem(self.apple_music_api.get_song(id)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\apple_music_api.py", line 101, in get_song
self._check_amp_api_response(response)
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\apple_music_api.py", line 86, in _check_amp_api_response
self._raise_response_exception(response)
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\apple_music_api.py", line 72, in _raise_response_exception
raise Exception(
Exception: Request failed with status code 404: {"errors":[{"id":"PQ3GIRNNIQ4Q4GYEMUAHHA4WHE","title":"Resource Not Found","detail":"Resource with requested id was not found","status":"404","code":"40400"}]}
[INFO 17:05:49] Done (1 error(s))

You sent an invalid link.

I noticed that after the fact, but was using an example to test with. Like this one "https://music.apple.com/us/artist/smilez-and-southstar/78867494"

Also, doesn't work. I'll try a few more and see. No a huge deal as I have Tidal/Deezer and other scripts I found, but was hoping for Apple for certain albums and maybe music videos. Not sure on the bold on this, sorry.

C:\Users\USER>gamdl "https://music.apple.com/us/artist/smilez-and-southstar/78867494" --print-exceptions
[ERROR 17:11:44] (URL 1/1) Failed to check "https://music.apple.com/us/artist/smilez-and-southstar/78867494"
Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\cli.py", line 433, in main
url_info = downloader.get_url_info(url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\gamdl\downloader.py", line 108, in get_url_info
url_info.storefront = url_regex_result.group(1)
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
[INFO 17:11:44] Done (1 error(s))

Artist links are not supported.