Describe the bug
get_playlist method fails for some playlists with KeyError.
ytmusicapi version
1.11.5
To Reproduce
The following code:
from ytmusicapi import YTMusic
YTMusic().get_playlist('PL8eCD0llEGnywNAITfRGFiCCNpmaHc1_l')
Results in the traceback:
Traceback (most recent call last):
...
YTMusic().get_playlist('PL8eCD0llEGnywNAITfRGFiCCNpmaHc1_l')
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.14/site-packages/ytmusicapi/mixins/playlists.py", line 170, in get_playlist
playlist.update(parse_playlist_header_meta(header))
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/app/.venv/lib/python3.14/site-packages/ytmusicapi/parsers/playlists.py", line 77, in parse_playlist_header_meta
if "runs" in header["secondSubtitle"]:
~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'secondSubtitle'
Describe the bug
get_playlistmethod fails for some playlists withKeyError.ytmusicapi version
1.11.5
To Reproduce
The following code:
Results in the traceback: