From 0f39d9c18710b92b6e7ce6b01f52ff6029460134 Mon Sep 17 00:00:00 2001 From: lolcat Date: Fri, 29 Mar 2024 05:15:53 -0400 Subject: error handling for invalid pagetype --- scraper/google.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scraper/google.php') diff --git a/scraper/google.php b/scraper/google.php index 77aaa3c..50bcc22 100644 --- a/scraper/google.php +++ b/scraper/google.php @@ -1020,7 +1020,15 @@ class google{ self::is_class ), "div" - )[1]; + ); + + if(!isset($description[1])){ + + throw new Exception("Google returned an unsupported page format (will fix)"); + }else{ + + $description = $description[1]; + } // get date (rare) $date = -- cgit v1.2.3