fix: use short_description as description if microformat is not available
This commit is contained in:
parent
fda823593e
commit
8fe965419a
1 changed files with 1 additions and 1 deletions
|
@ -328,8 +328,8 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
|||
|
||||
# Description
|
||||
|
||||
description = microformat.try &.dig?("description", "simpleText").try &.as_s || ""
|
||||
short_description = player_response.dig?("videoDetails", "shortDescription")
|
||||
description = microformat.try &.dig?("description", "simpleText").try &.as_s || short_description.try &.as_s || ""
|
||||
|
||||
# description_html = video_secondary_renderer.try &.dig?("description", "runs")
|
||||
# .try &.as_a.try { |t| content_to_comment_html(t, video_id) }
|
||||
|
|
Loading…
Add table
Reference in a new issue