spotipy

Spotipy Current Track Data – Getting current track ID

Spotipy Current Track Data – Getting current track ID Question: I don’t see a whole lot of info on current_user_playing_track() for Spotipy so hoping someone will be able to help me on this. import spotipy import spotipy.util as util from spotipy.oauth2 import SpotifyClientCredentials from spotipy.oauth2 import SpotifyOAuth import json import requests cid = ‘my client …

Total answers: 2

Spotipy (sp.track() specifically) takes too long to run

Spotipy (sp.track() specifically) takes too long to run Question: I am trying to extract the release data, explicit flag and popularity score of approximately 18,000 songs. I want to append these results to my data frame Initially, I tried this. – for i,track in enumerate(df[‘uri’]): release_dates.append(sp.track(track)[‘album’][‘release_date’]) But I took too long to run, so I …

Total answers: 1

Is there a library for parsing through JSON data using Spotipy?

Is there a library for parsing through JSON data using Spotipy? Question: I’ve been using Spotipy as my first intermediate project, and when I grab data from my account, it gives me a bunch of data in JSON format. It’s possible I’m just doing it all wrong, but from what I see, it’s really difficult …

Total answers: 2

Spotipy – 401 token error "no token proviced" with .search function

Spotipy – 401 token error "no token proviced" with .search function Question: I have a list of dictionaries that contain album information which I’m trying to use to search within Spotify and then add to users’ saved albums. I tried following the examples given in the spotipy documentation, however, I’m getting an issue when using …

Total answers: 1

Spotipy 401 / 405 No token provided

Spotipy 401 / 405 No token provided Question: I have been working on a Spotify / Spotipy application which will add the current song to a certain playlist. My functions for getting the current song and showing a playlist are all doing fine. My function for adding a song to a playlist is not. I …

Total answers: 1

Spotipy Refreshing a token with authorization code flow

Spotipy Refreshing a token with authorization code flow Question: I have a long-running script using spotipy. After an hour (per the Spotify API), my access token expires. I am catching this successfully, but I don’t know where to go from there in regards to actually refreshing the token. I am using the authorization code flow, …

Total answers: 2