I’m trying to get a single recommended track when passing in a genre to the recommendations() function in the Spotipy library. This is my code: recommendations = sp.recommendations(seed_genres=[‘pop’], limit=1) I get back a dictionary that seemingly has multiple artists, if anyone has tips on how to extract data from a dictionary like this, please let me know as I am
Tag: spotipy
Get Spotify access token with spotipy on Django and Python
I’m new to Django and I’m trying to link Spotify to my webapp. I’m using Spotify to do it and it correctly access to Spotify. To do it I have a button that opens the view below views.py If I don’t use auth_token = sp_auth.get_access_token() everything works fine and I got redirected to the correct. Unfortunately, if I add that
Spotipy. Can`t pass the second part of oAuth (Python)
I want to create an app which will add some sorts of songs to the Spotify playlist. So it`s might be a good idea to use Spotipy (Python Library) to solve it. To add song to the playlist I need to know its URI. To know its URI I should use method called search (https://spotipy.readthedocs.io/en/2.19.0/#spotipy.client.Spotify.search). It requires some inputs and
Is there a way to get a list of playlists containing a particular song in Spotipy (Spotify Python Api)
I want to create a recommendation system of sorts, and I’m trying to find playlists with a given song in them to see what other songs people listen alongside that. Is there a way to do that using the Spotify API in Python? Answer Nope, there isn’t. You could however use the endpoint https://api.spotify.com/v1/recommendationsto get related songs to a song.
How to Solve: Insufficient client scope in Python using Spotipy
When I try to run cretin modules in Spotipy I get an Insufficient client scope error message. Spotify gives a 403 client error saying “No Token Provided” Tried multiple modules only a few work such as the current_user() module but others spit back the Insufficient client scope error. Tried multiple modules only a few work such as the current_user() module