Skip to content

Commit

Permalink
get_user_playlists: no longer errors on empty profile
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Jan 2, 2024
1 parent 0cb0a16 commit d1ac87c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ytmusicapi/mixins/browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ def get_user_playlists(self, channelId: str, params: str) -> List[Dict]:
endpoint = "browse"
body = {"browseId": channelId, "params": params}
response = self._send_request(endpoint, body)
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST_ITEM + GRID_ITEMS)
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST_ITEM + GRID_ITEMS, True)
if not results:
return []

user_playlists = parse_content_list(results, parse_playlist)

return user_playlists
Expand Down

0 comments on commit d1ac87c

Please sign in to comment.