From 6ecfacde35484d65f4c68d1996aa308986c46931 Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Fri, 7 Aug 2026 17:30:59 +0530 Subject: [PATCH] Synced foogle soft captcha --- scraper/google.php | 134 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 120 insertions(+), 14 deletions(-) diff --git a/scraper/google.php b/scraper/google.php index 49f575c..2c995f8 100644 --- a/scraper/google.php +++ b/scraper/google.php @@ -523,7 +523,7 @@ class google{ config::FPLAY_EXTERNAL_ENDPOINT . "?url=" . urlencode($url) . "&pw=" . urlencode(config::FPLAY_PASSWORD) . - "&container=" . urlencode($container) . + "&container=" .// urlencode($container) . "&proxy=" . urlencode($proxy) . "&url_match=" . urlencode("&sei=") . "&fail_url_match=" . urlencode("\/sorry\/"); @@ -733,7 +733,7 @@ class google{ $container = &$data["container"]; //file_put_contents("scraper/google-jp.html", $html); - //$html = file_get_contents("scraper/google-jp.html"); + //$html = file_get_contents("scraper/google-softcaptcha.html"); } $out = [ @@ -754,9 +754,26 @@ class google{ $this->fuckhtml->load($html); - // init - $this->detect_sorry(); - $this->parsestyles(); + // solve softcaptcha + $softcaptcha = $this->detect_sorry(); + + if($softcaptcha !== false){ + + $params["sei"] = $softcaptcha["sei"]; + + $data2 = $this->get( + $proxy, + "https://www.google.com/search", + $params, + $container + ); + + $html = &$data2["data"]; + + $this->fuckhtml->load($html); + $this->parsestyles(); + } + $this->scrape_dimg($html); $this->scrape_imagearr($html); @@ -1381,7 +1398,28 @@ class google{ $this->fuckhtml->load($html); - $this->detect_sorry(); + // parse all