mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-28 21:57:57 +00:00
remove .get() call from content
This commit is contained in:
parent
1a0cf3ced4
commit
4701ad6c2e
|
@ -3459,9 +3459,9 @@ def extract_thread(contents, entity_payloads):
|
||||||
|
|
||||||
# new comment format
|
# new comment format
|
||||||
else:
|
else:
|
||||||
view_model = traverse_obj(comment_thread_renderer, ('commentViewModel', 'commentViewModel'))
|
view_model = (
|
||||||
if not view_model:
|
traverse_obj(comment_thread_renderer, ('commentViewModel', 'commentViewModel', {dict}))
|
||||||
view_model = content.get('commentViewModel')
|
or traverse_obj(content, ('commentViewModel', {dict})))
|
||||||
if not view_model:
|
if not view_model:
|
||||||
continue
|
continue
|
||||||
comment_id = view_model['commentId']
|
comment_id = view_model['commentId']
|
||||||
|
|
Loading…
Reference in a new issue