mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Fix missing search results in extraction
This commit is contained in:
parent
37db83a94e
commit
abda6840d5
1 changed files with 8 additions and 3 deletions
|
@ -332,10 +332,15 @@ private class SearchResultsExtractor < ItemsContainerExtractor
|
||||||
end
|
end
|
||||||
|
|
||||||
private def extract(target)
|
private def extract(target)
|
||||||
raw_items = [] of JSON::Any
|
raw_items = [] of Array(JSON::Any)
|
||||||
content = target["primaryContents"]
|
content = target["primaryContents"]
|
||||||
renderer = content["sectionListRenderer"]["contents"].as_a[0]["itemSectionRenderer"]
|
renderer = content["sectionListRenderer"]["contents"].as_a.each do |node|
|
||||||
raw_items = renderer["contents"].as_a
|
if node = node["itemSectionRenderer"]?
|
||||||
|
raw_items << node["contents"].as_a
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
raw_items = raw_items.flatten
|
||||||
|
|
||||||
return SearchResults.new({contents: raw_items})
|
return SearchResults.new({contents: raw_items})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue