sigma67 / ytmusicapi

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

Prevent KeyError when using get_account_info() on a user that doesn't have a YouTube channel #577

Closed apastel closed 2 months ago

apastel commented 2 months ago

get_account_info() raises a KeyError if the user does not have a channel handle because they never created a YouTube channel. Seems like a perfect reason to use the handy none_if_absent flag :)