From 53d3519b8fff2e636e14aafc4453358453bb7eae Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 4 Jan 2024 15:29:33 +0700 Subject: [PATCH] fix #491 --- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 5 --- .../main/kotlin/com/hexated/SoraExtractor.kt | 31 ++++++++++++------- .../kotlin/com/hexated/SoraStreamPlugin.kt | 1 - 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index f157e2293..2bc22cc2e 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 212 +version = 213 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 1674ebc2b..880238b5c 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -396,11 +396,6 @@ class Embedwish : Filesim() { override val name = "Embedwish" override var mainUrl = "https://embedwish.com" } - -class Vidplay2 : Vidplay() { - override val mainUrl = "https://vidplay.online" -} - class Flaswish : Filesim() { override val name = "Flaswish" override var mainUrl = "https://flaswish.com" diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 5e556735a..8745e4e71 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -715,7 +715,7 @@ object SoraExtractor : SoraStream() { child.select("span").text().equals("Episode $episode", true) }?.attr("href") } - }.filter { it.first.contains(Regex("(2160p)|(1080p)")) } + }.filter { it.first.contains(Regex("(2160p)|(1080p)")) }.reversed().takeLast(3) iframeList.apmap { (quality, link) -> val driveLink = bypassHrefli(link ?: return@apmap) @@ -768,16 +768,25 @@ object SoraExtractor : SoraStream() { val hTag = if (season == null) "h5" else "h3" val aTag = if (season == null) "Download Now" else "V-Cloud" val sTag = if (season == null) "" else "(Season $season|S$seasonSlug)" - val entry = res.select("div.entry-content > $hTag:matches((?i)$sTag.*(1080p|2160p))").findLast { element -> !element.text().contains("Download", true) } - ?: return - val tags = """(?:1080p|2160p)(.*)""".toRegex().find(entry.text())?.groupValues?.get(1)?.trim() - val href = entry.nextElementSibling()?.select("a:contains($aTag)")?.attr("href") - val selector = if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" - val server = app.get(href - ?: return, interceptor = wpredisInterceptor).document.selectFirst("div.entry-content > $selector")?.attr("href") - ?: return - - loadCustomTagExtractor(tags, server, "$api/", subtitleCallback, callback, getIndexQuality(entry.text())) + val entries = res.select("div.entry-content > $hTag:matches((?i)$sTag.*(1080p|2160p))").filter { element -> !element.text().contains("Download", true) }.takeLast(2) + entries.apmap { + val tags = """(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim() + val href = it.nextElementSibling()?.select("a:contains($aTag)")?.attr("href") + val selector = if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" + val server = app.get( + href ?: return@apmap, interceptor = wpredisInterceptor + ).document.selectFirst("div.entry-content > $selector") + ?.attr("href") ?: return@apmap + + loadCustomTagExtractor( + tags, + server, + "$api/", + subtitleCallback, + callback, + getIndexQuality(it.text()) + ) + } } suspend fun invokeHdmovies4u(title: String? = null, imdbId: String? = null, season: Int? = null, episode: Int? = null, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt index c6cd296e7..d2456f6e0 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt @@ -28,7 +28,6 @@ class SoraStreamPlugin: Plugin() { registerExtractorAPI(Wishfast()) registerExtractorAPI(Uploadever()) registerExtractorAPI(Netembed()) - registerExtractorAPI(Vidplay2()) registerExtractorAPI(Flaswish()) registerExtractorAPI(Comedyshow()) }