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
Is it possible to create a playlist of every song an artist ID has and appears on (including appears on section)? #702
Comments
I've done something like this, assuming authentication is in place:
|
thanks very much, I don't know what to make of the code but I'm glad I have it and I have saved it, and it's possible. I will try and learn it on my own, worst case I pay somebody on freelancer who understands python and spotipy My guy who has helped me before just quit working there, don't want to bug him again, but somebody else could figure it out what I have to put in and where. I have several python scripts that use authorization and spotipy and work well so I think that's good. |
well I looked at it, sorry for not understanding a thing about python but where do you put the artist ID to run the script and generate the playlist?. I assume I have to add the credentials and the redirect and that on top of the script like is required for spotipy and like is on all my other scripts, but on those scripts there would always be somewhere he would tell me to insert information. if you could explain I would appreciate, if not , it's cool, I appreciate you even sharing. |
You must define a variable called |
would this work?
|
@greeneryAO why don't you just run it to know if it would work? it's not that hard, just google how to run a python script and start from there |
I know how to run them, just not to fix them, tried it, error message was Traceback (most recent call last): |
If I change it around, either the token is not defined, or the session is not defined, or the scope is note defined, must have did something wrong. |
Yeah Since you don't need to add songs to any user playlist, you won't need user authentication, which will be easy for you. My suggestion is you follow these steps:
Good luck, and remember to always start from something that works |
thanks, I'll give it a try, what about this code, I found it just in the newest changes to spotipy, maybe it's the same thing. artist_discography.py
I ran it and it said it succeeded but nothing happened |
https://github.com/plamere/spotipy/blob/master/examples/artist_discography.py You skipped the |
ran it by itself and error was spotipy.oauth2.SpotifyOauthError: No client_id. Pass it or set a SPOTIPY_CLIENT_ID environment variable. ran it with credentials and same error?
|
No you didn't pass the credentials. See the difference between your code:
and the code in the README:
|
is in the example, I'll try to make the credentials like the readme |
Tried a bunch of things, putting in my app credentials authorized or not, wouldn't work, same errors. spotipy.oauth2.SpotifyOauthError: No client_id. Pass it or set a SPOTIPY_CLIENT_ID environment variable. I know I seem like a dolt to people who know python but not going to start learning python and spotipy for this last script I need for my spotify setup, I guess I'll take both scripts to market and get the dummy version handed to me and see if either can do what I imagined. thanks anyway. |
Several apps that claim to do this, like for example alfred spotify mini player that says creates complete collection misses many songs, mostly the appears on sections, which it cannot penetrate, but that is where artists frequently appear on remixes etc.
searching in spotify and sorting by songs is messy too, and often includes junk and songs not by that artist as it runs out of songs by the artist.
Is there a way to run a script that will return a list of all songs if I put in the artist name (ID?), regardless of dupes, just a total list, this would be helpful for grass cutting for updates every few weeks or so, as the big apps that update new releases are annoying and sporadic. I want to do it when I want to do it.
Would it be easy or hard, as you can probably tell I'm not a coder but have some money left on freelancer I'd rather spend than try to claw back.
I think this is the relevant section.
playlist_add_items(playlist_id, items, position=None)
Adds tracks/episodes to a playlist
Parameters:
playlist_id - the id of the playlist
items - a list of track/episode URIs, URLs or IDs
position - the position to add the tracks
thanks.
The text was updated successfully, but these errors were encountered: