aboutsummaryrefslogtreecommitdiffstats
path: root/scraper
diff options
context:
space:
mode:
Diffstat (limited to 'scraper')
-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