mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2024-11-08 17:43:07 -05:00
error handling for invalid pagetype
This commit is contained in:
parent
ba7ed59dc5
commit
0f39d9c187
2 changed files with 11 additions and 1 deletions
|
@ -32,6 +32,8 @@ class backend{
|
||||||
|
|
||||||
$proxylist = array_values($proxylist);
|
$proxylist = array_values($proxylist);
|
||||||
|
|
||||||
|
echo $proxy_index_raw % count($proxylist);
|
||||||
|
|
||||||
return $proxylist[$proxy_index_raw % count($proxylist)];
|
return $proxylist[$proxy_index_raw % count($proxylist)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1020,7 +1020,15 @@ class google{
|
||||||
self::is_class
|
self::is_class
|
||||||
),
|
),
|
||||||
"div"
|
"div"
|
||||||
)[1];
|
);
|
||||||
|
|
||||||
|
if(!isset($description[1])){
|
||||||
|
|
||||||
|
throw new Exception("Google returned an unsupported page format (will fix)");
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$description = $description[1];
|
||||||
|
}
|
||||||
|
|
||||||
// get date (rare)
|
// get date (rare)
|
||||||
$date =
|
$date =
|
||||||
|
|
Loading…
Reference in a new issue