Update alist api url

pull/69/head
FongMi 3 years ago
parent b2f3e1b6b0
commit 8b9c88e03e
  1. 1
      app/proguard-rules.pro
  2. 11
      app/src/main/java/com/github/catvod/ali/API.java
  3. 16
      app/src/main/java/com/github/catvod/spider/Wogg.java
  4. BIN
      jar/custom_spider.jar
  5. 2
      jar/custom_spider.jar.md5

@ -37,6 +37,7 @@
-keep class net.engio.mbassy.** { *; }
# Zxing
-keep class com.google.zxing.** { *; }
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);

@ -5,7 +5,6 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.Gravity;
@ -235,7 +234,7 @@ public class API {
JSONObject body = new JSONObject();
body.put("code", code);
body.put("grant_type", "authorization_code");
return alist("https://api-cf.nn.ci/alist/ali_open/code", body);
return alist("https://api.xhofe.top/alist/ali_open/code", body);
} catch (Exception e) {
e.printStackTrace();
oauth.clean().save();
@ -250,7 +249,7 @@ public class API {
JSONObject body = new JSONObject();
body.put("grant_type", "refresh_token");
body.put("refresh_token", oauth.getRefreshToken());
return alist("https://api-cf.nn.ci/alist/ali_open/token", body);
return alist("https://api.xhofe.top/alist/ali_open/token", body);
} catch (Exception e) {
e.printStackTrace();
oauth.clean().save();
@ -532,9 +531,9 @@ public class API {
FrameLayout frame = new FrameLayout(Init.context());
params.gravity = Gravity.CENTER;
frame.addView(image, params);
AlertDialog.Builder builder = new AlertDialog.Builder(Init.getActivity()).setView(frame);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) builder.setOnDismissListener(this::dismiss);
dialog = builder.show();
dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).create();
dialog.setOnDismissListener(this::dismiss);
dialog.show();
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Init.show("請使用阿里雲盤 App 掃描二維碼");
} catch (Exception ignored) {

@ -20,7 +20,6 @@ import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author zhixc
*/
@ -30,7 +29,6 @@ public class Wogg extends Ali {
private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
private Map<String, String> getHeader() {
Map<String, String> header = new HashMap<>();
header.put("User-Agent", Utils.CHROME);
@ -42,6 +40,13 @@ public class Wogg extends Ali {
super.init(context, extend);
}
@Override
public String detailContent(List<String> ids) throws Exception {
Matcher matcher = regexAli.matcher(OkHttp.string(siteURL + ids.get(0), getHeader()));
if (matcher.find()) return super.detailContent(Arrays.asList(matcher.group(1)));
return "";
}
@Override
public String searchContent(String key, boolean quick) throws Exception {
String searchURL = siteURL + "/index.php/vodsearch/-------------.html?wd=" + URLEncoder.encode(key);
@ -57,11 +62,4 @@ public class Wogg extends Ali {
}
return Result.string(list);
}
@Override
public String detailContent(List<String> ids) throws Exception {
Matcher matcher = regexAli.matcher(OkHttp.string(siteURL + ids.get(0), getHeader()));
if (matcher.find()) return super.detailContent(Arrays.asList(matcher.group(1)));
return "";
}
}

Binary file not shown.

@ -1 +1 @@
16f9147da64cbbc596831e87ebcafd79
16f80f13f3bd4b6fedfb3af5f5b3d3d0

Loading…
Cancel
Save