diff --git a/ytmusicapi/mixins/watch.py b/ytmusicapi/mixins/watch.py index 7471c3f..ca85fa4 100644 --- a/ytmusicapi/mixins/watch.py +++ b/ytmusicapi/mixins/watch.py @@ -55,8 +55,10 @@ class WatchMixin: body['params'] = params endpoint = 'next' response = self._send_request(endpoint, body) - results = response['contents']['singleColumnMusicWatchNextResultsRenderer']['playlist'][ - 'playlistPanelRenderer'] + results = nav(response, [ + 'contents', 'singleColumnMusicWatchNextResultsRenderer', 'tabbedRenderer', + 'watchNextTabbedResultsRenderer' + ] + TAB_CONTENT + ['musicQueueRenderer', 'content', 'playlistPanelRenderer']) tracks = parse_watch_playlist(results['contents']) if 'continuations' in results: diff --git a/ytmusicapi/parsers/__init__.py b/ytmusicapi/parsers/__init__.py index 6402542..023e475 100644 --- a/ytmusicapi/parsers/__init__.py +++ b/ytmusicapi/parsers/__init__.py @@ -1,7 +1,6 @@ # commonly used navigation paths -SINGLE_COLUMN_TAB = [ - 'contents', 'singleColumnBrowseResultsRenderer', 'tabs', 0, 'tabRenderer', 'content' -] +TAB_CONTENT = ['tabs', 0, 'tabRenderer', 'content'] +SINGLE_COLUMN_TAB = ['contents', 'singleColumnBrowseResultsRenderer'] + TAB_CONTENT SECTION_LIST = ['sectionListRenderer', 'contents'] ITEM_SECTION = ['itemSectionRenderer', 'contents', 0] MUSIC_SHELF = [0, 'musicShelfRenderer']