mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
* Add python_requires to help pip * Update supported versions in tox.ini * Upgrade Python syntax with pyupgrade --py37-plus * Bump GitHub Actions * Add Python 3.11 and 3.12 to CI * Remove six dependency * Remove redundant dependencies * Remove redudant Python 3.5 code * Drop support for EOL Python 3.7 * Upgrade Python syntax with pyupgrade --py38-plus * Update CHANGELOG * More f-strings --------- Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
17 lines
475 B
Python
17 lines
475 B
Python
from spotipy.oauth2 import SpotifyClientCredentials
|
|
import spotipy
|
|
|
|
birdy_uri = 'spotify:artist:2WX2uTcsvV5OnS0inACecP'
|
|
|
|
client_credentials_manager = SpotifyClientCredentials()
|
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
|
|
|
results = sp.artist_albums(birdy_uri, album_type='album')
|
|
albums = results['items']
|
|
while results['next']:
|
|
results = sp.next(results)
|
|
albums.extend(results['items'])
|
|
|
|
for album in albums:
|
|
print(album['name'])
|