fixed google crash

This commit is contained in:
lolcat 2025-01-03 21:43:40 -05:00
parent 1ca2626ad9
commit 81df52235c
1 changed files with 4 additions and 2 deletions

View File

@ -2531,6 +2531,8 @@ class google{
"div" "div"
); );
$date = null;
if(count($date_div) !== 0){ if(count($date_div) !== 0){
foreach($date_div as $div){ foreach($date_div as $div){
@ -2541,6 +2543,7 @@ class google{
"bottom:" "bottom:"
) !== false ) !== false
){ ){
$date = $date =
strtotime( strtotime(
$this->fuckhtml $this->fuckhtml
@ -2548,7 +2551,6 @@ class google{
$div $div
) )
); );
break; break;
} }
} }
@ -4147,7 +4149,7 @@ class google{
throw new Exception("Failed to get HTML"); throw new Exception("Failed to get HTML");
} }
//$html = file_get_contents("scraper/google.html"); //$html = file_get_contents("scraper/google.txt");
return $this->parsepage($html, "web", $search, $proxy, $params); return $this->parsepage($html, "web", $search, $proxy, $params);
} }