mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
video parsing: add secondary_results root element
This commit is contained in:
parent
99091e919c
commit
d7ebd763f5
1 changed files with 3 additions and 0 deletions
|
@ -890,8 +890,11 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_
|
||||||
raise BrokenTubeException.new("twoColumnWatchNextResults") if !main_results
|
raise BrokenTubeException.new("twoColumnWatchNextResults") if !main_results
|
||||||
|
|
||||||
primary_results = main_results.dig?("results", "results", "contents")
|
primary_results = main_results.dig?("results", "results", "contents")
|
||||||
|
secondary_results = main_results
|
||||||
|
.dig?("secondaryResults", "secondaryResults", "results")
|
||||||
|
|
||||||
raise BrokenTubeException.new("results") if !primary_results
|
raise BrokenTubeException.new("results") if !primary_results
|
||||||
|
raise BrokenTubeException.new("secondaryResults") if !secondary_results
|
||||||
|
|
||||||
video_primary_renderer = primary_results
|
video_primary_renderer = primary_results
|
||||||
.as_a.find(&.["videoPrimaryInfoRenderer"]?)
|
.as_a.find(&.["videoPrimaryInfoRenderer"]?)
|
||||||
|
|
Loading…
Reference in a new issue