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,23 +953,33 @@ class google{
]) ])
); );
if(count($probe) !== 0){ $url =
$this->unshiturl(
$a["attributes"]["href"]
);
$sublinks[] = [ if(
"title" => preg_match(
$this->titledots( '/^http/',
$this->fuckhtml $url
->getTextContent( )
$probe[0] ){
)
), if(count($probe) !== 0){
"description" => null,
"date" => null, $sublinks[] = [
"url" => "title" =>
$this->unshiturl( $this->titledots(
$a["attributes"]["href"] $this->fuckhtml
) ->getTextContent(
]; $probe[0]
)
),
"description" => null,
"date" => null,
"url" => $url
];
}
} }
} }