handle captcha on coc coc
This commit is contained in:
@@ -165,6 +165,14 @@ class coccoc{
|
|||||||
throw new Exception("Failed to decode JSON");
|
throw new Exception("Failed to decode JSON");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(
|
||||||
|
isset($html["captcha"]) &&
|
||||||
|
(int)$html["captcha"] === 1
|
||||||
|
){
|
||||||
|
|
||||||
|
throw new Exception("Coc Coc returned a Captcha");
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($html["search"]["search_results"])){
|
if(!isset($html["search"]["search_results"])){
|
||||||
|
|
||||||
throw new Exception("Coc Coc did not return a search_results object");
|
throw new Exception("Coc Coc did not return a search_results object");
|
||||||
|
Reference in New Issue
Block a user