Invidious is an alternative front-end to YouTube
Use dig to get category contents
Samantaz Fox4436359d0783
diff --git a/src/invidious/videos.cr b/src/invidious/videos.crindex c9f6626a..db94110b 100644--- a/src/invidious/videos.cr+++ b/src/invidious/videos.cr@@ -954,7 +954,7 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_contents = row.dig?("metadataRowRenderer", "contents", 0)if title.try &.== "Category"- contents = contents.try &.["runs"]?.try &.as_a[0]?+ contents = contents.try &.dig?("runs", 0)params["genre"] = JSON::Any.new(contents.try &.["text"]?.try &.as_s || "")params["genreUcid"] = JSON::Any.new(contents.try &.["navigationEndpoint"]?.try &.["browseEndpoint"]?