From 84af92a44276dc904158e542fe0ee80937d4d31c Mon Sep 17 00:00:00 2001 From: sigma67 Date: Fri, 14 May 2021 19:42:33 +0200 Subject: [PATCH] get_watch_playlist: unwrap missing tracks --- ytmusicapi/parsers/watch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ytmusicapi/parsers/watch.py b/ytmusicapi/parsers/watch.py index c527ebd..46f9057 100644 --- a/ytmusicapi/parsers/watch.py +++ b/ytmusicapi/parsers/watch.py @@ -5,6 +5,8 @@ from .songs import * def parse_watch_playlist(results): tracks = [] for result in results: + if 'playlistPanelVideoWrapperRenderer' in result: + result = result['playlistPanelVideoWrapperRenderer']['primaryRenderer'] if 'playlistPanelVideoRenderer' not in result: continue data = result['playlistPanelVideoRenderer']