From 4701ad6c2edbeed930e1298fc768fa9af3b213e9 Mon Sep 17 00:00:00 2001 From: jakeogh Date: Tue, 14 May 2024 17:57:38 -0700 Subject: [PATCH] remove .get() call from content --- yt_dlp/extractor/youtube.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index dc9bee955..690337cf0 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3459,9 +3459,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor): # new comment format else: - view_model = traverse_obj(comment_thread_renderer, ('commentViewModel', 'commentViewModel')) - if not view_model: - view_model = content.get('commentViewModel') + view_model = ( + traverse_obj(comment_thread_renderer, ('commentViewModel', 'commentViewModel', {dict})) + or traverse_obj(content, ('commentViewModel', {dict}))) if not view_model: continue comment_id = view_model['commentId']