FLIX VISION v2.8.2版本的 MD5 值为:4c8f04d6db90386313134c0796491235

以下内容为反编译后的 e.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.App;
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 e extends BaseProcessor {

    public final Movie f19276f;

    public int f19278h;

    public int f19279i;

    public final Context f19280j;

    public String f19281k;

    public AdblockWebView f19286p;

    public final String f19277g = "https://www.scnsrc.me";

    public final ArrayList<String> f19282l = new ArrayList<>();

    public int f19283m = 0;

    public boolean f19284n = true;

    public int f19285o = 0;

    public boolean f19287q = false;

    public boolean f19288r = false;

    public static class a {

        public String f19289a;
    }

    public class b extends WebViewClient {

        public class a implements ValueCallback<String> {
            public a() {
            }

            @Override
            public void onReceiveValue(String str) {
                b bVar = b.this;
                e.this.getClass();
                if (str == null || str.length() < 100) {
                    return;
                }
                try {
                    String unescapeJava = StringEscapeUtils.unescapeJava(str);
                    if (unescapeJava.contains("Just a moment...") || unescapeJava.contains("Checking if the site connection is secure") || unescapeJava.contains("Checking your browser before accessing")) {
                        return;
                    }
                    e eVar = e.this;
                    if (eVar.f19284n) {
                        eVar.b(unescapeJava, true);
                    } else {
                        eVar.c(unescapeJava, true);
                    }
                } catch (Exception e10) {
                    e10.printStackTrace();
                }
            }
        }

        public b() {
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            AdblockWebView adblockWebView;
            super.onPageFinished(webView, str);
            e eVar = e.this;
            if (eVar.f19288r || (adblockWebView = eVar.f19286p) == null) {
                return;
            }
            adblockWebView.evaluateJavascript("(function(){var el = document.documentElement; var xml = el.innerHTML; return xml;})()", new a());
        }
    }

    public e(Context context, Movie movie, hb.e eVar) {
        this.f19280j = context;
        this.f19276f = movie;
        this.f12420b = eVar;
        EventBus.getDefault().register(this);
    }

    public final void b(String str, boolean z10) {
        ArrayList<String> arrayList;
        Movie movie = this.f19276f;
        try {
            Iterator<Element> it = ue.a.parse(str).getElementsByTag("A").iterator();
            while (true) {
                boolean hasNext = it.hasNext();
                arrayList = this.f19282l;
                if (!hasNext) {
                    break;
                }
                Element next = it.next();
                String lowerCase = next.text().toLowerCase();
                if (!lowerCase.isEmpty() && lowerCase.length() >= 12) {
                    String attr = next.attr("href");
                    String str2 = movie.getTitle() + StringUtils.SPACE + this.f19281k;
                    String replace = movie.getTitle().replace(":", "").replace(" - ", StringUtils.SPACE).replace("-", StringUtils.SPACE);
                    String str3 = replace + StringUtils.SPACE + this.f19281k;
                    String removeSpecialChars = cc.f.removeSpecialChars(movie.getTitle() + StringUtils.SPACE + this.f19281k);
                    String removeSpecialChars2 = cc.f.removeSpecialChars(lowerCase);
                    String str4 = replace.replace("&", StringUtils.SPACE) + StringUtils.SPACE + this.f19281k;
                    if (removeSpecialChars2.toLowerCase().contains(removeSpecialChars.toLowerCase()) || lowerCase.contains(str3.toLowerCase()) || lowerCase.contains(str4.toLowerCase()) || lowerCase.contains(str2.toLowerCase())) {
                        if (attr.startsWith("/")) {
                            attr = this.f19277g + attr;
                        }
                        arrayList.add(attr);
                    }
                }
            }
            if (arrayList.size() <= 0 || this.f19288r) {
                return;
            }
            if (z10) {
                this.f19284n = false;
                this.f19286p.loadUrl(arrayList.get(this.f19283m));
                this.f19283m++;
            } 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) {
        if (this.f19285o > 40) {
            return;
        }
        ArrayList arrayList = new ArrayList();
        Iterator<Element> it = ue.a.parse(str).getElementsByTag("A").iterator();
        while (it.hasNext()) {
            Element next = it.next();
            if (this.f19285o > 40) {
                return;
            }
            String attr = next.attr("href");
            if (!attr.startsWith("/") && !attr.contains(this.f19277g) && next.text().length() >= 10 && !attr.contains(".rar") && App.isRdSupported(attr)) {
                this.f19285o++;
                o oVar = new o();
                oVar.f13832o = false;
                oVar.f13833p = true;
                oVar.f13829l = true;
                oVar.f13840w = true;
                oVar.f13838u = attr;
                try {
                    addLink(oVar);
                    arrayList.add(oVar);
                } catch (Exception unused) {
                }
            }
        }
        if (z10) {
            ArrayList<String> arrayList2 = this.f19282l;
            if (arrayList2.size() <= 0 || this.f19283m >= 2 || arrayList2.size() <= 1) {
                return;
            }
            this.f19284n = false;
            this.f19286p.loadUrl(arrayList2.get(this.f19283m));
            this.f19283m++;
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onMessageEvent(Constants.a aVar) {
        this.f19288r = true;
        EventBus.getDefault().unregister(this);
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onMessageEvent(a aVar) {
        String str;
        if (this.f19287q || aVar == null || (str = aVar.f19289a) == null) {
            return;
        }
        this.f19287q = true;
        this.f19286p.loadUrl(str);
        new Handler().postDelayed(new c(this, 0), 1000L);
    }

    public void process(int i10, int i11) {
        String replace;
        this.f19278h = i10;
        this.f19279i = i11;
        AdblockWebView adblockWebView = new AdblockWebView(this.f19280j);
        this.f19286p = adblockWebView;
        adblockWebView.setWebViewClient(new b());
        this.f19286p.getSettings().setAllowContentAccess(true);
        this.f19286p.getSettings().setJavaScriptEnabled(true);
        this.f19281k = "S" + cc.f.formatSeasonnumber(this.f19278h) + "E" + cc.f.formatSeasonnumber(this.f19279i);
        String removeSpecialCharsKeepSpace = cc.f.removeSpecialCharsKeepSpace(this.f19276f.getTitle().replace("&", "") + StringUtils.SPACE + this.f19281k);
        String n10 = a.b.n(new StringBuilder(), this.f19277g, "/?s=");
        try {
            replace = URLEncoder.encode(removeSpecialCharsKeepSpace, StandardCharsets.UTF_8.toString());
        } catch (Exception unused) {
            replace = n10.replace(StringUtils.SPACE, "%20");
        }
        new d(this, a.b.C(n10, replace)).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
    }
}