mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-14 19:17:27 +00:00
14 lines
428 B
Python
14 lines
428 B
Python
from spotipy.oauth2 import SpotifyClientCredentials
|
|
import spotipy
|
|
import json
|
|
|
|
client_credentials_manager = SpotifyClientCredentials()
|
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
|
|
|
uri = 'spotify:user:spotifycharts:playlist:37i9dQZEVXbJiZcmkrIHGU'
|
|
username = uri.split(':')[2]
|
|
playlist_id = uri.split(':')[4]
|
|
|
|
results = sp.user_playlist(username, playlist_id)
|
|
print json.dumps(results, indent=4)
|