trustedtomato / dzdl

Download music through Deezer from the command line.
7 stars 0 forks source link

Error: Not OK #14

Open podzit opened 3 years ago

podzit commented 3 years ago

Since couple of days dzdl print some errors and don't download anything:

Error: not OK at Request.request.get [as _callback] (/opt/dzdl/index.js:156:14) at Request.self.callback (/opt/dzdl/node_modules/request/request.js:185:22) at Request.emit (events.js:198:13) at Request. (/opt/dzdl/node_modules/request/request.js:1154:10) at Request.emit (events.js:198:13) at IncomingMessage. (/opt/dzdl/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:286:20) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19)

Any idea?

trustedtomato commented 3 years ago

Yup, happens on my devices too. Gonna look into this issue this week.

Note for myself: The API of Deezer works fine, it's the music streaming part which is bugging.

On Mon, Sep 13, 2021, 6:01 PM PodZ @.***> wrote:

Since couple of days dzdl print some errors and don't download anything:

Error: not OK at Request.request.get [as _callback] (/opt/dzdl/index.js:156:14) at Request.self.callback (/opt/dzdl/node_modules/request/request.js:185:22) at Request.emit (events.js:198:13) at Request. (/opt/dzdl/node_modules/request/request.js:1154:10) at Request.emit (events.js:198:13) at IncomingMessage. (/opt/dzdl/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:286:20) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19)

Any idea?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/trustedtomato/dzdl/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMIERA7BHMM4YT33XHJJTDUBYN5BANCNFSM5D6FDC5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

trustedtomato commented 3 years ago

It seems to work again:D Is it working on your machine too? If not, could you please try debugging it? Since it disappeared, I can't do that :/

podzit commented 3 years ago

Nop, errors are still here :( Node version: 10.24.0 Npm version: 5.8.0 I've tried after removing cookies.json, with new arl cookie, with another deezer account... in vain. I've tried with another linux (node version 10.19.0, npm version 6.14.4) same thing happen. What could I do for debugging?

trustedtomato commented 3 years ago

Can you try another device? I think Deezer might be limiting requests based on IP, because the exact same arl works on my PC but not on my Android right now. If this is the case, the code has to switch to a slower, more responsible downloading approach unless you know about some way of changing the local IP address.

podzit commented 3 years ago

I tried with 3 different devices (on Raspbian Buster and Ubuntu 20.04) and with 2 differents IPs (local and behind a 4G acces point). Always the same error occured:

Error: not OK
    at Request.request.get [as _callback] (/opt/dzdl/index.js:156:14)
    at Request.self.callback (/opt/dzdl/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (/opt/dzdl/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:198:13)
    at IncomingMessage.<anonymous> (/opt/dzdl/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:286:20)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

What's going on ? 🤔

trustedtomato commented 3 years ago

How the Deezer web page works has changed, so I'm gonna try following their way of streaming to resolve this issue. It seems there are similar issues in similar projects, like https://github.com/nathom/streamrip, so there's a bigger change here. It's weird tho that it does work sometimes. I could perfectly download Maneskin's Beggin' in 320 kbps.

podzit commented 3 years ago

Is this a new restriction of Deezer ? I didn't saw previously that 320Kbps was only available for premium users: image

trustedtomato commented 3 years ago

I don't know...:D You could check it with the Wayback Machine though. But what I see rn is that no music streaming service provides 320 kbps to free accounts (I checked Spotify, Deezer and YouTube Music), which is a pity. Hopefully I can fix this issue.

tir. 21. sep. 2021 16.43 skrev PodZ @.***>:

Is this a new restriction of Deezer ? I didn't saw previously that 320Kbps was only available for premium users: [image: image] https://user-images.githubusercontent.com/74189166/134191195-e5c09f02-a7cf-4b3d-84df-40cb12362b98.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/trustedtomato/dzdl/issues/14#issuecomment-924057721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMIERGQUKR6I3YCS7QZTVLUDCKXRANCNFSM5D6FDC5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

trustedtomato commented 3 years ago

It seems Deezer has patched their nice little bug through which people could download 320 kbps songs despite not having a premium account. One option is to use disposable credit cards and create new 1-month-trial Deezer accounts every month and use deezmix, the other is to just buy songs on websites like Bandcamp - which is probably the most ethical thing one can do. It's like vinyl records and most of the dough goes to the artist. I'll probably do this.

podzit commented 3 years ago

Downloads in 320Kbps throught deemix seems to work well with a free account (?!).

Edit: It's written 320Kbps but it's 128Kbps... :/

Ethically I'm agree with you to support artists because I'm a musician / producer distributed on streaming platforms (ironic isn't it?). I use downloading tools to catch music I've already bought in CD or vinyl records. It's just easier than finding my USB CD reader, encode to mp3, rename each track and finding & saving covers (and I don't describe the hard process to encode vinyl records...). I don't want to suscribe a premium account on Deezer or other streaming platforms because I already pay a rate of my earnings to them. Should I negociate a free premium account ? Hummm maybe...

DZDL was great because of using the CLI I was able to catch albums (nice renamed and covered) from anywhere throught a simple ssh connection to my raspberry pi at home. So I'm sad that you stop this project but I understand your choice.

Thank you for your work and your time.

CHJ85 commented 2 years ago

Did you manage to figure this one out?

trustedtomato commented 2 years ago

Sadly it very much seems that they patched the bug which was exploited. free-mp3-download.net offers downloading music from a Deezer HiFi account, so that could be automated, but the captcha definitely makes the process harder. Plus the dependency chain is longer, and we don't really know yet how reliable free-mp3-download is. You could also use other solutions, which download 128 kbps music from YouTube Music / Deezer / whatever. There are a lot of solutions here, but I am not sure which one is the best, so you might have to search for it. Probably I will make one too if I don't find anything which has a CLI and tags the music properly. And the third option, the one which I already mentioned, is, well, buying the music :smile:

CHJ85 commented 2 years ago

@trustedtomato Right. But instead of trying to bypass the captcha, would it be possible to pipe it through the command line in a gui browser window?

trustedtomato commented 2 years ago

You mean free-mp3-download.net's captcha? I wouldn't like to use a GUI window, because that would destroy both Android compatibility and Podzit's use case. However, if puppeteer headless works in such environments, what one might do is to display captchas in the terminal, which is definitely a silly idea, but it might work :smiley: