From 5f112737b863e5fa629cc7621e4d97cc50ab9e64 Mon Sep 17 00:00:00 2001 From: lolcat Date: Wed, 27 May 2026 21:54:36 -0400 Subject: [PATCH] detect ddg captcha --- scraper/ddg.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scraper/ddg.php b/scraper/ddg.php index c59b423..188ad92 100644 --- a/scraper/ddg.php +++ b/scraper/ddg.php @@ -492,6 +492,17 @@ class ddg{ "form" ); + foreach($forms as $form){ + + if( + isset($form["attributes"]["id"]) && + $form["attributes"]["id"] == "challenge-form" + ) + }{ + + throw new Exception("DuckDuckGo returned an image captcha"); + } + foreach(array_reverse($forms) as $form){ $this->fuckhtml->load($form);