Handle published date for edited community posts

This commit is contained in:
syeopite 2021-07-27 00:21:43 -07:00
parent 1b3319942e
commit 0f33b1e038
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -364,7 +364,7 @@ private module Parsers
comments = item_contents.dig?("actionButtons", "commentActionButtonsRenderer",
"replyButton", "buttonRenderer", "text", "simpleText").try { |t| short_text_to_number(t.as_s) } || 0
published = item_contents["publishedTimeText"]["runs"][0]["text"].try { |t| decode_date(t.as_s) } || Time.local
published = item_contents["publishedTimeText"]["runs"][0]["text"].try { |t| decode_date(t.as_s.rstrip(" (edited)")) } || Time.local
YouTubeStructs::CommunityPost.new({
author: author_name,