Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artists missing for a certain song when using get_watch_playlist() #313

Closed
RaduTek opened this issue Oct 27, 2022 · 4 comments
Closed

Artists missing for a certain song when using get_watch_playlist() #313

RaduTek opened this issue Oct 27, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@RaduTek
Copy link

RaduTek commented Oct 27, 2022

After running a playlist through some code I've made, I've found that a certain song does not return any artists.
The song in question is: https://music.youtube.com/watch?v=_GUaqxHWLks.
This issue happens outside of my code.

After running result = ytm.get_watch_playlist("_GUaqxHWLks") and outputting as JSON print(json.dumps(result, indent=2)) I get this: (trimmed unnecessary parts)

  "tracks": [
    {
      "videoId": "_GUaqxHWLks",
      "title": "Human Rights",
      "length": "6:04",
      "thumbnail": [...],
      "feedbackTokens": null,
      "likeStatus": null,
      "videoType": "MUSIC_VIDEO_TYPE_ATV",
      "artists": [],
      "views": "61",
      "album": {
        "name": "Vocal Trance Club Hits Vol. 4",
        "id": "MPREb_YBKrMP6OhRV"
      },
      "year": "2008"
    },
    ...
  ]
}

Notice how "artists": [] is empty. Meanwhile in YT Music, on the watch page the artist is displayed successfully, so it shouldn't be a backend issue or missing metadata on YT's side.
image

@RaduTek
Copy link
Author

RaduTek commented Oct 27, 2022

To make it clear, all the code I've used to recreate the issue is:

import json
from ytmusicapi import YTMusic
ytm = YTMusic()
result = ytm.get_watch_playlist("_GUaqxHWLks")
print(json.dumps(result, indent=2))

@sigma67
Copy link
Owner

sigma67 commented Nov 2, 2022

If you look at your screenshot, the data is not there on the YouTube Music frontend. It only shows the album. That's why there is no artist in the data.

@sigma67 sigma67 closed this as completed Nov 2, 2022
@RaduTek
Copy link
Author

RaduTek commented Nov 2, 2022

I'm sorry, but there is. The album name is "Vocal Trance Club Hits Vol. 4", while the artist is "61 Rus". The thing is that the artist is not matched with an ID, as it's not clickable, but it is displayed both there and on the album page.

@sigma67 sigma67 added the bug Something isn't working label Nov 3, 2022
@sigma67
Copy link
Owner

sigma67 commented Nov 3, 2022

Ah I see. This is a special case where the artist matches the regex used to detect view counts, and therefore a bug.

@sigma67 sigma67 reopened this Nov 3, 2022
@sigma67 sigma67 closed this as completed in d48951f Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants