May-31-2020, 07:56 PM
(May-31-2020, 05:24 PM)Benji1995 Wrote: Hey DreamingInsanity, thank you for your reply!Technically it's against the rules but you know, I was bored so I did:
I checked the attached link, but as I said before, I'm a complete noob with Python and Spotify API, i just know what they are but I can't use them.
I tried searching on the internet, but I think this is a rather specific situation so there is nothing on YouTube..
Do you think it is possible to code something similar to what I requested?
CLIENT_ID = "" CLIENT_SECRET = "" PLAYLIST_ID = "" USERNAME = "" PLAYLIST_NAME = "" import spotipy import spotipy.util as util token = util.prompt_for_user_token(USERNAME, "playlist-modify-public", CLIENT_ID, CLIENT_SECRET, "https://example.com/callback") sp = spotipy.Spotify(auth=token) playlists = sp.user_playlist_change_details(USERNAME, playlist_id=PLAYLIST_ID, name=PLAYLIST_NAME, public=True)Firstly, you need to run:
pip install spotipy
Then, go to: https://developer.spotify.com/dashboard/ and sign in. Click on 'create a new app' and follow the steps. Once you are done, copy the client id into 'CLIENT_ID' and the client secret into 'CLIENT SECRET' (don't share these with anyone)
Next, open spotify, right click your playlist, go to 'share' and then 'copy spotify URI'. Delete everything that is 'spotify:playlist:'. Take what's left and put it in 'PLAYLIST_ID',
Fill out 'USERNAME' with your spotify username.
'PLAYLIST_NAME' is what you want you playlist to be named.
Now run the script. It should open your browser and ask you for a url. Click the button to authorise the app. Once you have been redirected, copy the url and paste it into where it wants you to. Once you have done this it should have renamed your playlist.
It's a bit long to have it open up your browser but it doesn't seem like there's much I can do about it.