from the Spotipy example script artist_albums.py I used the following code snippet to get all albums from an artist. But I noticed that artist_albums() does not return all albums of the artist.
I already experimented with the album_type and limit parameters. But that doesn't help.
albums = []
results = sp.artist_albums(artist['id'], album_type='album')
albums.extend(results['items'])
while results['next']:
results = sp.next(results)
albums.extend(results['items'])
albums.sort(key=lambda album:album['name'].lower())
for album in albums:
name = album['name']
print((' ' + name))
In my case there are over 60 albums available inside the Spotify app but in my Python script artis_album() return only 41 albums