From 5794bd13462e4393df702c3470438e087ad94f37 Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Sat, 11 Oct 2025 13:59:13 +0530 Subject: [PATCH] Synced https://git.lolcat.ca/lolcat/4get/commit/560b9b04da68db93354e4c3da628313cae25e94f --- scraper/google_api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scraper/google_api.php b/scraper/google_api.php index 6397bdd..e587609 100644 --- a/scraper/google_api.php +++ b/scraper/google_api.php @@ -570,7 +570,7 @@ class google_api{ "video" => [], "news" => [], "related" => [] - ]; + ]; if(isset($json["error"]["message"])){ @@ -583,7 +583,8 @@ class google_api{ if(!isset($json["items"])){ - throw new Exception("Failed to access items array"); + // google just doesnt return items when theres no results + return $out; } foreach($json["items"] as $result){