diff --git a/ytmusicapi/parsers/browsing.py b/ytmusicapi/parsers/browsing.py index 945c0ca..16568c6 100644 --- a/ytmusicapi/parsers/browsing.py +++ b/ytmusicapi/parsers/browsing.py @@ -117,7 +117,9 @@ def parse_video(result): videoId = nav(result, NAVIGATION_VIDEO_ID, True) if not videoId: videoId = next( - id for entry in nav(result, MENU_ITEMS) if nav(entry, MENU_SERVICE + QUEUE_VIDEO_ID, True) + video_id + for entry in nav(result, MENU_ITEMS) + if (video_id := nav(entry, MENU_SERVICE + QUEUE_VIDEO_ID, True)) ) return { "title": nav(result, TITLE_TEXT),