Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playlist download #25

Open
ramonskie opened this issue May 31, 2018 · 13 comments
Open

playlist download #25

ramonskie opened this issue May 31, 2018 · 13 comments

Comments

@ramonskie
Copy link

i'm using the nice ripper for a long time.
and since the beginning of this week it failed to download the playlists

Logging in...
Logged in as 1131828447
Loading playlist...
Loading playlist...
Logging out...

i tried the export SPOTIPY_CLIENT_ID and secrets etc (creating my own credenials ofcourse.
got the latest spotipy-2.4.4
as the pip install/upgrade only install 2.0.5 for some reason.

but no luck so far. any other ideas?

@ramonskie
Copy link
Author

ramonskie commented May 31, 2018

each track still works.

so for my current workaround is select all the songs im my spotify playlist (in the spotify client)
the right click share>copy spotify uris
past that to a txt file and use that with spotify-ripper

@oglomov
Copy link

oglomov commented Jun 6, 2018

Using the remove from playlist workaround does not seem to work for me.
Also, I have tried copying all URIs in a text file and use this: spotify-ripper --flat-with-index -l list_of_uris.txt
it starts downloading but after the first track it stops with the message below, no idea what that means though, if someone has a clue?

ID3 v2.4: 8 frames
Writing ID3 version v2.4

Exception in thread SpotifyRipperThread:
Traceback (most recent call last):
File "/Users/XXXXXXXXXXX/.pyenv/versions/2.7.10/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/Users/XXXXXXXXXXX/.pyenv/versions/2.7.10/lib/python2.7/site-packages/spotify_ripper/ripper.py", line 366, in run
self.post.remove_tracks_from_playlist()
File "/Users/XXXXXXXXXXX/.pyenv/versions/2.7.10/lib/python2.7/site-packages/spotify_ripper/post_actions.py", line 287, in remove_tracks_from_playlist
remove_all_from_playlist(ripper.session.user.canonical_name, ripper.playlist_uri)
File "/Users/XXXXXXXXXXX/.pyenv/versions/2.7.10/lib/python2.7/site-packages/spotify_ripper/remove_all_from_playlist.py", line 19, in remove_all_from_playlist
tracks = get_playlist_tracks(username, playlistURI)
File "/Users/XXXXXXXXXXX/.pyenv/versions/2.7.10/lib/python2.7/site-packages/spotify_ripper/remove_all_from_playlist.py", line 31, in get_playlist_tracks
p1, p2, p3, p4, rPlaylistID = playlistURI.split(':', 5)
AttributeError: 'NoneType' object has no attribute 'split'

@ramonskie
Copy link
Author

try using python 3.6.x

@oglomov
Copy link

oglomov commented Jun 7, 2018

Thanks, tried with 3.6.1 still no luck :(
On the other hand, I realized that I was skipping the "export" commands, so it seems that the remove from playlists actually works.

@tom-schaek
Copy link

i had the exact same problem where playlists wouldn't download and fixed it by doing:
$ pip install --upgrade git+https://github.com/SolidHal/spotify-ripper
After that i made a new app and keys here https://developer.spotify.com/dashboard/applications and added them.

@tuxruffian
Copy link

I also had the same problem. I tried all of the sugestions above with no luck, but found I was able to resolve the issue by using a variant of tom-schaek's solution. Instead of using install --upgrade (which didn't work for me), I used install --force-reinstall.

Full command:

pip install --force-reinstall git+https://github.com/SolidHal/spotify-ripper

Apparently re-installing each of the dependencies did the trick. I suspect it was either mutagen and/or the schedule python module(s).

@ramonskie
Copy link
Author

unfortunately non of the reinstall options worked for me

@dstyp
Copy link

dstyp commented Jul 10, 2018

Seems to work for me but related question - how get redirect uri when running spotify-ripper on a headless remote server? :)

@elkenj
Copy link

elkenj commented Aug 7, 2018

@oglomov an exception is thrown because the script treats every URI it encounters as a playlist and tries to extract info from the URI that is not present.

As a workaround to the workaround, you can edit "/Users/XXXXXXXXXXX/.pyenv/versions/2.7.10/lib/python2.7/site-packages/spotify_ripper/remove_all_from_playlist.py" and change the remove_all_from_playlist function to:

def remove_all_from_playlist(username, playlistURI):
    pass

Frankly, I don't see why the ripper should empty any playlists anyway.

@cukabeka
Copy link

Well, same here. I use this on a mac and reinstalled. Now i get this message

You need to set your credentials. You can do this by
            setting environment variables like so:

            export SPOTIPY_CLIENT_ID='your-spotify-client-id'
            export SPOTIPY_CLIENT_SECRET='your-spotify-client-secret'
            export SPOTIPY_REDIRECT_URI='your-app-redirect-url'

2 issues here

  • Unknown command 'export' - when I enter "export" in bash, the command is unknown
  • What is SPOTIPY_REDIRECT_URI ?

I found in the Dashboard

Redirect URIs
https://example.com/callback/
White-listed addresses to redirect to after authentication success OR failure (e.g. http://mysite.com/callback/)

But I have no idea what to insert in the export command or in the dashboard (once the export command works ;) )

@ramonskie
Copy link
Author

ramonskie commented Jan 18, 2019

this project is dead so i suggest use the work arround i provided
#25 (comment)
or use this updated fork https://github.com/wolfmanx/spotify-ripper/tree/pr-collect

@cukabeka
Copy link

cukabeka commented Jan 18, 2019

def remove_all_from_playlist(username, playlistURI):
    pass

But the actual path was
/usr/local/lib/python3.7/site-packages/spotify_ripper/remove_all_from_playlist.py
I could not find that here in the thread before.

This helped me indeed. Thanks. So is the wolfmanx fork the most updated and working version of the spotify-ripper?
Actually, it could be possible to integrate the "Create text file from all URIs in Playlist" step into the script, too, right?

@pualien
Copy link

pualien commented Feb 11, 2019

take a look at this simple gist in python to easily recover a file full of spotify uris from playlist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants