diff --git a/Gomov/build.gradle.kts b/Gomov/build.gradle.kts index 57421c19..d06d6c36 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 = 23 +version = 24 android { defaultConfig { diff --git a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt index 5582a152..89a3d37f 100644 --- a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt +++ b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt @@ -5,10 +5,9 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.loadExtractor -open class DutaMovie : Gomov() { - override var mainUrl = "https://tv5.dutamovie21.co" +class DutaMovie : Gomov() { + override var mainUrl = "https://vip.dutamovie21.club" 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 5e6b95af..948686b9 100644 --- a/Gomov/src/main/kotlin/com/hexated/Gomov.kt +++ b/Gomov/src/main/kotlin/com/hexated/Gomov.kt @@ -20,7 +20,6 @@ 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 +46,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(imgAttr))?.fixImageQuality() + val posterUrl = fixUrlNull(this.selectFirst("a > img").getImgAttr()).fixImageQuality() val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "") return if (quality.isEmpty()) { val episode = @@ -68,7 +67,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(imgAttr).fixImageQuality()) + val posterUrl = fixUrlNull(this.selectFirst("a > img").getImgAttr().fixImageQuality()) return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } @@ -90,7 +89,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(imgAttr))?.fixImageQuality() + fixUrlNull(document.selectFirst("figure.pull-left > img").getImgAttr())?.fixImageQuality() val tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() } val year = @@ -158,7 +157,7 @@ open class Gomov : MainAPI() { if(id.isNullOrEmpty()) { document.select("ul.muvipro-player-tabs li a").apmap { ele -> val iframe = app.get(fixUrl(ele.attr("href"))).document.selectFirst("div.gmr-embed-responsive iframe") - ?.attr("src")?.let { httpsify(it) } ?: return@apmap + .getIframeAttr()?.let { httpsify(it) } ?: return@apmap when { sources.any { iframe.startsWith(it) } -> NineTv.getUrl(iframe, "$directUrl/", subtitleCallback, callback) @@ -188,6 +187,14 @@ open class Gomov : MainAPI() { } + private fun Element?.getImgAttr() : String? { + return this?.attr("data-src").takeIf { it?.isNotEmpty() == true } ?: this?.attr("src") + } + + private fun Element?.getIframeAttr() : String? { + return this?.attr("data-litespeed-src").takeIf { it?.isNotEmpty() == true } ?: this?.attr("src") + } + } fun String?.fixImageQuality(): String? { diff --git a/Gomov/src/main/kotlin/com/hexated/Multiplex.kt b/Gomov/src/main/kotlin/com/hexated/Multiplex.kt index e45af7d2..18b8db3b 100644 --- a/Gomov/src/main/kotlin/com/hexated/Multiplex.kt +++ b/Gomov/src/main/kotlin/com/hexated/Multiplex.kt @@ -2,7 +2,7 @@ package com.hexated import com.lagradost.cloudstream3.mainPageOf -class Multiplex : DutaMovie() { +class Multiplex : Gomov() { override var mainUrl = "http://5.104.81.46" override var name = "Multiplex" diff --git a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt index b30737d6..737d86a8 100644 --- a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt +++ b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt @@ -3,7 +3,7 @@ package com.hexated import com.lagradost.cloudstream3.mainPageOf class Ngefilm : Gomov() { - override var mainUrl = "https://nge-film21.cyou" + override var mainUrl = "https://nge-film.xyz" override var name = "Ngefilm" override val mainPage = mainPageOf( diff --git a/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt b/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt index 276623e5..db3a7845 100644 --- a/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt +++ b/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt @@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import org.jsoup.nodes.Element import java.net.URI -class Nodrakorid : DutaMovie() { +class Nodrakorid : Gomov() { override var mainUrl = "https://no-drakor.xyz" override var name = "Nodrakorid" diff --git a/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt b/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt index 005e5173..cbae93ce 100644 --- a/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt +++ b/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt @@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.TvSeriesLoadResponse import com.lagradost.cloudstream3.* class Pusatfilm : Gomov() { - override var mainUrl = "https://tv.pusatfilm21.wiki" + override var mainUrl = "https://pusatfilm21.art" override var name = "Pusatfilm" override val mainPage = mainPageOf(