sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.71k stars 194 forks source link

`get_library_upload_artists` method not returning all artists for uploaded songs #532

Closed robtekky closed 8 months ago

robtekky commented 8 months ago

Describe the bug The get_library_upload_artists method does not seem to be returning all artists for uploaded songs. It seems it is considering the artist Zombies to be the same as The Zombies

To Reproduce Steps to reproduce the behavior:

  1. In my case, I have two songs, each from a different artist (Zombies Vs The Zombies):
    • SONG 1: Time of the season (title), The Zombies (artist)
    • SONG 2: Groenlandia (title), Zombies (artist)
  2. When calling get_library_upload_artists, only the artists Zombies is included. See the "Additional context" provided for a python repl session showing the problem.

Additional context Using the python repl:

In [20]: from ytmusicapi import YTMusic
In [21]: artists = client.get_library_upload_artists(limit=5000)
In [22]: len(artists)
Out[22]: 401
In [23]: songs = client.get_library_upload_songs(limit=5000)
In [24]: len(songs)
Out[24]: 975
In [25]: song1 = [s for s in songs if s['title'] == 'Time of the Season']
In [26]: song1
Out[26]:
[{'entityId': 't_po_XXX_____AQ',
  'videoId': 'k-xxx',
  'title': 'Time of the Season',
  'duration': '3:30',
  'duration_seconds': 210,
  'artists': [{'name': 'The Zombies',
    'id': 'FEmusic_library_privately_owned_artist_detaila_po_XXX'}],
  'album': {'name': 'Odessey and Oracle',
   'id': 'FEmusic_library_privately_owned_release_detailb_po_XXX'},
  'likeStatus': 'INDIFFERENT',
  'thumbnails': [{'url': 'https://i9.ytimg.com/vi_locker/k-bTHRp2UUk/locker.png?sqp=-xxx&rs=XXX__Ltg',
    'width': 60,
    'height': 60},
   {'url': 'https://i9.ytimg.com/vi_locker/k-bTHRp2UUk/locker.png?sqp=-xxx&rs=XXX',
    'width': 120,
    'height': 120}]}]
In [27]: song2 = [s for s in songs if s['title'] == 'Groenlandia']
In [28]: song2
Out[28]:
[{'entityId': 't_po_XXX',
  'videoId': 'xxxx',
  'title': 'Groenlandia',
  'duration': '3:46',
  'duration_seconds': 226,
  'artists': [{'name': 'Zombies',
    'id': 'FEmusic_library_privately_owned_artist_detaila_po_XXX'}],
  'album': {'name': 'La Edad De Oro Del Pop Español (1978-1990)',
   'id': 'FEmusic_library_privately_owned_release_detailb_po_XXX'},
  'likeStatus': 'INDIFFERENT',
  'thumbnails': [{'url': 'https://i9.ytimg.com/vi_locker/5NjOsq7kxiQ/locker.png?sqp=-xxx&rs=XXXX',
    'width': 60,
    'height': 60},
   {'url': 'https://i9.ytimg.com/vi_locker/5NjOsq7kxiQ/locker.png?sqp=-xxx&rs=XXX',
    'width': 120,
    'height': 120}]}]
In [29]: zombies_list = [a for a in artists if 'ombies' in a['artist']]
In [30]: zombies_list
Out[30]:
[{'browseId': 'FEmusic_library_privately_owned_artist_detaila_po_XXX',
  'artist': 'Zombies',
  'shuffleId': 'MLPAa_po_XXXX',
  'radioId': 'MLPAa_po_XXX',
  'subscribers': '2',
  'thumbnails': [{'url': 'https://i9.ytimg.com/vi_locker/5NjOsq7kxiQ/locker.png?sqp=-xxx&rs=XXX',
    'width': 60,
    'height': 60},
   {'url': 'https://i9.ytimg.com/vi_locker/5NjOsq7kxiQ/locker.png?sqp=-xxx&rs=XXX',
    'width': 120,
    'height': 120}]}]
In [31]: len(zombies_list)
Out[31]: 1
sigma67 commented 8 months ago

The data returned is what is shown on YouTube. Server side issue, nothing we can do there