Skip to main content

A command-line app for downloading songs, podcasts and videos from Spotify.

Project description

Votify

A command-line app for downloading songs, podcasts and videos from Spotify.

Discord Server: https://discord.gg/aBjMEZ9tnq

Features

  • Songs: Download songs up in AAC 128kbps or in AAC 256kbps with an active premium subscription.
  • Podcasts: Download podcasts in Vorbis or AAC.
  • Videos: Download podcast videos and music videos with an active premium subscription.
  • Synced Lyrics: Download synced lyrics in LRC.
  • Artist Support: Download an entire discography by providing the artist's URL.
  • Highly Customizable: Extensive configuration options for advanced users.

Prerequisites

  • Python 3.10 or higher installed on your system.
  • The cookies file of your Spotify browser session in Netscape format.
  • FFmpeg on your system PATH.
  • A .wvd file.
    • A .wvd file contains the Widevine keys from a device and is required to decrypt music videos and songs in AAC. The easiest method of obtaining one is using KeyDive, which extracts it from an Android device. Detailed instructions can be found here: https://github.com/hyugogirubato/KeyDive. .wvd files extracted from emulated devices may not work.

Notes

  • Some users have reported that Spotify suspended their accounts after using Votify. Use it at your own risk.
  • The .wvd file is not required if you plan on only downloading podcasts and can be skipped by enabling the disable_wvd option.
  • FFmpeg is not required if you plan on only downloading podcasts in Vorbis, but it's needed for downloading podcasts in AAC.

Optional dependencies

The following tools are optional but required for specific features. Add them to your system's PATH or specify their paths using command-line arguments or the config file.

  • MP4Box: Required when setting mp4box as remux mode.
  • Shaka Packager: Required when setting webm as video format and when downloading music videos.
  • mp4decrypt: Required when setting mp4box or mp4decrypt as remux mode.
  • aria2c: Required when setting aria2c as download mode.

Installation

  1. Install the package votify using pip:
    pip install votify
    
  2. Set up the cookies file.
    • Move the cookies file to the directory where you'll run Votify and rename it to cookies.txt.
    • Alternatively, specify the path to the cookies file using command-line arguments or the config file.
  3. Set up the .wvd file.
    • Move the .wvd file file to the directory where you'll run Votify and rename it to device.wvd.
    • Alternatively, specify the path to the .wvd file using command-line arguments or the config file.

Usage

Run Votify with the following command:

votify [OPTIONS] URLS...

Supported URL types

  • Song
  • Album
  • Playlist
  • Podcast episode
  • Podcast series
  • Music video
  • Artist

Examples

  • Download a song
    votify "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo"
    
  • Download an album
    votify "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1"
    
  • Download a podcast episode
    votify "https://open.spotify.com/episode/3kwxWnzGH8T6UY2Nq582zx"
    
  • Download a podcast series
    votify "https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk"
    
  • Download a music video
    votify "https://open.spotify.com/track/31k4hgHmrbzorLZMvMWuzq" --download-music-videos
    
  • List and select a related music video to download from a song
    votify "https://open.spotify.com/track/0a0n6u6j3t6m0p4k0t0k0u0" --download-music-videos
    
  • Download a podcast video
    votify "https://open.spotify.com/episode/3kwxWnzGH8T6UY2Nq582zx" --download-podcast-videos
    
  • Choose which albums to download from an artist
    votify "https://open.spotify.com/artist/0gxyHStUsqpMadRV0Di1Qt"
    

Interactive prompt controls

  • Arrow keys: Move selection
  • Space: Toggle selection
  • Ctrl + A: Select all
  • Enter: Confirm selection

Configuration

Votify can be configured using the command-line arguments or the config file.

The config file is created automatically when you run Votify for the first time at ~/.votify/config.json on Linux and %USERPROFILE%\.votify\config.json on Windows.

Config file values can be overridden using command-line arguments.

Command-line argument / Config file key Description Default value
--wait-interval, -w / wait_interval Wait interval between downloads in seconds. 5
--disable-wvd / disable_wvd Disable Widevine decryption false
--download-music-videos / download_music_videos List and select a related music video to download from songs. false
--download-podcast-videos / download_podcast_videos Attempt to download the video version of podcasts. false
--force-premium, -f / force_premium Force to detect the account as premium. false
--read-urls-as-txt, -r / - Interpret URLs as paths to text files containing URLs. false
--config-path / - Path to config file. <home>/.spotify-web-downloader/config.json
--log-level / log_level Log level. INFO
--no-exceptions / no_exceptions Don't print exceptions. false
--cookies-path / cookies_path Path to cookies file. cookies.txt
--output-path, -o / output_path Path to output directory. Spotify
--temp-path / temp_path Path to temporary directory. temp
--wvd-path / wvd_path Path to .wvd file. device.wvd
--aria2c-path / aria2c_path Path to aria2c binary. aria2c
--ffmpeg-path / ffmpeg_path Path to ffmpeg binary. ffmpeg
--mp4box-path / mp4box_path Path to MP4Box binary. mp4box
--mp4decrypt-path / mp4decrypt_path Path to mp4decrypt binary. mp4decrypt
--packager-path / packager_path Path to Shaka Packager binary. packager
--template-folder-album / template_folder_album Template folder for tracks that are part of an album. {album_artist}/{album}
--template-folder-compilation / template_folder_compilation Template folder for tracks that are part of a compilation album. Compilations/{album}
--template-file-single-disc / template_file_single_disc Template file for the tracks that are part of a single-disc album. {track:02d} {title}
--template-file-multi-disc / template_file_multi_disc Template file for the tracks that are part of a multi-disc album. {disc}-{track:02d} {title}
--template-folder-episode / template_folder_episode Template folder for episodes (podcasts). Podcasts/{album}
--template-file-episode / template_file_episode Template file for music videos. {track:02d} {title}
--template-folder-music-video / template_folder_music_video Template folder for music videos {artist}/Unknown Album
--template-file-music-video / template_file_music_video Template file for the tracks that are not part of an album. {title}
--template-file-playlist / template_file_playlist Template file for the M3U8 playlist. Playlists/{playlist_artist}/{playlist_title}
--date-tag-template / date_tag_template Date tag template. %Y-%m-%dT%H:%M:%SZ
--cover-size / cover_size Cover size. extra-large
--save-cover / save_cover Save cover as a separate file. false
--save-playlist / save_playlist Save a M3U8 playlist file when downloading a playlist. false
--overwrite / overwrite Overwrite existing files. false
--exclude-tags / exclude_tags Comma-separated tags to exclude. null
--truncate / truncate Maximum length of the file/folder names. null
--audio-quality, -a / audio_quality Audio quality for songs and podcasts. aac-medium
--download-mode, -d / download_mode Download mode for songs and podcasts. ytdlp
--remux-mode-audio / remux_mode_audio Remux mode for songs and podcasts. ffmpeg
--lrc-only, -l / lrc_only Download only the synced lyrics. false
--no-lrc / no_lrc Don't download the synced lyrics. false
--video-format / video_format Video format. mp4
--remux-mode-video / remux_mode_video Remux mode for videos. ffmpeg
--no-config-file, -n / - Do not use a 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
  • compilation
  • composer
  • copyright
  • cover
  • disc
  • disc_total
  • isrc
  • label
  • lyrics
  • media_type
  • playlist_artist
  • playlist_title
  • playlist_track
  • publisher
  • producer
  • rating
  • release_date
  • release_year
  • title
  • track
  • track_total
  • url

Cover sizes

  • small: up to 64px
  • medium: up to 300px
  • large: up to 640px
  • extra-large: up to 2000px

Audio qualities

  • General codecs:
    • aac-medium: 128kbps
    • aac-high 256kbps, requires an active premium subscription
  • Podcast only codecs:
    • vorbis-high: 320kbps, requires an active premium subscription
    • vorbis-medium: 160kbps
    • vorbis-low: 96kbps

Video formats

  • mp4: H.264 Up to 1080p with AAC 128kbps.
  • webm: VP9 Up to 1080p with Opus 160kbps.
  • ask: Prompt to choose available video and audio codecs.

Download modes

  • ytdlp: Default download mode.
  • aria2c: Faster alternative to ytdlp only applicable to songs and podcasts.

Video remux modes

  • ffmpeg
  • mp4box

Audio remux modes

  • ffmpeg
  • mp4box
  • mp4decrypt

Credits

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

votify-1.5.8.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

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

votify-1.5.8-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file votify-1.5.8.tar.gz.

File metadata

  • Download URL: votify-1.5.8.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.4

File hashes

Hashes for votify-1.5.8.tar.gz
Algorithm Hash digest
SHA256 1a6570cd047dee9a85815d771d6d4ad0cdfe2cbc09394d5f5fe1c134eae35c4f
MD5 1b0ad5042ce4ef95c012e88c60ed3649
BLAKE2b-256 f351d0afb4abf93477f825f3f34bbcb678fdcda401696b1ff891625c4045299c

See more details on using hashes here.

File details

Details for the file votify-1.5.8-py3-none-any.whl.

File metadata

  • Download URL: votify-1.5.8-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.4

File hashes

Hashes for votify-1.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 23de1bd7c58cd1bfd26ad36fcd3e191f7ecf3d6c0b52e261b45c22cc7194c2cb
MD5 3e3ba769f1e30957009c41617c749b85
BLAKE2b-256 10d42e43df1aa8e756e980a8d8e485cc44852613390ad071535b7816c9a5cfc8

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