sigma67/ytmusicapi

YouTube music changed their UI of playlist page

Closed this issue · 2 comments

Describe the bug

I guess youtube music changed their UI of playlist page a little bit, and know method 'get_playlist' doesn't work.

KeyError: "Unable to find 'singleColumnBrowseResultsRenderer' using path ['contents', 'singleColumnBrowseResultsRenderer',

To Reproduce

Steps to reproduce the behavior:

  1. make a call of 'client.get_playlist' for any existing playlist
  2. See error

I think this was already solved in a newer ytmusicapi version.

I had a similar problem with ytmusicapi 1.3.2:

  File "/usr/local/lib/python3.12/site-packages/beetsplug/ytimport/youtube.py", line 22, in likes
    likes = yt.get_liked_songs(max_tracks)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ytmusicapi/mixins/library.py", line 194, in get_liked_songs
    return self.get_playlist('LM', limit)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ytmusicapi/mixins/playlists.py", line 110, in get_playlist
    results = nav(response,
              ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ytmusicapi/navigation.py", line 82, in nav
    raise err
  File "/usr/local/lib/python3.12/site-packages/ytmusicapi/navigation.py", line 76, in nav
    root = root[k]
           ~~~~^^^
KeyError: 'singleColumnBrowseResultsRenderer'

After I upgraded to the latest version (ytmusicapi 1.7.3), it worked.

Yes that's right! Thanks, didn't notice that I was living in the past