FLIX VISION v2.8.2版本的 MD5 值为:4c8f04d6db90386313134c0796491235
以下内容为反编译后的 i.java 源代码,内容仅作参考
package wb;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Handler;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import flix.com.vision.helpers.Constants;
import flix.com.vision.models.Movie;
import flix.com.vision.processors.english.BaseProcessor;
import ib.o;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Iterator;
import org.adblockplus.libadblockplus.android.webview.AdblockWebView;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jsoup.nodes.Element;
public final class i extends BaseProcessor {
public final Movie f19308f;
public int f19310h;
public int f19311i;
public final Context f19312j;
public String f19313k;
public AdblockWebView f19317o;
public final String f19309g = "https://rmz.cr";
public final ArrayList<String> f19314l = new ArrayList<>();
public int f19315m = 0;
public boolean f19316n = true;
public boolean f19318p = false;
public boolean f19319q = false;
public static class a {
public String f19320a;
}
public class b extends WebViewClient {
public class a implements ValueCallback<String> {
public a() {
}
@Override
public void onReceiveValue(String str) {
b bVar = b.this;
i.this.getClass();
if (str == null || str.length() < 100) {
return;
}
try {
String unescapeJava = StringEscapeUtils.unescapeJava(str);
if (unescapeJava.contains("Checking if the site connection is secure") || unescapeJava.contains("Checking your browser before accessing")) {
return;
}
i iVar = i.this;
if (iVar.f19316n) {
iVar.b(unescapeJava, true);
} else {
iVar.c(unescapeJava, true);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
}
public b() {
}
@Override
public void onPageFinished(WebView webView, String str) {
AdblockWebView adblockWebView;
super.onPageFinished(webView, str);
i iVar = i.this;
if (iVar.f19318p || (adblockWebView = iVar.f19317o) == null) {
return;
}
adblockWebView.evaluateJavascript("(function(){var el = document.documentElement; var xml = el.innerHTML; return xml;})()", new a());
}
}
public i(Context context, Movie movie, hb.e eVar) {
this.f19312j = context;
this.f19308f = movie;
this.f12420b = eVar;
EventBus.getDefault().register(this);
}
public static String parseLink(String str) {
try {
return str.split("--")[2].replace(">", "").trim().replace("<!", "").trim();
} catch (Exception unused) {
return null;
}
}
public final void b(String str, boolean z10) {
ArrayList<String> arrayList;
Movie movie = this.f19308f;
try {
Iterator<Element> it = ue.a.parse(str).getElementsByClass("title").iterator();
while (true) {
boolean hasNext = it.hasNext();
arrayList = this.f19314l;
if (!hasNext) {
break;
}
Element next = it.next();
String lowerCase = next.text().toLowerCase();
String attr = next.attr("href");
if (attr.contains("/release/") && !lowerCase.isEmpty()) {
String str2 = movie.getTitle() + StringUtils.SPACE + movie.getYear();
String replace = movie.getTitle().replace(":", "").replace(" - ", StringUtils.SPACE).replace("-", StringUtils.SPACE);
String str3 = replace + StringUtils.SPACE + movie.getYear();
String str4 = replace + " (" + movie.getYear() + ")";
if (cc.f.removeSpecialChars(lowerCase).toLowerCase().contains(cc.f.removeSpecialChars(movie.getTitle() + StringUtils.SPACE + this.f19313k).toLowerCase()) || lowerCase.contains(str3.toLowerCase()) || lowerCase.contains(str4.toLowerCase()) || lowerCase.contains(str2.toLowerCase())) {
if (attr.startsWith("/")) {
attr = this.f19309g + attr;
}
arrayList.add(attr);
}
}
}
if (arrayList.size() <= 0 || this.f19318p) {
return;
}
if (z10) {
this.f19316n = false;
this.f19317o.loadUrl(arrayList.get(this.f19315m));
this.f19315m++;
} else {
Iterator<String> it2 = arrayList.iterator();
while (it2.hasNext()) {
c(((ve.b) ue.a.connect(it2.next())).get().html(), false);
}
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
public final void c(String str, boolean z10) {
Iterator<Element> it = ue.a.parse(str).getElementsByTag("PRE").iterator();
while (it.hasNext()) {
Element next = it.next();
if (next.attr("class") != null && next.attr("class").length() > 0) {
o oVar = new o();
oVar.f13832o = false;
oVar.f13829l = true;
oVar.f13840w = true;
Element first = next.getElementsByTag("A").first();
if (first != null) {
oVar.f13838u = first.attr("href");
} else {
oVar.f13838u = parseLink(next.toString());
}
if (oVar.f13838u != null) {
try {
addLink(oVar);
} catch (Exception unused) {
}
}
}
}
if (z10) {
ArrayList<String> arrayList = this.f19314l;
if (arrayList.size() <= 0 || this.f19315m >= arrayList.size()) {
return;
}
this.f19316n = false;
this.f19317o.loadUrl(arrayList.get(this.f19315m));
this.f19315m++;
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(Constants.a aVar) {
this.f19318p = true;
EventBus.getDefault().unregister(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(a aVar) {
String str;
if (this.f19319q || aVar == null || (str = aVar.f19320a) == null) {
return;
}
this.f19319q = true;
try {
this.f19317o.loadUrl(str);
} catch (Exception unused) {
}
new Handler().postDelayed(new c(this, 2), 1000L);
}
public void process(int i10, int i11) {
String replace;
this.f19310h = i10;
this.f19311i = i11;
AdblockWebView adblockWebView = new AdblockWebView(this.f19312j);
this.f19317o = adblockWebView;
adblockWebView.setWebViewClient(new b());
this.f19317o.getSettings().setAllowContentAccess(true);
this.f19317o.getSettings().setJavaScriptEnabled(true);
this.f19313k = "S" + cc.f.formatSeasonnumber(this.f19310h) + "E" + cc.f.formatSeasonnumber(this.f19311i);
String str = this.f19308f.getTitle().replace("&", "") + StringUtils.SPACE + this.f19313k;
String n10 = a.b.n(new StringBuilder(), this.f19309g, "/search/");
try {
replace = URLEncoder.encode(str, StandardCharsets.UTF_8.toString());
} catch (Exception unused) {
replace = n10.replace(StringUtils.SPACE, "%20");
}
new h(this, o.a.d(n10, replace, "/releases")).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
}
}