diff options
author | lolcat <will@lolcat.ca> | 2024-04-21 19:31:56 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2024-04-21 19:31:56 -0400 |
commit | 130358a9e0504a55cf3f86b2d7035feb7f4e84de (patch) | |
tree | 81f59790f7ead0b393a0e0b25caa082216245fcd /scraper/yandex.php | |
parent | 9e18327df69542e07fad2ef471a3ebdbe9b08ae8 (diff) |
v8
Diffstat (limited to 'scraper/yandex.php')
-rw-r--r-- | scraper/yandex.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scraper/yandex.php b/scraper/yandex.php index 9b73428..2e81cee 100644 --- a/scraper/yandex.php +++ b/scraper/yandex.php @@ -644,6 +644,11 @@ class yandex{ $json = json_decode($json, true); + if($json === null){ + + throw new Exception("Failed to decode JSON"); + } + if( isset($json["type"]) && $json["type"] == "captcha" @@ -652,11 +657,6 @@ class yandex{ throw new Exception("Yandex blocked this 4get instance. Please try again in ~7 minutes."); } - if($json === null){ - - throw new Exception("Failed to decode JSON"); - } - $out = [ "status" => "ok", "npt" => null, |