Initial commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.venv
|
||||
.cache
|
||||
13
hello.py
Executable file
13
hello.py
Executable 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'])
|
||||
Reference in New Issue
Block a user