kmille / deezer-downloader

Download music from Deezer with a nice front end
MIT License
639 stars 88 forks source link

Some songs just return a 403 upon being downloaded #57

Open milos192 opened 3 years ago

milos192 commented 3 years ago

Platform: Windows with the WSL2-backend for Docker (using Ubuntu as the distribution) Build: latest as of 15.04.2021.

So, for the most part, the downloading goes fine, but there are some songs that straight up refuse to be downloaded and I just get a ERROR: Can not download this song. Got a 403 every time I try. On the other hand, when downloading playlists, there are songs that fail at first, but work fine later on.

Here's a couple of IDs of songs that fail constantly: 9125239, 8717671, 8454029.

The songs do play when I try them on the platform (both the web and Electron app).

Do you know why this might be? Let me know if I can provide more info, and thank you for the awesome app!

kmille commented 3 years ago

Hey, all three examples for me: 9125239, 8717671, 8454029. Example output:

Backend

User request: /download with {'type': 'track', 'music_id': 9125239, 'add_to_playlist': False, 'create_zip': False}
127.0.0.1 - - [20/Apr/2021 18:10:56] "POST /download HTTP/1.1" 200 -
Worker 1 is now working on task: {'track_id': 9125239, 'add_to_playlist': False}
127.0.0.1 - - [20/Apr/2021 18:10:56] "GET /queue HTTP/1.1" 200 -
Downloading 'Lazlo Bane - Superman.mp3'
Dowload finished: /tmp/deezer-downloader/songs/Lazlo Bane - Superman.mp3

Client

curl 'http://localhost:5000/download' --data-raw '{"type":"track","music_id":9125239,"add_to_playlist":false,"create_zip":false}'

Can you share your output?

milos192 commented 3 years ago

I tried your exact command (copied and pasted).

Output:

User request: /download with {'type': 'track', 'music_id': 9125239, 'add_to_playlist': False, 'create_zip': False}
172.17.0.1 - - [20/Apr/2021 21:40:55] "POST /download HTTP/1.1" 200 -
Worker 1 is now working on task: {'track_id': 9125239, 'add_to_playlist': False}
Downloading 'Lazlo Bane - Superman.flac'
ERROR: Can not download this song. Got a 403
worker 1 is done with task: {'track_id': 9125239, 'add_to_playlist': False} (state=mission accomplished)
Worker 1 is waiting for a task

Can you try with FLAC to see if it will work then?

Thanks for the response!

kmille commented 3 years ago

hmm this works for me too

User request: /download with {'type': 'track', 'music_id': 65445466, 'add_to_playlist': False, 'create_zip': False}
127.0.0.1 - - [21/Apr/2021 10:39:44] "POST /download HTTP/1.1" 200 -
Worker 1 is now working on task: {'track_id': 65445466, 'add_to_playlist': False}
Downloading 'The Doors - Riders on the Storm.flac'
Dowload finished: /tmp/deezer-downloader/songs/The Doors - Riders on the Storm.flac
worker 1 is done with task: {'track_id': 65445466, 'add_to_playlist': False} (state=mission accomplished)

hmm... Some thoughts: 1) maybe it's a legal issue and some songs are just available in certain regions? Can you play the song in the browser? https://www.deezer.com/us/track/9125239 2) Can you run it natively on Linux? 3) Can you send me your cookie and I can try to download it (email is in git log)?

milos192 commented 3 years ago
  1. Nope, all the songs are available in the browser, and as a matter of fact, I've managed to download several songs that are region locked for me
  2. If all else fails, I guess I could spin up a virtual machine, but I don't have Linux running on anything currently
  3. Wrote you an email. Hope the address is correct. If not, let me know :)
  4. You have downloaded a different song, not one of the IDs I mentioned; maybe it would not work with some of my IDs?

Thanks again!

milos192 commented 3 years ago

Update: I started up my container with the option to download MP3s and now the songs are downloading. Can you please try with FLAC quality on one of the three IDs I provided?

kmille commented 3 years ago

I already did this. See my last comment.

milos192 commented 3 years ago

Hey, yeah, but I'm asking because the song in your console excerpt is Riders on the Storm, and not Superman.

Did you also try with the IDs I provided but just didn't paste that log?

Also, I think I got the email wrong, I'll try sending another one today.

Thanks again!

Edit: I have sent you an email with the ARL and one more log. :)

kmille commented 3 years ago

Hey,

seems like I haven't tested it right. I can reproduce the issue now (with id 9175916 and my cookie). The mp3 download works, flac doesn't. I can't tell you why. The http body is just empty. I have a premium subscription, but not the one with "HiFi" aka flac. So I can't tell you if it works for that song in the browser. Maybe someone else can test this. There is nothing else I can do right now.

milos192 commented 3 years ago

Thanks for the info! I guess all we can do is wait for someone with a HiFi subscription to try this out. Getting the MP3s will suffice for now. :)

fsneew commented 3 years ago

Hi there ! Got the same problem with some songs... After reading this thread I've tried dowloading the MP3s ; it worked for some songs but some still don't work :-(

milos192 commented 3 years ago

Can you give me an ID of a failing MP3 song? I'll try to get it to see if it's repro on my side, too.

fsneew commented 3 years ago

For instance : 468663282, 1199489112, 78592054, 886420052

milos192 commented 3 years ago

Sorry for the very late reply. I managed to download 468663282, for instance. Didn't try the others as the first one worked.

How did you set up the container for MP3 downloading? Can you share the command you ran (without your ARL)?

fsneew commented 3 years ago

First I call : parse_deezer_playlist to get items of my playlist (and the ids) then I call get_song_infos_from_deezer_website(TYPE_TRACK,id) and this gives me the 404

milos192 commented 3 years ago

Oh, sorry, I was just using the UI. It works fine for me from there.

fsneew commented 3 years ago

I found a workaround... Sometimes, for some reason, the ID returned by get_song_infos_from_deezer_website doesn't work (403 error) ; in this case I use the song["FALLBACK"]["SNG_ID"] ; still some 403 error on some songs but in progress...

mostm commented 3 years ago

Thanks for the info! I guess all we can do is wait for someone with a HiFi subscription to try this out. Getting the MP3s will suffice for now. :)

Trying with HiFi subscription account, issues are same.

Mushebeq commented 2 years ago

literally every song i request is getting this error

kmille commented 2 years ago

Please check #66 for further information TLDR: right now, with a free subscription, downloading 128kbit/s mp3s should work (some 403s may occur).