forked from lolcat/4get
fix invalid sublinks on google scraper
This commit is contained in:
@@ -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" =>
|
||||||
|
Reference in New Issue
Block a user