nice try google

This commit is contained in:
2026-09-08 18:28:43 -04:00
parent 31a9ef4e13
commit 017c4ba1b0
2 changed files with 25 additions and 33 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ class google{
if( if(
preg_match( preg_match(
'/^https?/', '/^(https?:|)\/\//',
$link $link
) )
){ ){
+24 -32
View File
@@ -930,20 +930,7 @@ class google{
){ ){
// sometimes the link is an encrypted redirect, handle redirection securely // sometimes the link is an encrypted redirect, handle redirection securely
if( $notices[] = $this->unshit_url($payload[1]);
preg_match(
'/^\/goto\?url=(.*)/',
$link,
$payload
)
){
$notices[] = "/resolver?scraper=google&target=" . $payload[1];
}else{
// normal link
$notices[] = $link;
}
} }
} }
@@ -1290,31 +1277,19 @@ class google{
$sublink["attributes"]["href"] $sublink["attributes"]["href"]
); );
if(
preg_match(
'/^\/goto\?url=(.*)/',
$sublink_url,
$piece_of_shit
)
){
// encrypted piece of shit url
$sublink_url = "/resolver?scraper=google&target=" . $piece_of_shit[1];
}
$sublinks[] = [ $sublinks[] = [
"title" => "title" =>
$this->fuckhtml $this->fuckhtml
->getTextContent($sublink), ->getTextContent($sublink),
"date" => null, "date" => null,
"url" => $sublink_url "url" => $this->unshit_url($sublink_url)
]; ];
} }
$out["web"][] = [ $out["web"][] = [
"title" => $title, "title" => $title,
"description" => $description, "description" => $description,
"url" => $url, "url" => $this->unshit_url($url),
"date" => $date, "date" => $date,
"type" => "web", "type" => "web",
"thumb" => $thumb, "thumb" => $thumb,
@@ -1533,9 +1508,11 @@ class google{
), ),
"source" => $source, "source" => $source,
"url" => "url" =>
$this->fuckhtml $this->unshit_url(
->getTextContent( $this->fuckhtml
$div["attributes"]["data-lpage"] ->getTextContent(
$div["attributes"]["data-lpage"]
)
) )
]; ];
} }
@@ -1962,7 +1939,7 @@ class google{
"duration" => $duration, "duration" => $duration,
"views" => null, "views" => null,
"thumb" => $thumb, "thumb" => $thumb,
"url" => $url "url" => $this->unshit_url($url)
]; ];
} }
@@ -2916,4 +2893,19 @@ class google{
return false; // no need to bypass return false; // no need to bypass
} }
private function unshit_url($url){
if(
preg_match(
'/^\/goto\?url=([^&]+)/',
$url,
$piece_of_shit
)
){
// encrypted piece of shit url
return "/resolver?scraper=google&target=" . rawurlencode($piece_of_shit[1]);
}
}
} }