aboutsummaryrefslogtreecommitdiffstats
path: root/scraper/qwant.php
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/qwant.php')
-rw-r--r--scraper/qwant.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/scraper/qwant.php b/scraper/qwant.php
index ecbd4ec..c242de7 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){
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage