[GH-ISSUE #290] The title of some videos are different than how they are displayed in YT Music. #226

Closed
opened 2026-02-27 22:08:42 +03:00 by kerem · 3 comments
Owner

Originally created by @CompuGeniusCode on GitHub (Aug 22, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/290

The title of some videos are different than how they are displayed in YT Music.

For example: Danza Kuduro
In YT Music, the title is Danza Kuduro (feat. Lucenzo), however in the data that ytmusicapi gets in ytmusic.get_song(), the title is Danza Kuduro.

Now, obviously that's not a major difference, I'm just curious what's the reasoning for the discrepancy and how I can fix it?

Originally created by @CompuGeniusCode on GitHub (Aug 22, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/290 The title of some videos are different than how they are displayed in YT Music. For example: [Danza Kuduro](https://music.youtube.com/watch?v=BbWY-avjDto) In YT Music, the title is `Danza Kuduro (feat. Lucenzo)`, however in the data that ytmusicapi gets in `ytmusic.get_song()`, the title is `Danza Kuduro`. Now, obviously that's not a major difference, I'm just curious what's the reasoning for the discrepancy and how I can fix it?
kerem closed this issue 2026-02-27 22:08:42 +03:00
Author
Owner

@sigma67 commented on GitHub (Aug 23, 2022):

So to explain the difference you need to understand how the web interface works.

When you click Play on a video, two POST requests happen to the main YouTube Music API (disregarding all the image/video/log requests).

  • The first request is to the player endpoint, which is represented by get_song in ytmusicapi. This is mainly used to get streaming information, but provides a bunch of other metadata as well
  • The second request is to the next endpoint, which has the main purpose of fetching the watch playlist - i.e. the next videos to be played in order. This request is represented by get_watch_playlist. This playlist also contains the metadata for the original song which is shown in the UI at the end

Perhaps the documentation should be a little more clear on this point, but for your case you should instead use get_watch_playlist.

<!-- gh-comment-id:1224160719 --> @sigma67 commented on GitHub (Aug 23, 2022): So to explain the difference you need to understand how the web interface works. When you click Play on a video, two POST requests happen to the main YouTube Music API (disregarding all the image/video/log requests). - The first request is to the `player` endpoint, which is represented by `get_song` in ytmusicapi. This is mainly used to get streaming information, but provides a bunch of other metadata as well - The second request is to the `next` endpoint, which has the main purpose of fetching the watch playlist - i.e. the next videos to be played in order. This request is represented by `get_watch_playlist`. This playlist also contains the metadata for the original song which is shown in the UI at the end Perhaps the documentation should be a little more clear on this point, but for your case you should instead use `get_watch_playlist`.
Author
Owner

@CompuGeniusCode commented on GitHub (Aug 23, 2022):

Thank you! I will check whether your suggested function is appropriate for my use case, otherwise a small discrepancy should be fine.

<!-- gh-comment-id:1224170609 --> @CompuGeniusCode commented on GitHub (Aug 23, 2022): Thank you! I will check whether your suggested function is appropriate for my use case, otherwise a small discrepancy should be fine.
Author
Owner

@sigma67 commented on GitHub (Aug 23, 2022):

Otherwise you can always use both requests in parallel, it's what happens in the web interface anyway.

<!-- gh-comment-id:1224175563 --> @sigma67 commented on GitHub (Aug 23, 2022): Otherwise you can always use both requests in parallel, it's what happens in the web interface anyway.
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#226
No description provided.