Skip to content

Commit

Permalink
fix #491
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jan 4, 2024
1 parent 76c58db commit 53d3519
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion SoraStream/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties

// use an integer for version numbers
version = 212
version = 213

android {
defaultConfig {
Expand Down
5 changes: 0 additions & 5 deletions SoraStream/src/main/kotlin/com/hexated/Extractors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
31 changes: 20 additions & 11 deletions SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class SoraStreamPlugin: Plugin() {
registerExtractorAPI(Wishfast())
registerExtractorAPI(Uploadever())
registerExtractorAPI(Netembed())
registerExtractorAPI(Vidplay2())
registerExtractorAPI(Flaswish())
registerExtractorAPI(Comedyshow())
}
Expand Down

0 comments on commit 53d3519

Please sign in to comment.