diff options
| author | lolcat <will@lolcat.ca> | 2026-05-27 21:54:36 -0400 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-05-28 11:49:25 -0700 |
| commit | dd64d2836f61a7d2dd0554f08ed49e29bc8b1295 (patch) | |
| tree | b0e7ae8528bf9e27bc7195b5c3c802fda0e31458 /scraper | |
| parent | c782c5a1be006b8cd9e2bc1928afa38ade3a254f (diff) | |
detect ddg captcha
Diffstat (limited to 'scraper')
| -rw-r--r-- | scraper/ddg.php | 11 |
1 files changed, 11 insertions, 0 deletions
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); |
