diff --git a/DramaidProvider/build.gradle.kts b/DramaidProvider/build.gradle.kts index 476c5d00..1f5c51de 100644 --- a/DramaidProvider/build.gradle.kts +++ b/DramaidProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 9 +version = 10 cloudstream { diff --git a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt index 522b388f..dc661de4 100644 --- a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt +++ b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt @@ -203,8 +203,3 @@ open class DramaidProvider : MainAPI() { } -class Vanfem : XStreamCdn() { - override val name: String = "Vanfem" - override val mainUrl: String = "https://vanfem.com" -} - diff --git a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt index 536b3b2c..48444723 100644 --- a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt +++ b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt @@ -13,5 +13,6 @@ class DramaidProviderPlugin: Plugin() { registerMainAPI(Oppadrama()) registerExtractorAPI(Vanfem()) registerExtractorAPI(Filelions()) + registerExtractorAPI(Gcam()) } } \ No newline at end of file diff --git a/DramaidProvider/src/main/kotlin/com/hexated/Extractors.kt b/DramaidProvider/src/main/kotlin/com/hexated/Extractors.kt new file mode 100644 index 00000000..7c37eced --- /dev/null +++ b/DramaidProvider/src/main/kotlin/com/hexated/Extractors.kt @@ -0,0 +1,71 @@ +package com.hexated + +import com.fasterxml.jackson.annotation.JsonProperty +import com.lagradost.cloudstream3.APIHolder +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.extractors.Filesim +import com.lagradost.cloudstream3.extractors.XStreamCdn +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.M3u8Helper + +open class Gcam : ExtractorApi() { + override val name = "Gcam" + override val mainUrl = "https://gdrive.cam" + override val requiresReferer = true + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val response = app.get(url, referer = referer).text + val kaken = "kaken\\s*=\\s*\"(.*)\"".toRegex().find(response)?.groupValues?.get(1) + val json = app.get("https://cdn2.gdrive.cam/api/?${kaken ?: return}=&_=${APIHolder.unixTimeMS}").parsedSafe() + + json?.sources?.map { + M3u8Helper.generateM3u8( + name, + it.file ?: return@map, + "" + ).forEach(callback) + } + + json?.tracks?.map { + subtitleCallback.invoke( + SubtitleFile( + it.label ?: return@map, + it.file ?: return@map + ) + ) + } + + } + + data class Tracks( + @JsonProperty("file") val file: String? = null, + @JsonProperty("label") val label: String? = null, + ) + + data class Sources( + @JsonProperty("file") val file: String? = null, + ) + + data class Response( + @JsonProperty("sources") val sources: ArrayList? = arrayListOf(), + @JsonProperty("tracks") val tracks: ArrayList? = arrayListOf(), + ) + +} + +class Vanfem : XStreamCdn() { + override val name: String = "Vanfem" + override val mainUrl: String = "https://vanfem.com" +} + +class Filelions : Filesim() { + override val name = "Filelions" + override var mainUrl = "https://filelions.live" +} \ No newline at end of file diff --git a/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt b/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt index 8d8734e0..856f3674 100644 --- a/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt +++ b/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt @@ -5,9 +5,4 @@ import com.lagradost.cloudstream3.extractors.Filesim class Oppadrama : DramaidProvider() { override var mainUrl = "http://185.217.95.30" override var name = "Oppadrama" -} - -class Filelions : Filesim() { - override val name = "Filelions" - override var mainUrl = "https://filelions.live" } \ No newline at end of file diff --git a/Gomov/build.gradle.kts b/Gomov/build.gradle.kts index 6f185d1d..57421c19 100644 --- a/Gomov/build.gradle.kts +++ b/Gomov/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 22 +version = 23 android { defaultConfig { diff --git a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt index 08fbcbd2..5582a152 100644 --- a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt +++ b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt @@ -6,9 +6,9 @@ import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.loadExtractor open class DutaMovie : Gomov() { - override var mainUrl = "https://tv.dutamovie21.life" + override var mainUrl = "https://tv5.dutamovie21.co" override var name = "DutaMovie" - + override val imgAttr = "data-src" override val mainPage = mainPageOf( "category/box-office/page/%d/" to "Box Office", "category/serial-tv/page/%d/" to "Serial TV", diff --git a/Gomov/src/main/kotlin/com/hexated/Gomov.kt b/Gomov/src/main/kotlin/com/hexated/Gomov.kt index e342bed1..5e6b95af 100644 --- a/Gomov/src/main/kotlin/com/hexated/Gomov.kt +++ b/Gomov/src/main/kotlin/com/hexated/Gomov.kt @@ -20,7 +20,7 @@ open class Gomov : MainAPI() { TvType.TvSeries, TvType.AsianDrama ) - + open val imgAttr = "src" private val sources = arrayOf("https://chillx.top", "https://watchx.top", "https://bestx.stream") override val mainPage = mainPageOf( @@ -47,7 +47,7 @@ open class Gomov : MainAPI() { 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("src"))?.fixImageQuality() + val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr(imgAttr))?.fixImageQuality() val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "") return if (quality.isEmpty()) { val episode = @@ -68,7 +68,7 @@ open class Gomov : MainAPI() { private fun Element.toRecommendResult(): SearchResponse? { val title = this.selectFirst("a > span.idmuvi-rp-title")?.text()?.trim() ?: return null val href = this.selectFirst("a")!!.attr("href") - val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr("src").fixImageQuality()) + val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr(imgAttr).fixImageQuality()) return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } @@ -90,7 +90,7 @@ open class Gomov : MainAPI() { document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim() .toString() val poster = - fixUrlNull(document.selectFirst("figure.pull-left > img")?.attr("src"))?.fixImageQuality() + fixUrlNull(document.selectFirst("figure.pull-left > img")?.attr(imgAttr))?.fixImageQuality() val tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() } val year =