Add ali 400 check
This commit is contained in:
parent
b341fc6e2f
commit
eaa7616518
|
|
@ -148,7 +148,7 @@ public class API {
|
|||
url = url.startsWith("https") ? url : "https://api.aliyundrive.com/" + url;
|
||||
OkResult result = OkHttp.postJson(url, json, getHeaderAuth());
|
||||
SpiderDebug.log(result.getCode() + "," + url + "," + result.getBody());
|
||||
if (retry && result.getCode() == 401 && refreshAccessToken()) return auth(url, json, false);
|
||||
if (retry && (result.getCode() == 400 || result.getCode() == 401) && refreshAccessToken()) return auth(url, json, false);
|
||||
if (retry && result.getCode() == 429) return auth(url, json, false);
|
||||
return result.getBody();
|
||||
}
|
||||
|
|
@ -157,7 +157,7 @@ public class API {
|
|||
url = url.startsWith("https") ? url : "https://open.aliyundrive.com/adrive/v1.0/" + url;
|
||||
OkResult result = OkHttp.postJson(url, json, getHeaderOpen());
|
||||
SpiderDebug.log(result.getCode() + "," + url + "," + result.getBody());
|
||||
if (retry && result.getCode() == 401 && refreshOpenToken()) return oauth(url, json, false);
|
||||
if (retry && (result.getCode() == 400 || result.getCode() == 401) && refreshOpenToken()) return oauth(url, json, false);
|
||||
return result.getBody();
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
83302c0b9c22927f527219dc290dc6ad
|
||||
b139859b3d28a4065f5efe531f81757d
|
||||
|
|
|
|||
Loading…
Reference in New Issue