Initial commit

This commit is contained in:
Lucas
2024-10-30 18:23:00 +01:00
commit a4e264e255
2 changed files with 15 additions and 0 deletions

13
hello.py Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
import spotipy
from spotipy.oauth2 import SpotifyOAuth
scope = "user-library-read"
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="1ad3f973e5924940bec0bcbf1adf7475",client_secret="e0601efe11ee4e31b27b255c06d70a38",redirect_uri="http://127.0.0.1:8888",scope=scope))
results = sp.current_user_saved_tracks()
for idx, item in enumerate(results['items']):
track = item['track']
print(idx, track['artists'][0]['name'], " - ", track['name'])