mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #290] The title of some videos are different than how they are displayed in YT Music. #226
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 inytmusic.get_song(), the title isDanza 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?
@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).
playerendpoint, which is represented byget_songin ytmusicapi. This is mainly used to get streaming information, but provides a bunch of other metadata as wellnextendpoint, which has the main purpose of fetching the watch playlist - i.e. the next videos to be played in order. This request is represented byget_watch_playlist. This playlist also contains the metadata for the original song which is shown in the UI at the endPerhaps the documentation should be a little more clear on this point, but for your case you should instead use
get_watch_playlist.@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.
@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.