From fc491d65f57acecf9e7313c67432dac61e248030 Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Mon, 30 Mar 2026 22:43:00 +0530 Subject: [PATCH] Synced Detect qwant captcha: (https://git.lolcat.ca/lolcat/4get/commit/fdd44dd373f6e42ca0889c44c605706af322fb06) --- scraper/qwant.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scraper/qwant.php b/scraper/qwant.php index c7e19d6..de6d4aa 100644 --- a/scraper/qwant.php +++ b/scraper/qwant.php @@ -905,6 +905,17 @@ class qwant{ throw new Exception("Qwant returned an API error"); } + + if( + isset($json["url"]) && + preg_match( + '/captcha/i', + $json["url"] + ) + ){ + + throw new Exception("Qwant returned a captcha redirect"); + } } private function limitstrlen($text){