diff --git a/scraper/google.php b/scraper/google.php index 417a8c0..1c1ccab 100644 --- a/scraper/google.php +++ b/scraper/google.php @@ -721,19 +721,19 @@ class google{ $params["tbs"] = rtrim($params["tbs"], ","); } - + /* $data = $this->get( $proxy, "https://www.google.com/search", $params, null - ); + );*/ $html = &$data["data"]; $container = &$data["container"]; //file_put_contents("scraper/google-jp.html", $html); - //$html = file_get_contents("scraper/google-softcaptcha.html"); + $html = file_get_contents("scraper/google-softcaptcha.html"); } $out = [ @@ -756,7 +756,22 @@ class google{ // init $this->parsestyles(); - $this->detect_sorry(); + + // solve softcaptcha + $softcaptcha = $this->detect_sorry(); + + if($softcaptcha){ + + $params["sei"] = $softcaptcha["sei"]; + + $data = $this->get( + $proxy, + "https://www.google.com/search", + $params, + $container + ); + } + $this->scrape_dimg($html); $this->scrape_imagearr($html); @@ -1384,7 +1399,19 @@ class google{ // parse all