Download de Deezer Python
# Some login code here
# Some download stuffs
from pydeezer import Downloader
from pydeezer.constants import track_formats
download_dir = "C:\\Users\\User\\Music"
track_id = "547653622"
track = deezer.get_track(track_id)
# track is now a dict with a key of info, download, tags, and get_tag
# info and tags are dict
track_info = track["info"]
tags_separated_by_comma = track["tags"]
# download and get_tag are partial functions
track["download"](download_dir, quality=track_formats.MP3_320) # this will download the file, default file name is Filename.[mp3 or flac]
tags_separated_by_semicolon = track["get_tag"](separator="; ") # this will return a dictionary similar to track["tags"] but this will override the default separator
artist_id = "53859305"
artist = deezer.get_artist(artist_id)
album_id = "39949511"
album = deezer.get_album(album_id) # returns a dict containing data about the album
playlist_id = "1370794195"
playlist = deezer.get_playlist(playlist_id) # returns a dict containing data about the playlist
# Multithreaded Downloader
list_of_id = ["572537082",
"921278352",
"927432162",
"547653622"]
downloader = Downloader(deezer, list_of_ids, download_dir,
quality=track_formats.MP3_320, concurrent_downloads=2)
downloader.start()
Relieved Rabbit