Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Created August 8, 2019 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiolucero/f4a5629b512bfe9c66c777f3000bf821 to your computer and use it in GitHub Desktop.
Save sergiolucero/f4a5629b512bfe9c66c777f3000bf821 to your computer and use it in GitHub Desktop.
my spotify playlists
import spotipy
import spotipy.util as util
from creds import CLIENT_ID, CLIENT_SECRET
token = util.prompt_for_user_token(username = 'sergiolucero', scope='',
client_id=CLIENT_ID,
client_secret=CLIENT_SECRET,
redirect_uri='http://quant.cl/what'
)
sp = spotipy.Spotify(auth=token)
sp.trace = False
results = sp.current_user_playlists(limit=50)
for i, item in enumerate(results['items'][:5]):
print("%d %s" %(i, item['name']))
@sergiolucero
Copy link
Author

sergiolucero commented Aug 8, 2019

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment