diff options
-rw-r--r-- | lib/backend.php | 2 | ||||
-rw-r--r-- | scraper/google.php | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/backend.php b/lib/backend.php index c76a0be..8033633 100644 --- a/lib/backend.php +++ b/lib/backend.php @@ -32,6 +32,8 @@ class backend{ $proxylist = array_values($proxylist); + echo $proxy_index_raw % count($proxylist); + return $proxylist[$proxy_index_raw % count($proxylist)]; } 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 = |