From d7ebd763f54a3211aac02a2862775bf130029061 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Thu, 3 Feb 2022 00:11:05 +0100 Subject: [PATCH] video parsing: add secondary_results root element --- src/invidious/videos.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index b0d8b4d1..76f7123a 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -890,8 +890,11 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_ raise BrokenTubeException.new("twoColumnWatchNextResults") if !main_results 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("secondaryResults") if !secondary_results video_primary_renderer = primary_results .as_a.find(&.["videoPrimaryInfoRenderer"]?)