There was actually a project on github that claimed to allow downloading of Spotify straight from the source with drm bypassing called XSpotify but it was taken down by spotify before i got to try it: https://github.com/meik97/XSpotify
However it was archived on the wayback machine: https://web.archive.org/web/20200303145624/https://github.com/meik97/XSpotify
Obviously take this with a grain of salt, you should probably read the source code before attempting to run it
There was actually a project on github that claimed to allow downloading of Spotify straight from the source with drm bypassing called XSpotify but it was taken down by spotify before i got to try it: https://github.com/meik97/XSpotify
However it was archived on the wayback machine: https://web.archive.org/web/20200303145624/https://github.com/meik97/XSpotify
Obviously take this with a grain of salt, you should probably read the source code before attempting to run it