From 2758fc9c1f732f66a7cee6c25825fb1f296a89c7 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Thu, 14 Jan 2021 22:10:34 +0100 Subject: [PATCH] Fix get_watch_playlist track parsing if length field is missing --- ytmusicapi/parsers/watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ytmusicapi/parsers/watch.py b/ytmusicapi/parsers/watch.py index 55c9f29..4edd449 100644 --- a/ytmusicapi/parsers/watch.py +++ b/ytmusicapi/parsers/watch.py @@ -30,7 +30,7 @@ def parse_watch_playlist(results): 'title': nav(data, TITLE_TEXT), 'artists': artists, 'album': album, - 'length': nav(data, ['lengthText', 'runs', 0, 'text']), + 'length': nav(data, ['lengthText', 'runs', 0, 'text'], True), 'playlistId': nav(data, NAVIGATION_PLAYLIST_ID), 'thumbnail': nav(data, THUMBNAIL), 'feedbackTokens': feedback_tokens,