aboutsummaryrefslogtreecommitdiffstats
path: root/scraper/google_api.php
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/google_api.php')
-rw-r--r--scraper/google_api.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/scraper/google_api.php b/scraper/google_api.php
index 6dbc25a..bb2cacf 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){
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage