ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.43k stars 10.04k forks source link

Download song on Deezer #1211

Closed Rudloff closed 7 years ago

Rudloff commented 11 years ago

It would be nice to be able to download songs on Deezer (e.g. http://www.deezer.com/fr/track/2422929).

Xonar commented 10 years ago

I would also really like this. I'll look into implementing it this vacation, no promises. I suspect it will violate their terms of use though (I'll have to check).

Xonar commented 9 years ago

Unfortunately it will most definately violate their terms of use and they took steps to enforce it. You can however easily get to the 30s preview.

dinamic commented 8 years ago

I think this is working now - you have to dump your cookies properly and you can get the 30 second version.

Unfortunately, the full songs cannot be downloaded yet. PRs are welcome tho.

This is the file that should be worked at - youtube_dl/extractor/deezer.py

Rudloff commented 8 years ago

The extractor does not seem to be triggered:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'https://www.deezer.com/track/2422929', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.02.01
[debug] Python version 2.7.6 - Linux-3.13.0-77-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 2422929: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 2422929: Downloading webpage
[generic] 2422929: Extracting information
ERROR: Unsupported URL: https://www.deezer.com/track/2422929
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 1289, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 248, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=etree.TreeBuilder(element_factory=_element_factory)))
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/compat.py", line 237, in _XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: undefined entity: line 5, column 27
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 666, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 313, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 1919, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://www.deezer.com/track/2422929
dinamic commented 8 years ago

It works only for playlists currently. You can create a playlist with the song you would like to download.

Rudloff commented 8 years ago

Strangely, it now downloads a random JS file:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'https://www.deezer.com/track/2422929', u'--get-url', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.06
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.4
[debug] exe versions: avconv 11.6-6, avprobe 11.6-6, rtmpdump 2.4
[debug] Proxy map: {}
WARNING: Falling back on generic information extractor.
https://cdns-files.dzcdn.net/cache/js/profile-14b9280e2c5f8c84b940f74ea16be676.js
Rudloff commented 7 years ago

The URL does not work anymore.

dinamic commented 7 years ago

@Rudloff, I was unable to respond on time.

I just updated to the last version of youtube-dl and downloading does not work still.

Here's some output:

# youtube-dl http://www.deezer.com/track/96213206

[generic] 96213206: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 96213206: Downloading webpage
[generic] 96213206: Extracting information
[generic] player?html5player=1&autoplay=1&playlist=0&width=504&height=504&format=square&type=tracks&id=96213206: Requesting header
WARNING: Falling back on generic information extractor.
[generic] player?html5player=1&autoplay=1&playlist=0&width=504&height=504&format=square&type=tracks&id=96213206: Downloading webpage
[generic] player?html5player=1&autoplay=1&playlist=0&width=504&height=504&format=square&type=tracks&id=96213206: Extracting information
ERROR: Unsupported URL: https://www.deezer.com/plugins/player?html5player=1&autoplay=1&playlist=0&width=504&height=504&format=square&type=tracks&id=96213206
dinamic commented 7 years ago

@Rudloff, should this issue remain closed, I shall open a new one to have this feature supported.