mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
18 lines
493 B
Python
18 lines
493 B
Python
|
|
import spotipy
|
|
from spotipy.oauth2 import SpotifyClientCredentials
|
|
|
|
|
|
lz_uri = 'spotify:artist:36QJpDe2go2KgaRleHCDTp'
|
|
|
|
client_credentials_manager = SpotifyClientCredentials()
|
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
|
|
|
results = sp.artist_top_tracks(lz_uri)
|
|
|
|
for track in results['tracks'][:10]:
|
|
print('track : ' + track['name'])
|
|
print('audio : ' + track['preview_url'])
|
|
print('cover art: ' + track['album']['images'][0]['url'])
|
|
print()
|