mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2024-12-03 23:42:16 -05:00
fixed google piece of shit website i hate it so much
This commit is contained in:
parent
beb08f46e2
commit
36993013e5
1 changed files with 132 additions and 112 deletions
|
@ -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 a new issue