diff --git a/examples/player.py b/examples/player.py index 97945f1..7ca38dd 100644 --- a/examples/player.py +++ b/examples/player.py @@ -3,7 +3,8 @@ from spotipy.oauth2 import SpotifyOAuth from pprint import pprint from time import sleep -sp = spotipy.Spotify(client_credentials_manager=SpotifyOAuth(scope="user-read-playback-state,user-modify-playback-state")) +scope = "user-read-playback-state,user-modify-playback-state" +sp = spotipy.Spotify(client_credentials_manager=SpotifyOAuth(scope=scope)) # Shows playing devices res = sp.devices() diff --git a/examples/simple4.py b/examples/simple4.py index c8761c7..b01759b 100644 --- a/examples/simple4.py +++ b/examples/simple4.py @@ -1,7 +1,7 @@ import spotipy -import os from pprint import pprint + def main(): spotify = spotipy.Spotify(auth_manager=spotipy.SpotifyOAuth()) me = spotify.me()