aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2026-04-29 01:29:54 -0400
committerlolcat <will@lolcat.ca>2026-04-29 01:29:54 -0400
commit0861450b8a4ff225b2f38f7206a963839f1935bf (patch)
treee35fd7ae7cf46116b2f650c1379223e39c65d0ab
parent88012f6ae287be9e4d1bcad6f6b9f7a7db67d732 (diff)
detect pinterest captcha
-rw-r--r--scraper/pinterest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/scraper/pinterest.php b/scraper/pinterest.php
index d1eec38..f9cbf1d 100644
--- a/scraper/pinterest.php
+++ b/scraper/pinterest.php
@@ -297,6 +297,14 @@ class pinterest{
throw new Exception("Failed to decode JSON");
}
+ if(
+ isset($json["client_context"]["is_bad_bot"]) &&
+ (int)$json["client_context"]["is_bad_bot"] === 1
+ ){
+
+ throw new Exception("Pinterest blocked this instance or request proxy.");
+ }
+
$out = [
"status" => "ok",
"npt" => null,
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage