Skip to main content

Download songs/albums/playlists directly from Spotify in AAC

Project description

Spotify Web Downloader

A Python script to download songs/albums/playlists directly from Spotify in 256kbps/128kbps AAC.

Features

  • Download songs in 128kbps AAC or 256kbps AAC with a premium account
  • Download synced lyrics
  • Highly customizable

Installation

  1. Install Python 3.7 or higher
  2. Add FFmpeg to PATH
    • Older versions of FFmpeg may not work
  3. Place your cookies in the same folder that you will run spotify-web-downloader as cookies.txt
  4. Install spotify-web-downloader using pip
    pip install spotify-web-downloader
    

Examples

  • Download a song
    spotify-web-downloader "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo"
    
  • Download an album
    spotify-web-downloader "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1"
    

Configuration

spotify-web-downloader can be configured using the command line arguments or the config file. The config file is created automatically when you run spotify-web-downloader for the first time at ~/.spotify-web-downloader/config.json on Linux and %USERPROFILE%\.spotify-web-downloader\config.json on Windows. Config file values can be overridden using command line arguments.

Command line argument / Config file key Description Default value
-f, --final-path / final_path Path where the downloaded files will be saved. ./Spotify
-t, --temp-path / temp_path Path where the temporary files will be saved. ./temp
-c, --cookies-location / cookies_location Location of the cookies file. ./cookies.txt
-w, --wvd-location / wvd_location Location of the .wvd file. null
--config-location / - Location of the config file. <home_folder>/.spotify-web-downloader/config.json
--ffmpeg-location / ffmpeg_location Location of the FFmpeg binary. ffmpeg
--aria2c-location / aria2c_location Location of the aria2c binary. aria2c
--template-folder-album / template_folder_album Template of the album folders as a format string. {album_artist}/{album}
--template-folder-compilation / template_folder_compilation Template of the compilation album folders as a format string. Compilations/{album}
--template-file-single-disc / template_file_single_disc Template of the song files for single-disc albums as a format string. {track:02d} {title}
--template-file-multi-disc / template_file_multi_disc Template of the song files for multi-disc albums as a format string. {disc}-{track:02d} {title}
--download-mode / download_mode Download mode. ytdlp
-e, --exclude-tags / exclude_tags List of tags to exclude from file tagging separated by commas. null
--truncate / truncate Maximum length of the file/folder names. 40
-l, --log-level / log_level Log level. INFO
-p, --premium-quality / premium_quality Download in 256kbps AAC instead of 128kbps AAC. false
-l, --lrc-only / lrc_only Download only the synced lyrics. false
-n, --no-lrc / no_lrc Don't download the synced lyrics. false
-s, --save-cover / save_cover Save cover as a separate file. false
-o, --overwrite / overwrite Overwrite existing files. false
--print-exceptions / print_exceptions Print exceptions. false
-u, --url-txt / - Read URLs as location of text files containing URLs. false
-n, --no-config-file / - Don't use the config file. false

Tag variables

The following variables can be used in the template folder/file and/or in the exclude_tags list:

  • album
  • album_artist
  • artist
  • comment
  • compilation
  • copyright
  • cover
  • disc
  • disc_total
  • isrc
  • label
  • lyrics
  • media_type
  • rating
  • release_date
  • title
  • track
  • track_total

Download mode

The following download modes are available:

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

spotify_web_downloader-1.5.5.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

spotify_web_downloader-1.5.5-py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 3

Supported by

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