Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
5a6b472c5e
|
|
@ -134,13 +134,14 @@ public class API {
|
|||
url = url.startsWith("https") ? url : "https://api.aliyundrive.com/" + url;
|
||||
String result = OkHttp.postJson(url, json, getHeaderSign());
|
||||
Log.e("sign", result);
|
||||
if (retry && checkSign(result)) return sign(url, json, false);
|
||||
if (retry && checkAuth(result)) return sign(url, json, false);
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean checkAuth(String result) {
|
||||
if (result.contains("AccessTokenInvalid")) return refreshAccessToken();
|
||||
if (result.contains("ShareLinkTokenInvalid") || result.contains("InvalidParameterNotMatch")) return refreshShareToken();
|
||||
if (result.contains("UserDeviceOffline") || result.contains("UserDeviceIllegality") || result.contains("DeviceSessionSignatureInvalid")) return refreshSignature();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -149,11 +150,6 @@ public class API {
|
|||
return false;
|
||||
}
|
||||
|
||||
private boolean checkSign(String result) {
|
||||
if (result.contains("UserDeviceOffline") || result.contains("UserDeviceIllegality") || result.contains("DeviceSessionSignatureInvalid")) return refreshSignature();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void checkAccessToken() {
|
||||
if (auth.getAccessToken().isEmpty()) refreshAccessToken();
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
cd0e21fc175ab24e9f754ec27ee15f27
|
||||
ed850893fd0c94513677e7b98cc741a8
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;cd0e21fc175ab24e9f754ec27ee15f27",
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ed850893fd0c94513677e7b98cc741a8",
|
||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||
"lives": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;cd0e21fc175ab24e9f754ec27ee15f27",
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ed850893fd0c94513677e7b98cc741a8",
|
||||
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
||||
"lives": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue