mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Dutamovie
This commit is contained in:
parent
37e87fadbc
commit
acb64d221b
7 changed files with 19 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 23
|
version = 24
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -5,10 +5,9 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.httpsify
|
import com.lagradost.cloudstream3.utils.httpsify
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
|
||||||
open class DutaMovie : Gomov() {
|
class DutaMovie : Gomov() {
|
||||||
override var mainUrl = "https://tv5.dutamovie21.co"
|
override var mainUrl = "https://vip.dutamovie21.club"
|
||||||
override var name = "DutaMovie"
|
override var name = "DutaMovie"
|
||||||
override val imgAttr = "data-src"
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
"category/box-office/page/%d/" to "Box Office",
|
"category/box-office/page/%d/" to "Box Office",
|
||||||
"category/serial-tv/page/%d/" to "Serial TV",
|
"category/serial-tv/page/%d/" to "Serial TV",
|
||||||
|
|
|
@ -20,7 +20,6 @@ open class Gomov : MainAPI() {
|
||||||
TvType.TvSeries,
|
TvType.TvSeries,
|
||||||
TvType.AsianDrama
|
TvType.AsianDrama
|
||||||
)
|
)
|
||||||
open val imgAttr = "src"
|
|
||||||
private val sources = arrayOf("https://chillx.top", "https://watchx.top", "https://bestx.stream")
|
private val sources = arrayOf("https://chillx.top", "https://watchx.top", "https://bestx.stream")
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
|
@ -47,7 +46,7 @@ open class Gomov : MainAPI() {
|
||||||
private fun Element.toSearchResult(): SearchResponse? {
|
private fun Element.toSearchResult(): SearchResponse? {
|
||||||
val title = this.selectFirst("h2.entry-title > a")?.text()?.trim() ?: return null
|
val title = this.selectFirst("h2.entry-title > a")?.text()?.trim() ?: return null
|
||||||
val href = fixUrl(this.selectFirst("a")!!.attr("href"))
|
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("-", "")
|
val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "")
|
||||||
return if (quality.isEmpty()) {
|
return if (quality.isEmpty()) {
|
||||||
val episode =
|
val episode =
|
||||||
|
@ -68,7 +67,7 @@ open class Gomov : MainAPI() {
|
||||||
private fun Element.toRecommendResult(): SearchResponse? {
|
private fun Element.toRecommendResult(): SearchResponse? {
|
||||||
val title = this.selectFirst("a > span.idmuvi-rp-title")?.text()?.trim() ?: return null
|
val title = this.selectFirst("a > span.idmuvi-rp-title")?.text()?.trim() ?: return null
|
||||||
val href = this.selectFirst("a")!!.attr("href")
|
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) {
|
return newMovieSearchResponse(title, href, TvType.Movie) {
|
||||||
this.posterUrl = posterUrl
|
this.posterUrl = posterUrl
|
||||||
}
|
}
|
||||||
|
@ -90,7 +89,7 @@ open class Gomov : MainAPI() {
|
||||||
document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim()
|
document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim()
|
||||||
.toString()
|
.toString()
|
||||||
val poster =
|
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 tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() }
|
||||||
|
|
||||||
val year =
|
val year =
|
||||||
|
@ -158,7 +157,7 @@ open class Gomov : MainAPI() {
|
||||||
if(id.isNullOrEmpty()) {
|
if(id.isNullOrEmpty()) {
|
||||||
document.select("ul.muvipro-player-tabs li a").apmap { ele ->
|
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")
|
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 {
|
when {
|
||||||
sources.any { iframe.startsWith(it) } -> NineTv.getUrl(iframe, "$directUrl/", subtitleCallback, callback)
|
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? {
|
fun String?.fixImageQuality(): String? {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.hexated
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.mainPageOf
|
import com.lagradost.cloudstream3.mainPageOf
|
||||||
|
|
||||||
class Multiplex : DutaMovie() {
|
class Multiplex : Gomov() {
|
||||||
override var mainUrl = "http://5.104.81.46"
|
override var mainUrl = "http://5.104.81.46"
|
||||||
override var name = "Multiplex"
|
override var name = "Multiplex"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.hexated
|
||||||
import com.lagradost.cloudstream3.mainPageOf
|
import com.lagradost.cloudstream3.mainPageOf
|
||||||
|
|
||||||
class Ngefilm : Gomov() {
|
class Ngefilm : Gomov() {
|
||||||
override var mainUrl = "https://nge-film21.cyou"
|
override var mainUrl = "https://nge-film.xyz"
|
||||||
override var name = "Ngefilm"
|
override var name = "Ngefilm"
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
|
|
|
@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
class Nodrakorid : DutaMovie() {
|
class Nodrakorid : Gomov() {
|
||||||
override var mainUrl = "https://no-drakor.xyz"
|
override var mainUrl = "https://no-drakor.xyz"
|
||||||
override var name = "Nodrakorid"
|
override var name = "Nodrakorid"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.TvSeriesLoadResponse
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
|
||||||
class Pusatfilm : Gomov() {
|
class Pusatfilm : Gomov() {
|
||||||
override var mainUrl = "https://tv.pusatfilm21.wiki"
|
override var mainUrl = "https://pusatfilm21.art"
|
||||||
override var name = "Pusatfilm"
|
override var name = "Pusatfilm"
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
|
|
Loading…
Reference in a new issue