deezer-downloader: Unable to download songs

Today i tried to download some new songs, and i get an error for a lot (but not all) songs. Like :

_`Downloading ‘Metallica - Nothing Else Matters.mp3’

ERROR: Can not download this song. Got a 403

worker 0 is done with task: {‘track_id’: 1489945622, ‘add_to_playlist’: False} (state=mission accomplished)

Worker 0 is waiting for a task`_

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 9
  • Comments: 35 (9 by maintainers)

Commits related to this issue

Most upvoted comments

can confirm, too. It’s a known issue for some songs. But it feels like it’s occcuring more often than in the past. I will take a look the next days.

I went on a little wild goose chase today and found this project: https://github.com/nathom/streamrip

Using it, I was able to fully download about 5 albums that where not downloading using Deezer Downloader, including 2CELLOS - Viva La Vida. @HaagenProd I was not able to download the Metalica track from from your post, I recieved this error: Track token has no sufficient rights on requested media, it is possible that this track has some special protection of some sorts.

NOTE: Everything mentioned above was downloaded without providing an ARL. As soon as I added one, the same problems from Deezer Downloader have started showing up.

@kmille The project linked, when it has no ARL provided uses something called Deezloader to download the tracks. I could not find much information about it though. Maybe you can take a look? This looks like it might provide some answeres and solutions for this problem.

I applied the fix in 172f5c6100f4ac5b384222c0ad8fff8c6be19320. Thanks @rllola. I removed the flac feature. It now works with a free account. But with the ARL cookie of my premium subscription account it behaves as follows:

free account download mp3 -> download with 128kbit/s (before it was 320kbit/s) flac -> doesn’t work. I removed the feature instead of always switching to mp3 (in this case, there was no 403 error)

premium subscription mp3 -> 403 flac -> 403 I don’t understand why it happens this way. But the general download functionality finally works again.

There’s a different project called deemix that works for my HiFi free account, specifically used the GUI for me. (THIS IS NO LONGER SUPPORTED BY ITS CREATOR, though it still works for me)

any luck with 403? From 180 songs on playlist downloaded 3 in 320kbps, rest is 403 😦

Running on Docker@Windows 10 with premium subscription

sounds good. I hope I will get it done in the next few days.

gg @rllola you nailed it.

replacing lines 330 to 333 with

    song_quality = 9 if song.get("FILESIZE_FLAC") and song.get("FILESIZE_FLAC") != '0' and config['deezer'].getboolean('flac_quality') else \
                   3 if song.get("FILESIZE_MP3_320") and song.get("FILESIZE_MP3_320") != '0' else \
                   5 if song.get("FILESIZE_MP3_256") and song.get("FILESIZE_MP3_256") != '0' else \
                   1

allows you to download any song.

I believe they increased the authorization granularity, and they now check if you are premium or not and limit the audio quality accordingly. I still need to validate this assumption, but seeing 2021 songs available only at 128kbps and getting a 403 when trying to access the FLAC or 320kbps files (instead of a 404), leads me to think that.

@kmille worth adding the fix above (or through integer casting) for the time being?

@kmille Here is an example LISA - MONEY Deezer Downloader can’t download this track. Streamrip downloads it but without ARL. When I tried the same song with ARL provided streamrip could not download it.

Tried downloading Patrice - Fear Rules on both Deezer Downloader and streamrip. It faild to download on both. Deezer Downlader gave me the usual 403 error. Streamrip without ARL gave me Track token has no sufficient rights on requested media. When I put my ARL it gave me an empty error message, just this: Unable to stream Patrice - Fear Rules (Album Version). Message:

Are you using streamrip with a subscription?

Everything I tried so far I have done both ways, with ARL and without ARL. Keep in mind my Deezer account is on the Free Plan. No premium subscriptions.

  • Without ARL, so far, I’m able to download all the songs I was not able to download using Deezer Downloader. Exceptions are the Metalica track from @HaagenProd and the Patrice - Fear Rules track.
  • With ARL, so far, I was not able to download anything. Always the same error message: Unable to stream track_name. Message:

If you don’t supply login credentials, streamrip downloads the song from dz.loaderapp.info. Kinda weird?

Yes, this is weird. Looking from the error messages I got in my browser when trying to directly download tracks using this: dz.loaderapp.info/deezer/1411/https://api.deezer.com/track/track_id, I think that dz.loaderapp.info is actually hosting some modified version of streamrip or streamrip is based on something that loaderapp.info uses.

Error Message: {"statusCode":500,"error":"Internal Server Error","message":"code,2002, message,Track token has no sufficient rights on requested media."}

The error message is exactly the same as the one I get in the CLI. I have no idea what is going on here.

I looked on the GitHub profiles for both developers, the one that owns the streamrip repo and the one that is credited as the developer of the Loader app on the Play Store. Looks like these projects are not connected to eachother. Also, whatever is hosted on dz.loaderapp.info seems to be private code because I could not find any reference for it on the GitHub profile of the Loader app developer.

Deezer is migrating to a new API.

You can still download the song ‘2CELLOS - Viva La Vida’. DeezerDownloader sends the following request: GET https://e-cdns-proxy-6.dzcdn.net/mobile/1/afe81113ad95767f887d8e89f1e7445f6f60f39375a65b5d4c69af22e09b7ce27d224f14ea853bb619d3a442e82c8c51a8161c4f1a5c3abac27a11a5277b4c021dcdd983071d3c8351cf5efcff043a75

If you play the song in the browser and check the sent requests in the debugger console:

first try

curl 'https://e-cdnt-proxy-6.dzcdn.net/media/1/9faa604a98bdf6f9746751b2ca2311d6574d3d108fc808c8babb8344aca4eb62aecc3d93512abe29ef210ad0704a93bd14a8164d7e8a432288d7e1e352ab6b95abdbb9b016769f24599f1d1b0a941507?09c2au7GzrhqFum9AN-fFFYHuPcg9IQB0u5eFVZz0nyXs7O1dN5QhqmFWCs1j3kauhu4ZkjZlI_nRKB2iguOH58ZM31H4s0o3OwM9r1nWvIs1YwOE-YE-u-65TYRamXnx4gRevvDpaiiuytZBWE7Htl04OkbJFl_N7QNGi3aSH_ZIioLnPHmaTVs01QI9jbNnympS338Yc--8X4ZbxSFHziHHREYkZv5DseC5NzMIe5iNmDSAl1HDa6SL9F0l96gjpck7Cnd0iaJSgad_SuKtFUC0xBuADt83JcyGEmrIf46SEbbt8pou87Eq16-kJ2JiJj8X-uawsfa-A' \
  -H 'authority: e-cdnt-proxy-6.dzcdn.net' \
  -H 'sec-ch-ua: "Chromium";v="93", " Not;A Brand";v="99"' \
  -H 'accept: */*' \
  -H 'dnt: 1' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'origin: https://www.deezer.com' \
  -H 'sec-fetch-site: cross-site' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://www.deezer.com/' \
  -H 'accept-language: en-US,en;q=0.9' \
  --compressed

second time

curl 'https://e-cdnt-proxy-6.dzcdn.net/media/1/9faa604a98bdf6f9746751b2ca2311d6574d3d108fc808c8babb8344aca4eb62aecc3d93512abe29ef210ad0704a93bd14a8164d7e8a432288d7e1e352ab6b95abdbb9b016769f24599f1d1b0a941507?uB1xpuEd4O33lvgYHLPkwIDPxf_eKmvQhCYHMhSfHkT8p0IXYHkPpNSvT8ZdVEptjc6fQYJ26g9nBMpawuJHAcU0dJfYebthCHV4EIYI7H1mtnhlFvwPYsdTFkxnmqWR3cqnI6oBgjCCSXdluRM1bETPHvFgr4serJbfsXb7zyvoeoksLstEGaz04bRylheOfRWmgh9cbANlC44GSmirvY12uT2zRowcy4-uJ2Qb1ssv-0xMp8mFlZeqcan9h_44I2mGU7lWjeYJ0GR89NJk1qDOfPvU3yurQNTS4IV4FrAq9hlKqj9f8Krd1JRkCwQtZRe63k2bfrycpw' \
-H 'authority: e-cdnt-proxy-6.dzcdn.net' \
-H 'sec-ch-ua: "Chromium";v="93", " Not;A Brand";v="99"' \
-H 'dnt: 1' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'accept: */*' \
-H 'origin: https://www.deezer.com' \
-H 'sec-fetch-site: cross-site' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'referer: https://www.deezer.com/' \
-H 'accept-language: en-US,en;q=0.9' \
--compressed

Understanding the javascript is pain.