mirror of
https://gitea.invidious.io/iv-org/invidious
synced 2024-12-23 15:38:06 +01:00
Fix optional value in data extractor
This commit is contained in:
parent
b73c6e94c0
commit
b5f79444f9
@ -326,7 +326,7 @@ def extract_items(initial_data : Hash(String, JSON::Any), author_fallback : Stri
|
|||||||
t["continuationContents"]? }
|
t["continuationContents"]? }
|
||||||
.try { |t| t["sectionListRenderer"]? || t["sectionListContinuation"]? }
|
.try { |t| t["sectionListRenderer"]? || t["sectionListContinuation"]? }
|
||||||
.try &.["contents"].as_a
|
.try &.["contents"].as_a
|
||||||
.each { |c| c.try &.["itemSectionRenderer"]["contents"].as_a
|
.each { |c| c.try &.["itemSectionRenderer"]?.try &.["contents"].as_a
|
||||||
.try { |t| t[0]?.try &.["shelfRenderer"]?.try &.["content"]["expandedShelfContentsRenderer"]?.try &.["items"].as_a ||
|
.try { |t| t[0]?.try &.["shelfRenderer"]?.try &.["content"]["expandedShelfContentsRenderer"]?.try &.["items"].as_a ||
|
||||||
t[0]?.try &.["gridRenderer"]?.try &.["items"].as_a || t }
|
t[0]?.try &.["gridRenderer"]?.try &.["items"].as_a || t }
|
||||||
.each { |item|
|
.each { |item|
|
||||||
|
Loading…
Reference in New Issue
Block a user