pull/585/head
FongMi 1 year ago
parent 97b3a90d52
commit 16187ecc39
  1. 9
      app/src/main/java/com/fongmi/android/tv/api/Decoder.java

@ -15,6 +15,7 @@ import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import okhttp3.HttpUrl;
import okhttp3.Response;
public class Decoder {
@ -22,8 +23,12 @@ public class Decoder {
private static final Pattern JS_URI = Pattern.compile("\"(\\.|\\.\\.)/(.?|.+?)\\.js\\?(.?|.+?)\"");
public static String getJson(String url) throws Exception {
Response res = OkHttp.newCall(UrlUtil.convert(url)).execute();
return verify(res.request().url().toString(), res.body().string());
url = UrlUtil.convert(url);
int size = HttpUrl.parse(url).querySize();
Response res = OkHttp.newCall(url).execute();
HttpUrl httpUrl = res.request().url();
if (httpUrl.querySize() == size) url = httpUrl.toString();
return verify(url, res.body().string());
}
private static String verify(String url, String data) throws Exception {

Loading…
Cancel
Save