[GH-ISSUE #460] get_artist audiobooks and shows support #340

Closed
opened 2026-02-27 23:00:17 +03:00 by kerem · 6 comments
Owner

Originally created by @H3adsho0ot on GitHub (Oct 19, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/460

If i browse an artist having audiobooks those are not shown in the result. I thik they should be shown as albums.

Steps to reproduce the behavior:
(https://music.youtube.com/browse/MPADUCf2vTMnvFb8BsWTWauTZrow) <- example

If I execute yt.get_artist('UCyiY-0Af0O6emoI3YvCEDaA') I get two singles but no albums or playlist or anything else.

Thanks in advance
Niklas

Originally created by @H3adsho0ot on GitHub (Oct 19, 2023). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/460 If i browse an artist having audiobooks those are not shown in the result. I thik they should be shown as albums. Steps to reproduce the behavior: (https://music.youtube.com/browse/MPADUCf2vTMnvFb8BsWTWauTZrow) <- example If I execute yt.get_artist('UCyiY-0Af0O6emoI3YvCEDaA') I get two singles but no albums or playlist or anything else. Thanks in advance Niklas
Author
Owner

@sigma67 commented on GitHub (Oct 19, 2023):

Sorta related to #415 , need to update some functions to keep up with the content expansion in YTMusic

<!-- gh-comment-id:1770577018 --> @sigma67 commented on GitHub (Oct 19, 2023): Sorta related to #415 , need to update some functions to keep up with the content expansion in YTMusic
Author
Owner

@H3adsho0ot commented on GitHub (Oct 19, 2023):

I modified the arrays in parse_artist_contents like this:

categories = ['albums', 'singles', 'videos', 'playlists', 'related', audiobooks and shows']
categories_local = [_('albums'), _('singles'), _('videos'), ('playlists'), ('related'), _('audiobooks and shows')]
categories_parser = [parse_album, parse_single, parse_video,  arse_playlist, parse_related_artist, parse_playlist ]

Result looks good to me

<!-- gh-comment-id:1770856318 --> @H3adsho0ot commented on GitHub (Oct 19, 2023): I modified the arrays in parse_artist_contents like this: ``` categories = ['albums', 'singles', 'videos', 'playlists', 'related', audiobooks and shows'] categories_local = [_('albums'), _('singles'), _('videos'), ('playlists'), ('related'), _('audiobooks and shows')] categories_parser = [parse_album, parse_single, parse_video, arse_playlist, parse_related_artist, parse_playlist ] ``` Result looks good to me
Author
Owner

@sigma67 commented on GitHub (Oct 19, 2023):

That works for English only but needs to be localized to all supported languages

<!-- gh-comment-id:1771048023 --> @sigma67 commented on GitHub (Oct 19, 2023): That works for English only but needs to be localized to all supported languages
Author
Owner

@sigma67 commented on GitHub (Nov 11, 2023):

Should support two new categories for the artists page:

https://music.youtube.com/channel/UCf2vTMnvFb8BsWTWauTZrow

  • Shows and audiobooks - localized
  • Details page: new function get_artist_shows - this one's a bit strange still, the chip filter still shows "Albums" which are not shown when navigating there from "more" on the shows section. But when clicking on it both Albums and Shows appear. Seems they forgot a separate chip for Shows

https://music.youtube.com/channel/UCKPSmMfDsXTKrCZApukcJ7A

  • Latest episodes - localized
  • Details page: new function get_artist_episodes
<!-- gh-comment-id:1806858037 --> @sigma67 commented on GitHub (Nov 11, 2023): Should support two new categories for the artists page: https://music.youtube.com/channel/UCf2vTMnvFb8BsWTWauTZrow - Shows and audiobooks - localized - Details page: new function `get_artist_shows` - this one's a bit strange still, the chip filter still shows "Albums" which are not shown when navigating there from "more" on the shows section. But when clicking on it both Albums and Shows appear. Seems they forgot a separate chip for Shows https://music.youtube.com/channel/UCKPSmMfDsXTKrCZApukcJ7A - Latest episodes - localized - Details page: new function `get_artist_episodes`
Author
Owner

@MarkhorDev commented on GitHub (Jan 7, 2024):

Recently commented on another issue but was pointed here. When calling 'get_artist' for an artist with podcasts on their page, a KeyError is raised. For example, the first video on this page is marked as a podcast episode, for some unknown reason. Calling 'get_artist' with this artist ID results in a 'KeyError: 'watchEndpoint'' being raised. I do not know why this happens besides because of the podcast episode.

<!-- gh-comment-id:1880122219 --> @MarkhorDev commented on GitHub (Jan 7, 2024): Recently commented on another issue but was pointed here. When calling 'get_artist' for an artist with podcasts on their page, a KeyError is raised. For example, the [first video](https://music.youtube.com/podcast/s0ApKrZPcak) on [this](https://music.youtube.com/channel/UCD14H15GYNnPRmAwkTnlPHg) page is marked as a podcast episode, for some unknown reason. Calling 'get_artist' with this artist ID results in a 'KeyError: 'watchEndpoint'' being raised. I do not know why this happens besides because of the podcast episode.
Author
Owner

@sigma67 commented on GitHub (Mar 13, 2024):

episodes and podcasts are supported in get_artist since 1.6.0.

Audiobooks support is still missing. I am renaming the issue accordingly

<!-- gh-comment-id:1995313628 --> @sigma67 commented on GitHub (Mar 13, 2024): `episodes` and `podcasts` are supported in `get_artist` since 1.6.0. Audiobooks support is still missing. I am renaming the issue accordingly
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#340
No description provided.