FLIX VISION v2.8.2版本的 MD5 值为:4d33b143293b36f23ce5a6a5834e6993
以下内容为反编译后的 g.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 g extends BaseProcessor {
public final Movie f19294f;
public final Context f19295g;
public AdblockWebView f19300l;
public final String f19296h = "https://rmz.cr";
public final ArrayList<String> f19297i = new ArrayList<>();
public int f19298j = 0;
public boolean f19299k = true;
public boolean f19301m = false;
public boolean f19302n = false;
public static class a {
public String f19303a;
}
public class b extends WebViewClient {
public class a implements ValueCallback<String> {
public a() {
}
@Override
public void onReceiveValue(String str) {
b bVar = b.this;
g.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;
}
g gVar = g.this;
if (gVar.f19299k) {
gVar.b(unescapeJava, true);
} else {
gVar.c(unescapeJava, true);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
}
public b() {
}
@Override
public void onPageFinished(WebView webView, String str) {
AdblockWebView adblockWebView;
super.onPageFinished(webView, str);
g gVar = g.this;
if (gVar.f19301m || (adblockWebView = gVar.f19300l) == null) {
return;
}
adblockWebView.evaluateJavascript("(function(){var el = document.documentElement; var xml = el.innerHTML; return xml;})()", new a());
}
}
public g(Context context, Movie movie, hb.e eVar) {
this.f19295g = context;
this.f19294f = 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;
String str2 = StringUtils.SPACE;
Movie movie = this.f19294f;
try {
Iterator<Element> it = ue.a.parse(str).getElementsByClass("title").iterator();
while (true) {
boolean hasNext = it.hasNext();
arrayList = this.f19297i;
if (!hasNext) {
break;
}
Element next = it.next();
String lowerCase = next.text().toLowerCase();
String attr = next.attr("href");
if (attr.contains("/release/") && !lowerCase.isEmpty()) {
String str3 = movie.getTitle() + str2 + movie.getYear();
String replace = movie.getTitle().replace(":", "").replace(" - ", str2).replace("-", str2);
String str4 = replace + str2 + movie.getYear();
String str5 = replace.replace("&", "and") + str2 + movie.getYear();
StringBuilder sb2 = new StringBuilder();
sb2.append(replace);
sb2.append(" (");
String str6 = str2;
sb2.append(movie.getYear());
sb2.append(")");
String sb3 = sb2.toString();
String str7 = replace.replace("&", "and") + " (" + movie.getYear() + ")";
if (lowerCase.contains(str4.toLowerCase()) || lowerCase.contains(str5.toLowerCase()) || lowerCase.contains(sb3.toLowerCase()) || lowerCase.contains(str7.toLowerCase()) || lowerCase.contains(str3.toLowerCase())) {
if (attr.startsWith("/")) {
attr = this.f19296h + attr;
}
arrayList.add(attr);
}
str2 = str6;
}
}
if (arrayList.size() <= 0 || this.f19301m) {
return;
}
if (z10) {
this.f19299k = false;
this.f19300l.loadUrl(arrayList.get(this.f19298j));
this.f19298j++;
} 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.f19297i;
if (arrayList.size() <= 0 || this.f19298j >= arrayList.size()) {
return;
}
this.f19299k = false;
this.f19300l.loadUrl(arrayList.get(this.f19298j));
this.f19298j++;
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(Constants.a aVar) {
this.f19301m = true;
EventBus.getDefault().unregister(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(a aVar) {
String str;
if (this.f19302n || aVar == null || (str = aVar.f19303a) == null) {
return;
}
this.f19302n = true;
try {
this.f19300l.loadUrl(str);
} catch (Exception unused) {
}
new Handler().postDelayed(new c(this, 1), 1000L);
}
public void process(int i10) {
String replace;
AdblockWebView adblockWebView = new AdblockWebView(this.f19295g);
this.f19300l = adblockWebView;
adblockWebView.setWebViewClient(new b());
this.f19300l.getSettings().setAllowContentAccess(true);
this.f19300l.getSettings().setJavaScriptEnabled(true);
String replace2 = this.f19294f.getTitle().replace("&", "");
String n10 = a.b.n(new StringBuilder(), this.f19296h, "/search/");
try {
replace = URLEncoder.encode(replace2, StandardCharsets.UTF_8.toString());
} catch (Exception unused) {
replace = n10.replace(StringUtils.SPACE, "%20");
}
new f(this, o.a.d(n10, replace, "/releases")).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
}
}