fix invalid sublinks on google scraper

This commit is contained in:
2025-10-21 00:35:20 -04:00
parent ce75cbda81
commit 46e6ed12e3

View File

@@ -953,6 +953,18 @@ class google{
]) ])
); );
$url =
$this->unshiturl(
$a["attributes"]["href"]
);
if(
preg_match(
'/^http/',
$url
)
){
if(count($probe) !== 0){ if(count($probe) !== 0){
$sublinks[] = [ $sublinks[] = [
@@ -965,13 +977,11 @@ class google{
), ),
"description" => null, "description" => null,
"date" => null, "date" => null,
"url" => "url" => $url
$this->unshiturl(
$a["attributes"]["href"]
)
]; ];
} }
} }
}
$out["web"][] = [ $out["web"][] = [
"title" => "title" =>