Merge pull request #3076 from SamantazFox/fix-3062-3063

Fix regressions of #2936
This commit is contained in:
Samantaz Fox
2022-05-04 22:29:10 +02:00
committed by GitHub
4 changed files with 44 additions and 36 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).