Skip to content

Commit

Permalink
cleaner alternative parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
fabi321 authored and sigma67 committed Sep 25, 2023
1 parent 01f3887 commit 24024aa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ytmusicapi/mixins/browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ def get_artist_albums(self, channelId: str, params: str) -> List[Dict]:
endpoint = 'browse'
response = self._send_request(endpoint, body)
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST_ITEM)
if 'gridRenderer' in results:
results = nav(results, GRID_ITEMS)
else:
results = nav(results, CAROUSEL_CONTENTS)
results = nav(results, GRID_ITEMS, True) or nav(results, CAROUSEL_CONTENTS)
albums = parse_albums(results)

return albums
Expand Down

0 comments on commit 24024aa

Please sign in to comment.