Skip to main content

Downloads songs, albums or playlists from deezer and spotify (clone from deezloader)

Project description

DeezSpot 🎵

A powerful Python and Lightweight library for downloading music from Deezer and Spotify. Clone of the original deezloader with additional features and improvements.

⚠️ IMPORTANT NOTES !!!!! ⚠️

USE AS YOUR OWN RISK I'M NOT RESPONSIBLE TO ANY YOUR PROBLEM AT SPOTIFY OR DEEZER ACCOUNT !

✨ Features

  • Download songs, albums, playlists from Deezer
  • Download songs, albums, playlists, episode from Spotify
  • Support for multiple audio qualities (MP3, FLAC) and OGG for spotify
  • Download podcast episodes
  • Batch downloading
  • Progress bar support
  • ID3 tags and artwork

🚀 Installation

pip install deezspot

Or

pip install git+https://github.com/jakiepari/deezspot

🔑 Authentication Setup

Deezer Authentication

  1. Get your Deezer ARL token from browser cookies after logging in to Deezer
  2. Use the token in your code:
from deezspot.deezloader import DeeLogin

dl = DeeLogin(arl='your_arl_token', email='your_Deezer_email', password='your_Deezer_password')

Spotify Authentication

  1. Clone the librespot-auth repository:
git clone https://github.com/dspearson/librespot-auth
cd librespot-auth
cargo build --release
  1. Generate credentials:
./target/release/librespot-auth
  1. Adjust your credentials.json with the format:
{
    "username": "your_spotify_username",
    "credentials": "your_credentials_string",
    "type": "AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS"
}

📚 Usage Examples

Downloading with Deezer

from deezspot.deezloader import DeeLogin

dl = DeeLogin(arl='your_arl_token', email='', password='')

# Download single track
dl.download_trackdee(
    link_track='https://www.deezer.com/track/123456789',
    output_dir='./downloads',
    quality_download='MP3_320',
    recursive_quality=False,
    recursive_download=False
)

# Download album
dl.download_albumdee(
    link_album='https://www.deezer.com/album/123456789',
    output_dir='./downloads/albums',
    quality_download='FLAC',
    recursive_quality=True,
    recursive_download=False
)

# Download playlist
dl.download_playlistdee(
    link_playlist='https://www.deezer.com/playlist/123456789',
    output_dir='./downloads/playlists',
    quality_download='MP3_320',
    recursive_quality=True,
    recursive_download=False
)

# Download artist
dl.download_artistdee(
    link_artist='https://www.deezer.com/artist/123456789',
    output_dir='./downloads/artists',
    quality_download='MP3_320',
    recursive_quality=True,
    recursive_download=False
)

# Download episode
dl.download_episode(
    link_episode='https://www.deezer.com/episode/123456789',
    output_dir='./downloads/episode',
    quality_download='MP3_320',
    recursive_quality=True,
    recursive_download=False
)

Downloading with Spotify

import sys
import os
import traceback

# Add the local deezloader directory to the sys.path
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
from deezspot.spotloader import SpoLogin

try:
    # Initialize Spotify client
    # Make sure to generate credentials.json using librespot-auth first
    credentials_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'credentials.json'))
    spo = SpoLogin(credentials_path=credentials_path)

    # Download single track
    track = spo.download_track(
        link_track="https://open.spotify.com/track/4tCtwWceOPWzenK2HAIJSb",
        output_dir="./downloads/tracks",
        quality_download="MP3_320",
        recursive_quality=False,
        recursive_download=False,
        not_interface=False,
        method_save=1
    )

    # Download album
    album = spo.download_album(
        link_album="https://open.spotify.com/album/6n4YU8iRm07O7lR1zQZypN",
        output_dir="./downloads/albums",
        quality_download="FLAC",
        recursive_quality=True,
        recursive_download=False,
        not_interface=False,
        method_save=1,
        make_zip=True
    )

    # Download playlist
    playlist = spo.download_playlist(
        link_playlist="https://open.spotify.com/playlist/1ZyEi4bBTYGTIlY23U1kwG",
        output_dir="./downloads/playlists",
        quality_download="MP3_320",
        recursive_quality=True,
        recursive_download=False,
        not_interface=False,
        method_save=1,
        make_zip=True
    )

    # Download episode
    episode = spo.download_episode(
        link_episode="https://open.spotify.com/episode/1hgO8Y3CCymyxn934lNtDq",
        output_dir="./downloads/episodes",
        quality_download="MP3_320",
        recursive_quality=False,
        recursive_download=False,
        not_interface=False,
        method_save=1
    )

except Exception as e:
    traceback.print_exc()

📋 Supported Formats

Deezer

  • MP3_128
  • MP3_320 (SOMETIMES NEED PAID DEEZER)
  • FLAC (PAID DEEZER ONLY)

Spotify

  • NORMAL
  • HIGH
  • VERY_HIGH

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

⚖️ License

This project is licensed under the GNU Affero General Public License v3 - see the

LICENSE

file for details.

🙏 Acknowledgments

  • Original deezloader project
  • Deezer API
  • Spotify API
  • Spotify Anon
  • librespot-python
  • librespot-auth

⭐️ Star History

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deezspot-1.1.tar.gz (38.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deezspot-1.1-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file deezspot-1.1.tar.gz.

File metadata

  • Download URL: deezspot-1.1.tar.gz
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.1

File hashes

Hashes for deezspot-1.1.tar.gz
Algorithm Hash digest
SHA256 e45674b7f6a6ae7dd06fd63cc8fc3651abf9682ad2c0dfafb96acef2020500a0
MD5 ec1f344afe47544f2e6914e1647f3cd4
BLAKE2b-256 a06f2e531cb0c38b7606d25f1f22ef40b8977ef01bb89e55c7ac05761a654e6b

See more details on using hashes here.

File details

Details for the file deezspot-1.1-py3-none-any.whl.

File metadata

  • Download URL: deezspot-1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.1

File hashes

Hashes for deezspot-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb532ff506e74c9b9cc7fb27845ad74f35aa543e883f882f8ddd0646d03085b2
MD5 6d9ce134d8cea61c26526f9e2c9813f3
BLAKE2b-256 f5c3058a9921a2d9f5c21930a03b34f1398fe705071768736835372d1c968c8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page