mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Rebahin and moved Ngefilm
This commit is contained in:
parent
46c67dbd35
commit
864b266f9e
14 changed files with 76 additions and 234 deletions
|
@ -1,12 +1,12 @@
|
|||
// use an integer for version numbers
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
|
||||
cloudstream {
|
||||
language = "id"
|
||||
// All of these properties are optional, you can safely remove them
|
||||
|
||||
description = "Include: DutaMovie"
|
||||
description = "Include: DutaMovie, Ngefilm"
|
||||
authors = listOf("Hexated")
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,13 +8,6 @@ import com.lagradost.cloudstream3.utils.loadExtractor
|
|||
class DutaMovie : Gomov() {
|
||||
override var mainUrl = "https://dutamovie21.live"
|
||||
override var name = "DutaMovie"
|
||||
override val hasMainPage = true
|
||||
override var lang = "id"
|
||||
override val supportedTypes = setOf(
|
||||
TvType.Movie,
|
||||
TvType.TvSeries,
|
||||
TvType.AsianDrama
|
||||
)
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
"category/box-office/page/%d/" to "Box Office",
|
||||
|
|
|
@ -43,8 +43,8 @@ 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"))
|
||||
val quality = this.select("div.gmr-qual").text().trim()
|
||||
val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr("src"))?.fixImageQuality()
|
||||
val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "")
|
||||
return if (quality.isEmpty()) {
|
||||
val episode = this.select("div.gmr-numbeps > span").text().toIntOrNull()
|
||||
newAnimeSearchResponse(title, href, TvType.TvSeries) {
|
||||
|
@ -59,10 +59,10 @@ open class Gomov : MainAPI() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun Element.toBottomSearchResult(): SearchResponse? {
|
||||
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 = fixUrl(this.selectFirst("a > img")?.attr("data-src").toString())
|
||||
val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr("src").fixImageQuality())
|
||||
return newMovieSearchResponse(title, href, TvType.Movie) {
|
||||
this.posterUrl = posterUrl
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ open class Gomov : MainAPI() {
|
|||
document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.trim()
|
||||
.toString()
|
||||
val poster =
|
||||
fixUrl(document.selectFirst("figure.pull-left > img")?.attr("src").toString())
|
||||
fixUrlNull(document.selectFirst("figure.pull-left > img")?.attr("src"))?.fixImageQuality()
|
||||
val tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() }
|
||||
|
||||
val year =
|
||||
|
@ -97,7 +97,7 @@ open class Gomov : MainAPI() {
|
|||
?.map { it.select("a").text() }
|
||||
|
||||
val recommendations = document.select("div.idmuvi-rp ul li").mapNotNull {
|
||||
it.toBottomSearchResult()
|
||||
it.toRecommendResult()
|
||||
}
|
||||
|
||||
return if (tvType == TvType.TvSeries) {
|
||||
|
@ -109,7 +109,7 @@ open class Gomov : MainAPI() {
|
|||
Episode(
|
||||
href,
|
||||
name,
|
||||
season = season,
|
||||
season = if(name.contains(" ")) season else null,
|
||||
episode = episode,
|
||||
)
|
||||
}.filter { it.episode != null }
|
||||
|
@ -160,4 +160,11 @@ open class Gomov : MainAPI() {
|
|||
|
||||
}
|
||||
|
||||
private fun String?.fixImageQuality(): String? {
|
||||
if(this == null) return null
|
||||
val regex = Regex("(-\\d*x\\d*)").find(this)?.groupValues
|
||||
if(regex?.isEmpty() == true) return this
|
||||
return this.replace(regex?.get(0) ?: return null, "")
|
||||
}
|
||||
|
||||
}
|
|
@ -11,6 +11,7 @@ class GomovPlugin: Plugin() {
|
|||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||
registerMainAPI(Gomov())
|
||||
registerMainAPI(DutaMovie())
|
||||
registerMainAPI(Ngefilm())
|
||||
registerExtractorAPI(Filelions())
|
||||
registerExtractorAPI(Likessb())
|
||||
registerExtractorAPI(DbGdriveplayer())
|
||||
|
|
40
Gomov/src/main/kotlin/com/hexated/Ngefilm.kt
Normal file
40
Gomov/src/main/kotlin/com/hexated/Ngefilm.kt
Normal file
|
@ -0,0 +1,40 @@
|
|||
package com.hexated
|
||||
|
||||
import com.lagradost.cloudstream3.SubtitleFile
|
||||
import com.lagradost.cloudstream3.apmap
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.fixUrl
|
||||
import com.lagradost.cloudstream3.mainPageOf
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
|
||||
class Ngefilm : Gomov() {
|
||||
override var mainUrl = "https://ngefilm21.lol"
|
||||
override var name = "Ngefilm"
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
"/page/%d/?s&search=advanced&post_type=movie&index&orderby&genre&movieyear&country&quality=" to "Movies Terbaru",
|
||||
"/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=&movieyear=&country=&quality=" to "Series Terbaru",
|
||||
"/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=drakor&movieyear=&country=&quality=" to "Series Korea",
|
||||
"/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=&movieyear=&country=indonesia&quality=" to "Series Indonesia",
|
||||
)
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
|
||||
val document = app.get(data).document
|
||||
document.select("ul.muvipro-player-tabs li a").apmap { server ->
|
||||
val iframe = app.get(fixUrl(server.attr("href"))).document.selectFirst("div.gmr-embed-responsive iframe")
|
||||
?.attr("src")?.let { fixUrl(it) } ?: return@apmap
|
||||
loadExtractor(iframe, "$mainUrl/", subtitleCallback, callback)
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue