diff --git a/.idea/misc.xml b/.idea/misc.xml index 94c587cc..60e5c5fe 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -20,7 +20,7 @@ - + diff --git a/app/src/main/java/euphoria/psycho/explorer/MainActivity.java b/app/src/main/java/euphoria/psycho/explorer/MainActivity.java index 1e2829ea..a80f6ce1 100644 --- a/app/src/main/java/euphoria/psycho/explorer/MainActivity.java +++ b/app/src/main/java/euphoria/psycho/explorer/MainActivity.java @@ -2,6 +2,7 @@ import android.app.Activity; import android.content.Context; +import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Process; @@ -13,8 +14,8 @@ import euphoria.psycho.downloader.DownloaderService; import euphoria.psycho.downloader.DownloaderTask; import euphoria.psycho.share.PreferenceShare; +import euphoria.psycho.share.StringShare; import euphoria.psycho.videos.Ck52; -import euphoria.psycho.videos.Porn91; import euphoria.psycho.videos.PornHub; import euphoria.psycho.videos.PornOne; import euphoria.psycho.videos.XiGua; @@ -154,7 +155,13 @@ public void onVideoUrl(String uri) { @Override public boolean shouldOverrideUrlLoading(String uri) { - if (Porn91.handle(uri, this)) { + if (StringShare.matchOne(new String[]{ + "/vodplay/[\\d-]+\\.html", + "https://91porn.com/view_video.php", + }, uri)) { + Intent starter = new Intent(this, WebActivity.class); + starter.putExtra("extra.URI", uri); + startActivity(starter); return true; } if (YouTube.handle(uri, this)) { diff --git a/app/src/main/java/euphoria/psycho/videos/Porn91.java b/app/src/main/java/euphoria/psycho/videos/Porn91.java index 05144875..e541b27e 100644 --- a/app/src/main/java/euphoria/psycho/videos/Porn91.java +++ b/app/src/main/java/euphoria/psycho/videos/Porn91.java @@ -21,7 +21,6 @@ public class Porn91 extends BaseExtractor { public Porn91(String inputUri, MainActivity mainActivity) { super(inputUri, mainActivity); } - // public void fetchVideoList(String uri) { // new Thread(() -> { // String response = getString(uri, null); @@ -68,7 +67,7 @@ protected String[] fetchVideoUri(String uri) { @Override protected void processVideo(String[] videoUris) { - if (videoUris.length > 0) { + if (videoUris.length < 2) { Toast.makeText(mMainActivity, "无法解析视频", Toast.LENGTH_LONG).show(); return; }