From bd1a122831eb0993ab9cdf2d52c5bbc490ad6017 Mon Sep 17 00:00:00 2001 From: "Ryan K. Lee" Date: Mon, 15 Jul 2019 15:41:05 -0700 Subject: [PATCH] Update show_artist.py Import SpotifyClientCredentials from spotipy.oauth2 --- examples/show_artist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/show_artist.py b/examples/show_artist.py index 0180b2a..c0a9834 100644 --- a/examples/show_artist.py +++ b/examples/show_artist.py @@ -1,6 +1,7 @@ # shows artist info for a URN or URL import spotipy +from spotipy.oauth2 import SpotifyClientCredentials import sys import pprint @@ -9,7 +10,8 @@ if len(sys.argv) > 1: else: urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu' -sp = spotipy.Spotify() +client_credentials_manager = SpotifyClientCredentials() +sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager) artist = sp.artist(urn)