move url parsing to utils method

This commit is contained in:
chunky programmer
2023-04-24 17:40:58 -04:00
parent d420741cc1
commit 1b10446e5e
4 changed files with 62 additions and 103 deletions

View File

@@ -287,7 +287,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
# description_html = video_secondary_renderer.try &.dig?("description", "runs")
# .try &.as_a.try { |t| content_to_comment_html(t, video_id) }
description_html = parse_description(video_secondary_renderer.try &.dig?("attributedDescription"))
description_html = parse_description(video_secondary_renderer.try &.dig?("attributedDescription"), video_id)
# Video metadata