diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 82164e3c..929d492f 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -237,9 +237,9 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any .dig?("secondaryResults", "secondaryResults", "results") secondary_results.try &.as_a.each do |element| if item = element["compactVideoRenderer"]? - if item["publishedTimeText"]? - rv_published_time_text = item["publishedTimeText"].to_s - rv_decoded_time = decode_date(item["publishedTimeText"].to_s) + if rv_published_time_text = item["publishedTimeText"]? + rv_published_time_text = rv_published_time_text.as_s + rv_decoded_time = decode_date(rv_published_time_text) rv_published_timestamp = rv_decoded_time.to_unix.to_s else rv_published_timestamp = nil