glomatico / gamdl

A Python CLI app for downloading Apple Music songs/music videos/posts.
MIT License
822 stars 93 forks source link

Failed to download "insert track name" #67

Closed ldentzien closed 10 months ago

ldentzien commented 11 months ago

Does anybody know why I would have this issue?

[INFO 12:35:54] (Track 1/1 from URL 1/1) Downloading "Track name" [ERROR 12:35:55] (Track 1/1 from URL 1/1) Failed to download "Track name" [INFO 12:35:55] Done (1 error(s))

glomatico commented 11 months ago

Please provide the output with --print-exceptions

ldentzien commented 11 months ago

Hey thanks for your quick response. Seems to be related to the certificate.

[WARNING 14:47:33] mp4decrypt not found at "mp4decrypt", music videos videos will not be downloaded [INFO 14:47:34] (Track 1/1 from URL 1/1) Downloading "Never Gonna Give You Up (2022 - Remaster)" [ERROR 14:47:34] (Track 1/1 from URL 1/1) Failed to download "Never Gonna Give You Up (2022 - Remaster)" Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect self.sock = self._context.wrap_socket(self.sock, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/gamdl/cli.py", line 396, in main decryption_key = downloader.get_decryption_key_song( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/gamdl/downloader.py", line 295, in get_decryption_key_song track_uri = m3u8.load(stream_url).keys[0].uri File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/m3u8/init.py", line 96, in load content, base_uri = http_client.download(uri, timeout, headers, verify_ssl) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/m3u8/httpclient.py", line 16, in download resource = opener.open(uri, timeout=timeout) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)> [INFO 14:47:34] Done (1 error(s))

ldentzien commented 10 months ago

Hey guys, turns out that too solve this problem I needed to go to: /Applications/Python 3.10/ Install Certificates.command

I'm using mac. In my case problem solved and I'm closing the issue.