A wrapper for the private Deezer APIs
Project description
Affordable Mentions
🙏 Credits to deezspot
The whole download process was adapted from deezspot. A BIG Thank-You to this project!
⚠️ Disclaimer
Use this project at your own risk. I'm not responsible (and the author from deezspot is even less responsible) for any problems caused with your account.
Developers please note that the download process is intentionally separated into two sections: Downloading and Decrypting. I advise you to not store any decrypted audio easily readable to the user.
DeezerGW
DeezerGW is a library that implements the private API of Deezer
Installation
pip install deezergw
Features
- Get info of tracks, albums, artists and playlists by the ID
- Search for tracks, albums, artists and playlists
- Manage favorite tracks, albums, artists and playlists
- Download tracks (ID3 support currently missing) as a MP3 (128 or 320) or FLAC
- Fully type safe
- Python >= 3.8
Basic use
import deezergw
# Initialize the Client using a key for encryption (e.g. unix username)
client = deezergw.Client("choose_a_key_here", arl="put_your_browser_arl_here")
# Save session. Encrypted using the key
logindump = deezergw.generate_logindump()
with open("dump.dat", "wb") as f:
f.write(logindump)
# Restore the session
with open("dump.dat", "rb") as f:
dump = f.read()
new_client = deezergw.Client("choose_a_key_here", logindump=dump)
# Get a track
track = new_client.get_track("91066235")
# Metadata - See IntelliType for all options
print(track.title)
print(track.is_favorite)
print(track.album_name)
# Download the track
encrypted_data, info = track.download_encrypted()
decrypted_data = deezergw.decrypt_audio(encrypted_data, track.id) # or info["track_id"]
save_decrypted(decrypted_data, "filename." + info["file_format"])
# Search
results = new_client.search("C418 Alpha")
album = results.albums[0].get_full_album()
print(album.tracks[0].title)
# Favorite (basically) anything
track.favorite() # toggle
album.favorite(True) # force favorited
results.playlists[1].favorite(False) # force not favorited
# Get cover url
cover = track.cover_url(128)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deezergw-0.0.1.tar.gz.
File metadata
- Download URL: deezergw-0.0.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccde54fb8eba4e33d6d2635d8d733408539d608d91793545f10950cf3444a063
|
|
| MD5 |
efb39c9f1d0e339cbbd8bae163182d5b
|
|
| BLAKE2b-256 |
dd05454523a22922f6c85cd65e803aeac5a60596db9828a40e37ea7ee0a550fb
|
Provenance
The following attestation bundles were made for deezergw-0.0.1.tar.gz:
Publisher:
python-publish.yml on tabbeddev/deezergw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deezergw-0.0.1.tar.gz -
Subject digest:
ccde54fb8eba4e33d6d2635d8d733408539d608d91793545f10950cf3444a063 - Sigstore transparency entry: 1006569064
- Sigstore integration time:
-
Permalink:
tabbeddev/deezergw@cbc0d0728f784836438eec6224426cf0b8969940 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/tabbeddev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cbc0d0728f784836438eec6224426cf0b8969940 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deezergw-0.0.1-py3-none-any.whl.
File metadata
- Download URL: deezergw-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f730ddce1394c4db11035f5fc9561b5f74992163450accd80f52207b2e6a919a
|
|
| MD5 |
0578d54d92c437f59cbd713d9c2c5d25
|
|
| BLAKE2b-256 |
b3e515c0f1eba41e4d4fb0c554fb1ec007490fdb9b2138bcf21d7e5cba3adf66
|
Provenance
The following attestation bundles were made for deezergw-0.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on tabbeddev/deezergw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deezergw-0.0.1-py3-none-any.whl -
Subject digest:
f730ddce1394c4db11035f5fc9561b5f74992163450accd80f52207b2e6a919a - Sigstore transparency entry: 1006569076
- Sigstore integration time:
-
Permalink:
tabbeddev/deezergw@cbc0d0728f784836438eec6224426cf0b8969940 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/tabbeddev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cbc0d0728f784836438eec6224426cf0b8969940 -
Trigger Event:
release
-
Statement type: