From 24024aa18e84776452e3ff95dbc447804aadb064 Mon Sep 17 00:00:00 2001 From: Fabian Wunsch Date: Mon, 25 Sep 2023 22:21:15 +0200 Subject: [PATCH] cleaner alternative parsing --- ytmusicapi/mixins/browsing.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ytmusicapi/mixins/browsing.py b/ytmusicapi/mixins/browsing.py index 7725ffd..91fa491 100644 --- a/ytmusicapi/mixins/browsing.py +++ b/ytmusicapi/mixins/browsing.py @@ -253,10 +253,7 @@ class BrowsingMixin: 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