From 471a1703a335e7bf6061dc71f4887a0fdded2bda Mon Sep 17 00:00:00 2001 From: hexated Date: Sun, 3 Sep 2023 09:12:38 +0700 Subject: [PATCH] fix #245 --- Gomov/build.gradle.kts | 4 +- .../main/kotlin/com/hexated/GomovPlugin.kt | 1 + .../src/main/kotlin/com/hexated/Multiplex.kt | 15 ++ Minioppai/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 5 + .../kotlin/com/hexated/MinioppaiPlugin.kt | 1 + MultiplexProvider/build.gradle.kts | 27 --- .../src/main/AndroidManifest.xml | 2 - .../kotlin/com/hexated/MultiplexProvider.kt | 188 ------------------ .../com/hexated/MultiplexProviderPlugin.kt | 14 -- OploverzProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 45 +++++ .../kotlin/com/hexated/OploverzProvider.kt | 2 +- .../com/hexated/OploverzProviderPlugin.kt | 1 + 14 files changed, 73 insertions(+), 236 deletions(-) create mode 100644 Gomov/src/main/kotlin/com/hexated/Multiplex.kt delete mode 100644 MultiplexProvider/build.gradle.kts delete mode 100644 MultiplexProvider/src/main/AndroidManifest.xml delete mode 100644 MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProvider.kt delete mode 100644 MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProviderPlugin.kt create mode 100644 OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt diff --git a/Gomov/build.gradle.kts b/Gomov/build.gradle.kts index 000dde9a..a811b0e8 100644 --- a/Gomov/build.gradle.kts +++ b/Gomov/build.gradle.kts @@ -1,12 +1,12 @@ // use an integer for version numbers -version = 9 +version = 10 cloudstream { language = "id" // All of these properties are optional, you can safely remove them - description = "Includes: DutaMovie, Ngefilm, Nodrakorid" + description = "Includes: DutaMovie, Ngefilm, Nodrakorid, Multiplex" authors = listOf("Hexated") /** diff --git a/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt b/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt index be1f392c..8ee692f2 100644 --- a/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt +++ b/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt @@ -13,6 +13,7 @@ class GomovPlugin: Plugin() { registerMainAPI(DutaMovie()) registerMainAPI(Ngefilm()) registerMainAPI(Nodrakorid()) + registerMainAPI(Multiplex()) registerExtractorAPI(FilelionsTo()) registerExtractorAPI(Likessb()) registerExtractorAPI(DbGdriveplayer()) diff --git a/Gomov/src/main/kotlin/com/hexated/Multiplex.kt b/Gomov/src/main/kotlin/com/hexated/Multiplex.kt new file mode 100644 index 00000000..e45af7d2 --- /dev/null +++ b/Gomov/src/main/kotlin/com/hexated/Multiplex.kt @@ -0,0 +1,15 @@ +package com.hexated + +import com.lagradost.cloudstream3.mainPageOf + +class Multiplex : DutaMovie() { + override var mainUrl = "http://5.104.81.46" + override var name = "Multiplex" + + override val mainPage = mainPageOf( + "country/usa/page/%d/" to "Movie", + "west-series/page/%d/" to "West Series", + "nonton-drama-korea/page/%d/" to "Drama Korea", + ) + +} \ No newline at end of file diff --git a/Minioppai/build.gradle.kts b/Minioppai/build.gradle.kts index 368ffe23..efcdc659 100644 --- a/Minioppai/build.gradle.kts +++ b/Minioppai/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 6 +version = 7 cloudstream { diff --git a/Minioppai/src/main/kotlin/com/hexated/Extractors.kt b/Minioppai/src/main/kotlin/com/hexated/Extractors.kt index 95b96d9e..de2f8520 100644 --- a/Minioppai/src/main/kotlin/com/hexated/Extractors.kt +++ b/Minioppai/src/main/kotlin/com/hexated/Extractors.kt @@ -16,6 +16,11 @@ class Paistream : Streampai() { override val mainUrl = "https://paistream.my.id" } +class TvMinioppai : Streampai() { + override val name = "Tv.Minioppai" + override val mainUrl = "https://tv.minioppai.org" +} + open class Streampai : ExtractorApi() { override val name = "Streampai" override val mainUrl = "https://streampai.my.id" diff --git a/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt b/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt index 83fbd781..5832d055 100644 --- a/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt +++ b/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt @@ -11,5 +11,6 @@ class MinioppaiPlugin: Plugin() { registerMainAPI(Minioppai()) registerExtractorAPI(Streampai()) registerExtractorAPI(Paistream()) + registerExtractorAPI(TvMinioppai()) } } \ No newline at end of file diff --git a/MultiplexProvider/build.gradle.kts b/MultiplexProvider/build.gradle.kts deleted file mode 100644 index 51ca5d94..00000000 --- a/MultiplexProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 2 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=146.19.24.137&sz=%size%" -} \ No newline at end of file diff --git a/MultiplexProvider/src/main/AndroidManifest.xml b/MultiplexProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/MultiplexProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProvider.kt b/MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProvider.kt deleted file mode 100644 index 7a76be91..00000000 --- a/MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProvider.kt +++ /dev/null @@ -1,188 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.getQualityFromName -import org.jsoup.nodes.Element - -class MultiplexProvider : MainAPI() { - override var mainUrl = "http://5.104.81.46" - override var name = "Multiplex" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.AsianDrama - ) - - override val mainPage = mainPageOf( - "$mainUrl/genre/top-popular-movies/page/" to "Top Popolar Movies", - "$mainUrl/genre/series-ongoing/page/" to "Series Ongoing", - "$mainUrl/genre/series-barat/page/" to "Series Barat", - "$mainUrl/genre/series-korea/page/" to "Series Korea", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("article.item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("h2.entry-title > a")?.text()?.trim() ?: return null - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr("data-src")) - val quality = this.select("div.gmr-quality-item > a").text().trim() - return if (quality.isEmpty()) { - val episode = this.select("div.gmr-numbeps > span").text().toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addSub(episode) - } - } else { - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - addQuality(quality) - } - } - } - - private fun Element.toBottomSearchResult(): SearchResponse? { - val title = this.selectFirst("a > span.idmuvi-rp-title")?.text()?.trim() ?: return null - val href = this.selectFirst("a")!!.attr("href") - val posterUrl = fixUrl(this.selectFirst("a > img")?.attr("data-src").toString()) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query&post_type[]=post&post_type[]=tv" - val document = app.get(link).document - return document.select("article.item").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = - document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.trim() - .toString() - val poster = - fixUrl(document.selectFirst("figure.pull-left > img")?.attr("data-src").toString()) - val tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() } - - val year = - document.select("span.gmr-movie-genre:contains(Year:) > a").text().trim().toIntOrNull() - val tvType = if (url.contains("/tv/")) TvType.TvSeries else TvType.Movie - val description = document.selectFirst("div[itemprop=description] > p")?.text()?.trim() - val trailer = document.selectFirst("ul.gmr-player-nav li a.gmr-trailer-popup")?.attr("href") - val rating = - document.selectFirst("div.gmr-meta-rating > span[itemprop=ratingValue]")?.text() - ?.toRatingInt() - val actors = document.select("div.gmr-moviedata").last()?.select("span[itemprop=actors]") - ?.map { it.select("a").text() } - - val recommendations = document.select("div.idmuvi-rp ul li").mapNotNull { - it.toBottomSearchResult() - } - - return if (tvType == TvType.TvSeries) { - val episodes = document.select("div.gmr-listseries > a").map { - val href = fixUrl(it.attr("href")) - val episode = it.text().split(" ").last().toIntOrNull() - val season = it.text().split(" ").first().substringAfter("S").toIntOrNull() - Episode( - href, - "Episode $episode", - season, - episode, - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - private data class ResponseSource( - @JsonProperty("file") val file: String, - @JsonProperty("type") val type: String?, - @JsonProperty("label") val label: String? - ) - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - - val id = document.selectFirst("div#muvipro_player_content_id")!!.attr("data-id") - val server = app.post( - "$mainUrl/wp-admin/admin-ajax.php", - data = mapOf("action" to "muvipro_player_content", "tab" to "player1", "post_id" to id) - ).document.select("iframe").attr("src") - - app.get(server, referer = "$mainUrl/").document.select("script").map { script -> - if (script.data().contains("var config = {")) { - val source = script.data().substringAfter("sources: [").substringBefore("],") - tryParseJson>("[$source]")?.map { m3u -> - val m3uData = app.get(m3u.file, referer = "https://gdriveplayer.link/").text - val quality = - Regex("\\d{3,4}\\.m3u8").findAll(m3uData).map { it.value }.toList() - quality.forEach { - callback.invoke( - ExtractorLink( - source = name, - name = name, - url = m3u.file.replace("video.m3u8", it), - referer = "https://gdriveplayer.link/", - quality = getQualityFromName("${it.replace(".m3u8", "")}p"), - isM3u8 = true - ) - ) - } - } - } - } - - return true - - } - - -} \ No newline at end of file diff --git a/MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProviderPlugin.kt b/MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProviderPlugin.kt deleted file mode 100644 index f689b83f..00000000 --- a/MultiplexProvider/src/main/kotlin/com/hexated/MultiplexProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class MultiplexProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(MultiplexProvider()) - } -} \ No newline at end of file diff --git a/OploverzProvider/build.gradle.kts b/OploverzProvider/build.gradle.kts index 036ff106..1f615de5 100644 --- a/OploverzProvider/build.gradle.kts +++ b/OploverzProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 21 +version = 22 cloudstream { diff --git a/OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt b/OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt new file mode 100644 index 00000000..c38c13b8 --- /dev/null +++ b/OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt @@ -0,0 +1,45 @@ +package com.hexated + +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class Qiwi : ExtractorApi() { + override val name = "Qiwi" + override val mainUrl = "https://qiwi.gg" + override val requiresReferer = true + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val document = app.get(url, referer = referer).document + val title = document.select("title").text() + val source = document.select("video source").attr("src") + + callback.invoke( + ExtractorLink( + this.name, + this.name, + source, + "$mainUrl/", + getIndexQuality(title), + headers = mapOf( + "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", + "Range" to "bytes=0-", + "Sec-Fetch-Dest" to "video", + "Sec-Fetch-Mode" to "no-cors", + ) + ) + ) + + } + + private fun getIndexQuality(str: String): Int { + return Regex("(\\d{3,4})[pP]").find(str)?.groupValues?.getOrNull(1)?.toIntOrNull() + ?: Qualities.Unknown.value + } + +} \ No newline at end of file diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt index 26cac833..042e62f8 100644 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt +++ b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt @@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.utils.* import org.jsoup.nodes.Element class OploverzProvider : MainAPI() { - override var mainUrl = "https://oploverz.team" + override var mainUrl = "https://oploverz.red" override var name = "Oploverz" override val hasMainPage = true override var lang = "id" diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt index 157869bd..ba7c0b85 100644 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt +++ b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt @@ -10,5 +10,6 @@ class OploverzProviderPlugin: Plugin() { override fun load(context: Context) { // All providers should be added in this manner. Please don't edit the providers list directly. registerMainAPI(OploverzProvider()) + registerExtractorAPI(Qiwi()) } } \ No newline at end of file