mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 21:33:19 +00:00
use traverse_obj for time_text
This commit is contained in:
parent
8d428b42c0
commit
0ef6c93560
|
@ -3327,7 +3327,7 @@ def _extract_comment(self, view_model, entities, parent=None):
|
||||||
}
|
}
|
||||||
|
|
||||||
# Timestamp is an estimate calculated from the current time and time_text
|
# Timestamp is an estimate calculated from the current time and time_text
|
||||||
time_text = try_get(comment_entity_payload, lambda x: x['properties']['publishedTime'], str) or ''
|
time_text = traverse_obj(comment_entity_payload, ('properties', 'publishedTime', {str})) or ''
|
||||||
timestamp = self._parse_time_text(time_text)
|
timestamp = self._parse_time_text(time_text)
|
||||||
|
|
||||||
info.update({
|
info.update({
|
||||||
|
|
Loading…
Reference in a new issue