Downloading from Spotify

Notes based on https://pastebin.com/K9EuNxG6.

"i'm trying to post a guide to r/piracy (or at least a comment) that goes into detail about how to use spotifykeydumper but the mods really don't like it for some reason"

Note: I tried to share this page at /piracy, making sure I don't mention "SpotifyKeyDumper". Nevertheless, the post got deleted in less than 15 min.

SpotifyKeyDumper from u/templeofhylia
https://www.reddit.com/r/Piracy/comments/kjidtr/spotify_downloader/gh75zc5

"i've edited this comment to hell, but i've got a working copy. i can confirm 0.4.2 still works with spotify 1.1.46 (it says 1.1.47 but is actually .46, the true .47 is available here and should work too)
i also uploaded 0.4.5 which appears to be the latest version at time of takedown but i'm having more trouble with it than i did 0.4.2 tbh"


Downloading songs found in Spotify can be done through three methods:

  1. Downloading from Spotify
  2. Record the stream from Spotify
  3. Workarounds (downloading from other services)

1. Downloading from Spotify

Downloading content that is available only on Spotify is not trivial. SpotifyKeyDumper is currently the only functional tool that actually downloads from Spotify servers. Its development has been long abandoned, but it still works.

1.1. Direct download from Spotify (tested 09/2021)

  1. Install Virtual Box on the host computer (your computer) [https://www.virtualbox.org/manual/ch02.html]. Create a windows virtual machine in Virtual Box with 4 gb RAM and at least ~30 gb disk space.

  2. Download Windows 10 [https://www.microsoft.com/en-us/software-download/windows10] and create an installation media using a USB stick. Use e.g. Balena Etcher. Install Windows on the virtual machine .

  3. Install VisualCppRedistAIOx86_x64.exe in the virtual Windows [https://github.com/abbodi1406/vcredist].

  4. Install Spotify 1.1.46 in the virtual Windows [https://spotify.en.uptodown.com/windows/download/3010801]. This is erroneously labeled as 1.1.47.

  5. Download SpotifyKeyDumper 0.4.2 [https://www.dropbox.com/sh/trrd7o5frskx3lf/AAC7IUU777tH7HR5aDLecohZa?dl=0] to the virtual machine. Extract the contents of "0.4.2" folder in C:\Users[USER]\AppData\Roaming\Spotify.

  6. Run SpotifyKeyDumperInjector.exe with admin privileges (right click, run as administrator). Windows might warn about potential malware as SpotifyKeyDumperInjector.exe is an executable designed to attach itself to other processes. However, this is run in Virtual Box and the source code should be included alongside the .dll and.exe and should be investigated if needed.

  7. A Spotify player will open. Login with a free account. (Using a premium account doesn't work. Also, using some Spotifty recorders has resulted in banning of even paid accounts.)

  8. Play the song you want to download; it will be saved to C:\Users[USER]\AppData\Roaming\Spotify\Downloads as an OGG-VORBIS file of your chosen/available quality tier (160kbps to 320kbps). Check the command line output whether the download succeeded or not. Should the download fail, play another song for awhile and try again. The song files are named "[track] [artist] – [song title]" and they should have correct metadata.

  9. Move the OGG-files to the host computer. You can install Virtual Box guest additions [https://www.virtualbox.org/manual/ch04.html] in order to copy the files via a shared clipboard. Alternatively you can copy the files into a USB stick, unmount the stick in Windows and mount it in the host computer. If you use the installation USB drive, format it first and choose FAT filesystem.

  10. Some music players might not support OGG-files. There are many tools to convert the song files to another format.


2. Record the stream from Spotify

An alternative method is to use an app which records the stream from Spotify, saves the songs as individual files and adds metadata. However, using recording apps (for example Sidify) has resulted in banning of the Spotify accounts - free and premium likewise. Use with precaution. I have not tested any recording method. Spotify recording apps include:

2.1. Downtify (Windows only)

Instructions https://pastebin.com/K9EuNxG6

  1. Download [https://www.dropbox.com/s/dovhtdoand4xyh0/Downtify.rar?dl=0] or compile Downtify [https://github.com/eviabs/downtify-premium] and place it anywhere you like on your Windows machine.
  2. Enter the proper credentials in config.xml, using your username (NOT your email), password, and clientID + clientSecret [from here https://developer.spotify.com/documentation/general/guides/app-settings/#register-your-app]
  3. Open Downtify.exe, copy the song link and enter it so it appears in the large white space, and then highlight it (or several songs) and choose Download; everything will be saved to \Downtify\download as a 320kbps MP3 file.

2.2. Spytify (Windows only)

Records Spotify to mp3 without ads while it plays and includes media tags to the recorded files
Download https://jwallet.github.io/spy-spotify/overview.html

2.3. SpotRec

Python script to record the audio of the Spotify desktop client using FFmpeg and PulseAudio
Download https://github.com/Bleuzen/SpotRec

2.4. Sidify

2.5. Audials


3. Workarounds

There are other methods which download the songs from other services. Some of them are very convenient, but naturally they are unable to find some songs or podcasts which are only on Spotify.

3.1. Download the audio from Deezer

  • deemix https://deemix.app/
    deemix is a barebone deezer downloader library built from the ashes of Deezloader Remix

  • free-mp3-download.net

  • Dl-Spt
    https://notabug.org/dlspt/dl-spt
    Dl-Spt is a CLI app made with NodeJS that downloads Spotify playlists and albums using the dz.loaderapp API

  • CodePlex Spotify Recorder (Windows)

3.1.1. Telegram bots downloading from Deezer**

  • @MusicDownloaderRobot
  • @Deezer_And_Spotify_Bot
  • @MusicsHunterbot
  • @DeezerMusicBot
  • Also in Telegram:

3.2. Download the audio from Youtube


Other apps?

  • TunePat
  • Sidify
  • noteburner Spotify Music Converter
  • Spotfy.one
  • DRmare Music Converter for Spotify

More from vrmvrl
All posts