mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Update simple1.py
Import oath
This commit is contained in:
parent
a677267bca
commit
0c453c9945
@ -1,14 +1,15 @@
|
|||||||
import spotipy
|
import spotipy
|
||||||
|
from spotipy.oauth2 import SpotifyClientCredentials
|
||||||
|
|
||||||
birdy_uri = 'spotify:artist:2WX2uTcsvV5OnS0inACecP'
|
birdy_uri = 'spotify:artist:2WX2uTcsvV5OnS0inACecP'
|
||||||
|
|
||||||
spotify = spotipy.Spotify()
|
client_credentials_manager = SpotifyClientCredentials()
|
||||||
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
||||||
|
|
||||||
results = spotify.artist_albums(birdy_uri, album_type='album')
|
results = sp.artist_albums(birdy_uri, album_type='album')
|
||||||
albums = results['items']
|
albums = results['items']
|
||||||
while results['next']:
|
while results['next']:
|
||||||
results = spotify.next(results)
|
results = sp.next(results)
|
||||||
albums.extend(results['items'])
|
albums.extend(results['items'])
|
||||||
|
|
||||||
for album in albums:
|
for album in albums:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user