fixed google piece of shit website i hate it so much
This commit is contained in:
parent
beb08f46e2
commit
36993013e5
|
@ -799,6 +799,41 @@ class google{
|
|||
$title = "Notice";
|
||||
}
|
||||
|
||||
$div =
|
||||
$this->fuckhtml
|
||||
->getElementsByTagName(
|
||||
"div"
|
||||
);
|
||||
|
||||
// probe for related searches div, if found, ignore it cause its shit
|
||||
$probe =
|
||||
$this->fuckhtml
|
||||
->getElementsByAttributeValue(
|
||||
"role",
|
||||
"list",
|
||||
$div
|
||||
);
|
||||
|
||||
// also probe for children
|
||||
if(count($probe) === 0){
|
||||
|
||||
$probe =
|
||||
$this->fuckhtml
|
||||
->getElementsByClassName(
|
||||
$this->getstyle(
|
||||
[
|
||||
"flex-shrink" => "0",
|
||||
"-moz-box-flex" => "0",
|
||||
"flex-grow" => "0",
|
||||
"overflow" => "hidden"
|
||||
]
|
||||
),
|
||||
$div
|
||||
);
|
||||
}
|
||||
|
||||
if(count($probe) === 0){
|
||||
|
||||
$description = [];
|
||||
|
||||
$as =
|
||||
|
@ -892,23 +927,6 @@ class google{
|
|||
)
|
||||
];
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
// @TODO: Check if this ever gets populated without giving me garbage
|
||||
/*
|
||||
$text =
|
||||
$this->fuckhtml
|
||||
->getTextContent(
|
||||
$card
|
||||
);
|
||||
|
||||
if($text != ""){
|
||||
$description[] = [
|
||||
"type" => "text",
|
||||
"value" => $text
|
||||
];
|
||||
}*/
|
||||
}
|
||||
|
||||
if(count($description) !== 0){
|
||||
|
@ -923,6 +941,7 @@ class google{
|
|||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// reset
|
||||
$this->fuckhtml->load($html);
|
||||
|
@ -2451,6 +2470,7 @@ class google{
|
|||
$this->getstyle(
|
||||
[
|
||||
"outline-offset" => "-1px",
|
||||
"outline-width" => "1px",
|
||||
"display" => "flex",
|
||||
"flex-direction" => "column",
|
||||
"flex-grow" => "1"
|
||||
|
|
Loading…
Reference in New Issue