Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some songs just return a 403 upon being downloaded #57

Open
milos192 opened this issue Apr 18, 2021 · 19 comments
Open

Some songs just return a 403 upon being downloaded #57

milos192 opened this issue Apr 18, 2021 · 19 comments

Comments

@milos192
Copy link

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
Copy link
Owner

kmille commented Apr 20, 2021

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
Copy link
Author

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
Copy link
Owner

kmille commented Apr 21, 2021

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
Copy link
Author

  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
Copy link
Author

milos192 commented Apr 22, 2021

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
Copy link
Owner

kmille commented Apr 23, 2021

I already did this. See my last comment.

@milos192
Copy link
Author

milos192 commented Apr 23, 2021

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
Copy link
Owner

kmille commented Apr 23, 2021

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
Copy link
Author

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
Copy link

fsneew commented May 15, 2021

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
Copy link
Author

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
Copy link

fsneew commented May 21, 2021

For instance : 468663282, 1199489112, 78592054, 886420052

@milos192
Copy link
Author

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
Copy link

fsneew commented Jun 1, 2021

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
Copy link
Author

milos192 commented Jun 2, 2021

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

@fsneew
Copy link

fsneew commented Jun 5, 2021

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
Copy link

mostm commented Jul 29, 2021

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
Copy link

literally every song i request is getting this error

@kmille
Copy link
Owner

kmille commented Jan 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants