diff options
| author | lolcat <will@lolcat.ca> | 2026-04-29 01:29:54 -0400 |
|---|---|---|
| committer | lolcat <will@lolcat.ca> | 2026-04-29 01:29:54 -0400 |
| commit | 0861450b8a4ff225b2f38f7206a963839f1935bf (patch) | |
| tree | e35fd7ae7cf46116b2f650c1379223e39c65d0ab /scraper | |
| parent | 88012f6ae287be9e4d1bcad6f6b9f7a7db67d732 (diff) | |
detect pinterest captcha
Diffstat (limited to 'scraper')
| -rw-r--r-- | scraper/pinterest.php | 8 |
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, |
