From 0861450b8a4ff225b2f38f7206a963839f1935bf Mon Sep 17 00:00:00 2001 From: lolcat Date: Wed, 29 Apr 2026 01:29:54 -0400 Subject: [PATCH] detect pinterest captcha --- scraper/pinterest.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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,