[GH-ISSUE #274] Unable to get all singles for artist #211

Closed
opened 2026-02-27 22:08:37 +03:00 by kerem · 1 comment
Owner

Originally created by @fabi321 on GitHub (May 28, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/274

I am unable to get all singles for an artist. I only get the first few, and the call to get_artist_albums fails.

from ytmusicapi import YTMusic
yt = YTMusic()
artist = yt.get_artist('UCNms80n59AltHVQuPgGrKkg')
len(artist['singles']['results']) # -> 10
singles = yt.get_artist_albums(artist['channelId'], artist['singles']['params'])
type(singles) # -> <class 'NoneType'>
Originally created by @fabi321 on GitHub (May 28, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/274 I am unable to get all singles for an artist. I only get the first few, and the call to `get_artist_albums` fails. ```python from ytmusicapi import YTMusic yt = YTMusic() artist = yt.get_artist('UCNms80n59AltHVQuPgGrKkg') len(artist['singles']['results']) # -> 10 singles = yt.get_artist_albums(artist['channelId'], artist['singles']['params']) type(singles) # -> <class 'NoneType'> ```
kerem closed this issue 2026-02-27 22:08:38 +03:00
Author
Owner

@sigma67 commented on GitHub (May 28, 2022):

Works flawlessly for me. It's normal that get_artist only returns the first few. You need to fix your call to get_artist_albums:

yt.get_artist_albums(artist['singles']['browseId'], artist['singles']['params'])

See tests here: github.com/sigma67/ytmusicapi@7e5697596c/tests/test.py (L108-L111)

<!-- gh-comment-id:1140246383 --> @sigma67 commented on GitHub (May 28, 2022): Works flawlessly for me. It's normal that `get_artist` only returns the first few. You need to fix your call to `get_artist_albums`: ```python yt.get_artist_albums(artist['singles']['browseId'], artist['singles']['params']) ``` See tests here: https://github.com/sigma67/ytmusicapi/blob/7e5697596ce54ce229b245e685252f92081481d8/tests/test.py#L108-L111
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#211
No description provided.