yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
84.83k stars 6.62k forks source link

Deezer support #1591

Open hotbear9999 opened 2 years ago

hotbear9999 commented 2 years ago

Checklist

Region

Bangladesh

Example URLs

Description

I saw in askubuntu that you could download music from deezer. But, that's from 4 years ago and I think that's no longer supported. I tried with my free account but it only download 30 seconds preview.

Verbose log

[debug] Command-line config: ['https://www.deezer.com/us/track/1190729412', '--username', 'PRIVATE', '--verbose']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8[debug] yt-dlp version 2021.10.22
[debug] Lazy loading extractors is disabled
[debug] Python version 3.9.7 (CPython 64bit) - Linux-5.14.16-arch1-1-x86_64-with-glibc2.33
[debug] exe versions: ffmpeg 4.4, ffprobe 4.4, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [generic] Extracting URL: https://www.deezer.com/us/track/1190729412
[generic] 1190729412: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] 1190729412: Downloading webpage
[generic] 1190729412: Extracting information
[debug] Default format spec: bestvideo*+bestaudio/best
[info] c-ce4014c18e5671692a399af259a27ec6-3: Downloading 1 format(s): 0
[debug] Invoking downloader on "https://cdns-preview-c.dzcdn.net/stream/c-ce4014c18e5671692a399af259a27ec6-3.mp3"
[download] Destination: BAKU [c-ce4014c18e5671692a399af259a27ec6-3].mp3
[download] 100% of 468.58KiB in 00:02
pukkandan commented 2 years ago

For devs: There is already an extractor for albums/playlist in deezer.py, but only 30s preview is supported atm

hotbear9999 commented 2 years ago

For devs: There is already an extractor for albums/playlist in deezer.py, but only 30s preview is supported atm

well, I can't even download a single track

MinePlayersPE commented 2 years ago

well, I can't even download a single track

...that wasn't what this issue is about? If the extractor mysteriously broke after this issue, consider opening a new extractor-bug issue

u-spec-png commented 2 years ago

Found this pr: https://github.com/ytdl-org/youtube-dl/pull/13194 it might be helpful

ghost commented 2 years ago

This is probably a bad idea considering Deezer constantly DMCAs download tools.

nicolaasjan commented 2 years ago

This is probably a bad idea considering Deezer constantly DMCAs download tools.

https://torrentfreak.com/deezer-targets-pirate-apps-maliciously-retrieving-publishing-encryption-keys-210212/

pukkandan commented 2 years ago

I do not know what exactly the linked PR is doing. But if it is to be accepted into yt-dlp, the extractor must use ONLY publicly available APIs and keys. If on the other hand, it is using leaked/developer keys and/or using vulnerabilities in the encryption algorithm, then it will not be merged.

But whether the PR is acceptable or not, I believe the site-request itself is valid since afaik, they do not use any "real" DRM (where the hardware or the browser needs to have authorized keys to play back the content). Do correct me if I am wrong

deezerdl commented 2 years ago

There are two 'magic' constants used in the deezer code, I would not call them private keys, they are more like 'obfuscation constants'. Maybe a lawyer could find a way to call these 'private keys'. Then what do lawyers know about programming and cryptography?