From dbab64a82baf03248978fbfc7fd0fa2dde1a91fc Mon Sep 17 00:00:00 2001 From: hexated Date: Mon, 19 Jun 2023 06:40:00 +0700 Subject: [PATCH] Aniworld & Oploverz: fix sources --- Aniworld/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Aniworld.kt | 11 ++++++++- .../main/kotlin/com/hexated/AniworldPlugin.kt | 2 ++ OploverzProvider/build.gradle.kts | 2 +- .../kotlin/com/hexated/OploverzProvider.kt | 24 +++++++++++++++++++ .../com/hexated/OploverzProviderPlugin.kt | 1 + 6 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Aniworld/build.gradle.kts b/Aniworld/build.gradle.kts index 5925a40c..2f78380f 100644 --- a/Aniworld/build.gradle.kts +++ b/Aniworld/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 2 +version = 3 cloudstream { diff --git a/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt b/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt index fa81d03a..f710cfc0 100644 --- a/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt +++ b/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt @@ -3,6 +3,7 @@ package com.hexated import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.extractors.DoodLaExtractor import com.lagradost.cloudstream3.extractors.Voe import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.ExtractorLink @@ -140,7 +141,7 @@ class Aniworld : MainAPI() { it.select("h4").text() ) }.filter { - it.third == "VOE" + it.third != "Vidoza" }.apmap { val redirectUrl = app.get(fixUrl(it.second)).url loadExtractor(redirectUrl, data, subtitleCallback) { link -> @@ -184,6 +185,14 @@ class Aniworld : MainAPI() { } +class Dooood : DoodLaExtractor() { + override var mainUrl = "https://urochsunloath.com" +} + +class Simpulumlamerop : Voe() { + override var mainUrl = "https://simpulumlamerop.com" +} + class Urochsunloath : Voe() { override var mainUrl = "https://urochsunloath.com" } \ No newline at end of file diff --git a/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt b/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt index 1e161d8f..b70bad8f 100644 --- a/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt +++ b/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt @@ -11,5 +11,7 @@ class AniworldPlugin: Plugin() { // All providers should be added in this manner. Please don't edit the providers list directly. registerMainAPI(Aniworld()) registerExtractorAPI(Urochsunloath()) + registerExtractorAPI(Simpulumlamerop()) + registerExtractorAPI(Dooood()) } } \ No newline at end of file diff --git a/OploverzProvider/build.gradle.kts b/OploverzProvider/build.gradle.kts index 1be043df..e71f3970 100644 --- a/OploverzProvider/build.gradle.kts +++ b/OploverzProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 17 +version = 18 cloudstream { diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt index 7d00e9f1..48c51b87 100644 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt +++ b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt @@ -263,3 +263,27 @@ class Streamhide : Filesim() { override val mainUrl = "https://streamhide.to" override val name = "Streamhide" } + +open class Pixeldrain : ExtractorApi() { + override val name = "Pixeldrain" + override val mainUrl = "https://pixeldrain.com" + override val requiresReferer = false + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val mId = Regex("/([ul]/[\\da-zA-Z\\-]+)").find(url)?.groupValues?.get(1)?.split("/") + callback.invoke( + ExtractorLink( + this.name, + this.name, + "$mainUrl/api/file/${mId?.last() ?: return}?download", + url, + Qualities.Unknown.value, + ) + ) + } + +} diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt index dfba47b4..4f313881 100644 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt +++ b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt @@ -11,5 +11,6 @@ class OploverzProviderPlugin: Plugin() { // All providers should be added in this manner. Please don't edit the providers list directly. registerMainAPI(OploverzProvider()) registerExtractorAPI(Streamhide()) + registerExtractorAPI(Pixeldrain()) } } \ No newline at end of file