Skip to content

Download your Deezer Listening history with this simple Flask App!

License

Notifications You must be signed in to change notification settings

Teoretic6/deezer-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deezer API Python 3 Example

Example of working with Deezer API in Python 3.

Download your listening history with this simple Flask App!

Used libraries:

Based on Requests-OAuthlib GitHub OAuth 2 Tutorial

To Get Started

  1. Create a new Deezer Application at the Deezer for developers

Important: When creating your app, set field Redirect URL after authentication to http://127.0.0.1:5000/callback

Other fields can be set to whatever you want :)

  1. Fill in missing fields in "config.json" file
  • app_id:
    "Application ID" in application settings

    (Example: 289071)

  • client_secret:
    "Secret Key" in application settings

    (Example: 23a1ca17cf5ea13a03e1f4155320aec6)

  • user_id:
    "Deezer User ID" from your profile page URL

    (Example: if your profile page URL is "https://www.deezer.com/en/profile/102643295", your User ID is 102643295)

  1. Install dependencies:
    pip install -r requirements.txt

  2. Launch your application
    python3 app.py

  3. Go to http://127.0.0.1:5000/ in your web-browser

You will be asked to give permissions to your newly created application.

Press "Accept".

After that you should see the line:
History has been loaded! Check out the file in the project directory :)

If this line appears, congratulations!
You have successfully downloaded all of your available Deezer listening history!

  1. Open "deezer_history<current_date>.json" file in your project directory.

It's structure is basically:

{
    "data": [
        {track_1_dict},
        {track_2_dict},
        ...
        {track_n_dict}
    ]
}

For the format of track information, see Deezer API Explorer.

Further information

Check Deezer API Page for more information on Deezer API.

About

Download your Deezer Listening history with this simple Flask App!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages