hbashton / spotify-ripper

https://github.com/jrnewell/spotify-ripper has been revived
MIT License
494 stars 99 forks source link

Where to get the app key? #55

Open billyschmidt opened 5 years ago

billyschmidt commented 5 years ago

The link is dead not sure where to get spotify_appkey.key from anymore?

ghost commented 5 years ago

Let me know if there's any issue with this link. https://github.com/richardk80/spotify-appkey/raw/master/spotify_appkey.key

Avinguda21 commented 4 years ago

What format is this? Can't be read!

ghost commented 4 years ago

@Avinguda21 There's nothing wrong with that file. It's probably your .spotify-ripper folder. You have to fix your folder permissions when you first install spotify-ripper. What you could do is just delete the .spotify-ripper folder, and create a new one, then put your config.ini and this spotify_appkey.key file in it.

Avinguda21 commented 4 years ago

Thanks. Before I go any further ... does this install work? My first issue following the ubuntu install instructions is that libspotify doesn't download.

ghost commented 4 years ago

@Avinguda21 Let me know if you have an issue downloading this. https://github.com/richardk80/libspotify/raw/master/libspotify-12.1.51-Linux-x86_64-release.tar.gz

Avinguda21 commented 4 years ago

Thanks again. I'll try it. But already problem 2! I tried to set up pyenv (using the auto-installer). It seemed to install okay, but ended by saying some lines had to be added to .bashrc. I can't find that file anywhere. (even with show hidden files turned on).

ghost commented 4 years ago

@Avinguda21 Don't worry about using pyenv. Just follow these directions: sudo apt-get install lame build-essential libffi-dev git python-dev python-setuptools tar xvf libspotify-12.1.51-Linux-x86_64-release.tar.gz cd libspotify-12.1.51-Linux-x86_64-release/ sudo make install prefix=/usr/local git clone https://github.com/hbashton/spotify-ripper.git && cd spotify-ripper && sudo python setup.py install

Avinguda21 commented 4 years ago

ok! I'll give it a try later today. But what about the other prerequisites? Thanks

ghost commented 4 years ago

@Avinguda21 If you're just gonna be making mp3 files with this, you should be set. That's why you installed lame. If you're gonna be making any other files like m4a or flac, then it will let you know if you need to install those codecs. Just follow the instructions I gave you and you'll be good.

Avinguda21 commented 4 years ago

okay so no need for pyspotify ?

Avinguda21 commented 4 years ago

Okay. Got this far:

brian@brian-mint:~/libspotify-12.1.51-Linux-x86_64-release$ git clone https://github.com/hbashton/spotify-ripper.git && cd spotify-ripper && sudo python setup.py Cloning into 'spotify-ripper'... remote: Enumerating objects: 1883, done. remote: Total 1883 (delta 0), reused 0 (delta 0), pack-reused 1883 Receiving objects: 100% (1883/1883), 459.75 KiB | 785.00 KiB/s, done. Resolving deltas: 100% (1300/1300), done. usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: no commands supplied brian@brian-mint:~/libspotify-12.1.51-Linux-x86_64-release/spotify-ripper$ install install: missing file operand Try 'install --help' for more information.

So what now?

ghost commented 4 years ago

@Avinguda21 Try this: git clone https://github.com/hbashton/spotify-ripper.git && cd spotify-ripper && sudo python setup.py install. I left out the install part at the end. My bad.

ghost commented 4 years ago

Pyspotify will be installed for you when you run the commands above^

Avinguda21 commented 4 years ago

Worked!

Now back to earlier message about the location of the spotify key ...

and read up about the config file

will report back. thanks for all the help

ghost commented 4 years ago

The spotify_appkey.key file goes into the .spotify-ripper folder. Where your config.ini file is located.

ghost commented 4 years ago

You can do this if you want: sudo chmod -R 777 .spotify-ripper This will fix the permissions for the .spotify-ripper folder.

Avinguda21 commented 4 years ago

Okay. So now some even dumber questions! I just want to dload MP3 files from one album saved in My Library.

So what command do I use? How do I specify my spotify login in the command? I assume I use the spotify Shared URL to access the album? Do I just use the example config file ? Where are the files saved?

ghost commented 4 years ago

Open up your .spotify-ripper folder and find the default_config.ini file and rename is to config.ini.

Then clear out everything in that file. Like erase everything in there, then put this in there:

[main] user = your spotify username password = your spotify password ascii = True format = {album_artist}/{year} {album}/Disc 0{disc_idx}/0{track_idx} {track_name}.{ext} directory = /home/your ubuntu username/Music/ quality = 320 bitrate = 320 grouping = {label} normalize = True cbr = True mp3 = True last = False partial_check = strict

Only change the areas that I listed as "Your whatever".

Do you have Spotify installed on Ubuntu? If you don't, I recommend that you install it now. Once you have it installed, what you do is open Spotify, and then find that album, and then right click on the album name, and you should see a dropdown of sorts. Look for Share, then look for Copy Spotify URI. Then you go into terminal and add this for example: spotify-ripper spotify:album:754RY5WpZ2LTUZsk8kDBju

Don't use the Spotify Player on play.spotify.com to get your URI. Use the native Spotify app that you install on your computer.

ghost commented 4 years ago

Replace the URI I listed in the example with whatever URI you get from the Spotify app. You can also get a URI for an individual track, and if you want to download a playlist, you will have to create a text file like for example: songs.txt, and then put the URIs for each song in your playlist in that text file, then use this command to make it download your songs for example: spotify-ripper songs.txt

Avinguda21 commented 4 years ago

Thanks. Just a point - the .spotify ripper folder was empty. So I added the key file. I guess I just create the config file using your example. Understood about the spotify program url.

So, what actual command do I use to start the process? Is it just:

spotify-ripper spotify:album:754RY5WpZ2LTUZsk8kDBju (changing the url, of course)

It's late here now - so I'll leave this for tomorrow. thanks again.

ghost commented 4 years ago

The commands you use are like this for example: Album: spotify-ripper spotify:album:754RY5WpZ2LTUZsk8kDBju Track: spotify-ripper spotify:track:56fiFTRrSiHHH3gBeaTg2P Artist: spotify-ripper spotify:artist:05fG473iIaoy82BF1aGhL8 Playlist: Use the example I gave above, and use command spotify-ripper example.txt

Avinguda21 commented 4 years ago

Looks like success! Just dloaded 2 files. I'll try them in a player tomorrow.

Can I reduce the mp3 to a lower bitrate in the config file?

ghost commented 4 years ago

Yeah. Change "quality = 320" to "quality = 160".

Avinguda21 commented 4 years ago

Great.

Thanks for all the help.

ghost commented 4 years ago

@koehlerson You have to create a text file that has all your Spotify URIs in it, and then type in “spotify-ripper example.txt”

ghost commented 4 years ago

Yeah you can do that. I never cared to try and figure out how to fix the issue with playlists because I hardly ever download them. Sorry not sorry I guess.

DevNull-00 commented 4 years ago

The link for the spotify_appkey doesn't work anymore, where can I find one?

JanGross commented 4 years ago

@ItzLuk3 try the ones from these repos: https://github.com/search?q=spotify-appkey