From c2941cdb2cbc8f4938b941a34f8abf7c17e03f78 Mon Sep 17 00:00:00 2001 From: lolcat Date: Wed, 11 Jun 2025 18:44:41 -0400 Subject: [PATCH] handle google captcha --- src/scraper/google.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/scraper/google.php b/src/scraper/google.php index 4b34120..132a27b 100644 --- a/src/scraper/google.php +++ b/src/scraper/google.php @@ -2970,18 +2970,18 @@ class google{ return $time; } - + private function detect_sorry(){ - - $recaptcha = + + $captcha_form = $this->fuckhtml ->getElementById( - "recaptcha", - "div" + "captcha-form", + "form" ); - - if($recaptcha !== false){ - + + if($captcha_form !== false){ + throw new Exception("Google returned a captcha"); } }