From 5a007586092a23ad3f5370b50ae3cb82072c65b5 Mon Sep 17 00:00:00 2001 From: "Ryan K. Lee" Date: Mon, 15 Jul 2019 15:38:18 -0700 Subject: [PATCH] Update show_track_info.py Import SpotifyClientCredentials from spotipy.oauth2 --- examples/show_track_info.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)