readability

This commit is contained in:
pukkandan 2024-05-15 15:48:22 +05:30 committed by GitHub
parent 90b112983c
commit 54b823be28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3311,8 +3311,10 @@ def _extract_comment(self, view_model, entities, parent=None):
comment_entity_payload = get_first(entities, ('payload', 'commentEntityPayload', {dict}))
if not (comment_id := traverse_obj(comment_entity_payload, ('properties', 'commentId', {str}))):
return
toolbar_entity_payload = get_first(entities, ('payload', 'engagementToolbarStateEntityPayload', {dict}))
time_text = traverse_obj(comment_entity_payload, ('properties', 'publishedTime', {str})) or ''
return {
'id': comment_id,
'parent': parent or 'root',