fix invalid sublinks on google scraper
This commit is contained in:
@@ -953,23 +953,33 @@ class google{
|
|||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
if(count($probe) !== 0){
|
$url =
|
||||||
|
$this->unshiturl(
|
||||||
|
$a["attributes"]["href"]
|
||||||
|
);
|
||||||
|
|
||||||
|
if(
|
||||||
|
preg_match(
|
||||||
|
'/^http/',
|
||||||
|
$url
|
||||||
|
)
|
||||||
|
){
|
||||||
|
|
||||||
$sublinks[] = [
|
if(count($probe) !== 0){
|
||||||
"title" =>
|
|
||||||
$this->titledots(
|
$sublinks[] = [
|
||||||
$this->fuckhtml
|
"title" =>
|
||||||
->getTextContent(
|
$this->titledots(
|
||||||
$probe[0]
|
$this->fuckhtml
|
||||||
)
|
->getTextContent(
|
||||||
),
|
$probe[0]
|
||||||
"description" => null,
|
)
|
||||||
"date" => null,
|
),
|
||||||
"url" =>
|
"description" => null,
|
||||||
$this->unshiturl(
|
"date" => null,
|
||||||
$a["attributes"]["href"]
|
"url" => $url
|
||||||
)
|
];
|
||||||
];
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user