Questions tagged [spotipy]

Spotipy is a lightweight Python library for the Spotify Web API. With Spotipy you get full access to all of the music data provided by the Spotify platform.

474 questions
2
votes
1 answer

Player command failed: Premium required. However i have premium

Im am using a family account (premium) and this code returns a'Premium required' error. My code is as follows: device_id = '0d1841b0976bae2a3a310dd74c0f3df354899bc8' def playSpotify(): client_credentials_manager =…
Zotec
  • 51
  • 5
2
votes
0 answers

Find Spotify track ID if I know the track name and artist name

So I have a really large list of spotify songs (almost 50.000 rows). Each row contains a spotify song, specified by the name of the song and name of the artist. I need to print the track id's for each song in the previous file. I tried doing this…
Sergi Funk
  • 21
  • 2
2
votes
1 answer

Spotify method artist_albums() does not return all albums of an artist

from the Spotipy example script artist_albums.py I used the following code snippet to get all albums from an artist. But I noticed that artist_albums() does not return all albums of the artist. I already experimented with the album_type and limit…
flotux
  • 53
  • 1
  • 4
2
votes
1 answer

Get user ID - WebAPI Spotify (Spotipy)

my question is possible get a user id in any way? I would search a user from his name and print his recently artist played Thanks
2
votes
1 answer

Can't skip to next song on Spotify API (via Spotipy)

I'm implementing a simple application with spotipy. I want to skip the next track, but I've got this error in output: spotipy.client.SpotifyException: http status: 403, code:-1 - https://api.spotify.com/v1/me/player/next: Not available for the…
2
votes
1 answer

How to retrieve all album objects on Spotify?

Looking at the Spotify API and spotipy, I am able to pull album information as long as I have the album ID or a list of album IDs, but how can I pull all album objects on Spotify in an efficient manner? I think this would require knowing all album…
Bryant Wu
  • 21
  • 1
2
votes
1 answer

Spotify authorization code - get token [ console application ]

I'm writing a console application to create a playlist on Spotify according to a list of song. I'm using Spotipy and I'm trying with util.prompt_for_user_token(), the problem is that after I grant access I have to manually paste the redirect link…
Alessandro Gaballo
  • 708
  • 3
  • 13
  • 28
2
votes
2 answers

Gaining authorization to modify Spotify playlists using spotipy for Python3

I'm currently attempting to use spotipy, a python3 module, to access and edit my personal Spotify premium account. I've followed the tutorial on https://github.com/plamere/spotipy/blob/master/docs/index.rst using the util.prompt_for_user_token…
Matt Cole
  • 21
  • 6
2
votes
1 answer

How to retrieve a listening history object by spotipy?

I'm working at a recommendation system for Spotify and I'm using spotipy on Python. I can't use the function current_user_recently_played, because Python says that the attribute current_user_recently_played isn't valid. I don't know how to solve…
Jessica Martini
  • 253
  • 2
  • 3
  • 11
2
votes
1 answer

Spotipy/Spotify - How to put a spotipy script on a server?

I am doing a Spotipy script that I want to automize and put it on a server. By "automize" I mean that for the authentification I don't want to have to copy/paste the open URL (I'm using Authorization Code Flow), is it possible? Or maybe there is a…
mina
  • 319
  • 2
  • 8
2
votes
2 answers

AttributeError: 'Spotify' object has no attribute 'current_user_saved_tracks'

Using Spotipy and am attempting to 'current_user_recently_played' token = util.prompt_for_user_token(username, scope = scope, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri) sp = spotipy.Spotify(auth = token) saved =…
2
votes
2 answers

Spotipy: simple code from readthedocs got exception

When I run this simple code from Spotify's Docs: import spotipy birdy_uri = 'spotify:artist:2WX2uTcsvV5OnS0inACecP' spotify = spotipy.Spotify() results = spotify.artist_albums(birdy_uri, album_type='album') albums = results['items'] while…
zsdh
  • 126
  • 1
  • 7
2
votes
1 answer

Read list of artists, Add top songs to playlist using Spotipy

I am wanting to write a python program that reads a list of artists and creates a playlist with the top three songs from each artist. Is there a way to do this directly from the artist's name or would I have to create a list of artist IDs? If that…
2
votes
1 answer

Spotipy authentication not returning token?

All right folks, I've read all the documentation I can find on spotipy's authentication methods, and I put together a little piece of code to test it out, but I can't get it to work. Basically what happens is I run the application, it gives me a…
2
votes
1 answer

Spotipy - track names and energy values

def lowEnergy(): tids = [] # get songs by recommendation results = sp.recommendations(seed_artists = [artist['id']]) #retrieve uris for songs for track in results['tracks']: tids.append(track['uri']) #get…
8-Bit Borges
  • 9,643
  • 29
  • 101
  • 198