diff --git a/examples/show_track_info.py b/examples/show_track_info.py index b286c0d..def5a9a 100644 --- a/examples/show_track_info.py +++ b/examples/show_track_info.py @@ -1,6 +1,7 @@ # shows track info for a URN or URL import spotipy +from spotipy.oauth2 import SpotifyClientCredentials import sys import pprint @@ -9,6 +10,7 @@ if len(sys.argv) > 1: else: urn = 'spotify:track:0Svkvt5I79wficMFgaqEQJ' -sp = spotipy.Spotify() +client_credentials_manager = SpotifyClientCredentials() +sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager) track = sp.track(urn) pprint.pprint(track)