Fix get_watch_playlist (broken by Lyrics on Web update)

This commit is contained in:
sigma67 2020-09-17 11:52:47 +02:00
commit 3255303e0a
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
2 changed files with 6 additions and 5 deletions

View file

@ -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:

View file

@ -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']