Fix javascript:void(0) instead of youtu.be links

This commit is contained in:
Samantaz Fox
2022-05-01 18:48:08 +02:00
parent 6a02dd8842
commit e690e166b0
3 changed files with 20 additions and 11 deletions

View File

@@ -69,7 +69,7 @@ private module Parsers
# TODO change default value to nil and typical encoding type to tuple storing type (watchers, views, etc)
# and count
view_count = item_contents.dig?("viewCountText", "simpleText").try &.as_s.gsub(/\D+/, "").to_i64? || 0_i64
description_html = item_contents["descriptionSnippet"]?.try { |t| parse_content(t) } || ""
description_html = item_contents["descriptionSnippet"]?.try { |t| parse_content(t, video_id) } || ""
# The length information generally exist in "lengthText". However, the info can sometimes
# be retrieved from "thumbnailOverlays" (e.g when the video is a "shorts" one).