mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
close #298
This commit is contained in:
parent
2b6a6a3879
commit
1da1ee362f
5 changed files with 93 additions and 6 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 = 20
|
version = 21
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -15,7 +15,7 @@ cloudstream {
|
||||||
language = "id"
|
language = "id"
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
description = "Includes: DutaMovie, Ngefilm, Nodrakorid, Multiplex"
|
description = "Includes: DutaMovie, Ngefilm, Nodrakorid, Multiplex, Pusatfilm"
|
||||||
authors = listOf("Hexated")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,16 +3,60 @@ package com.hexated
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.ErrorLoadingException
|
import com.lagradost.cloudstream3.ErrorLoadingException
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
|
import com.lagradost.cloudstream3.apmap
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
|
import com.lagradost.cloudstream3.base64Decode
|
||||||
import com.lagradost.cloudstream3.extractors.*
|
import com.lagradost.cloudstream3.extractors.*
|
||||||
import com.lagradost.cloudstream3.extractors.helper.AesHelper
|
import com.lagradost.cloudstream3.extractors.helper.AesHelper
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils
|
import com.lagradost.cloudstream3.utils.AppUtils
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.mozilla.javascript.Context
|
import org.mozilla.javascript.Context
|
||||||
import org.mozilla.javascript.Scriptable
|
import org.mozilla.javascript.Scriptable
|
||||||
|
|
||||||
|
open class Uplayer : ExtractorApi() {
|
||||||
|
override val name = "Uplayer"
|
||||||
|
override val mainUrl = "https://uplayer.xyz"
|
||||||
|
override val requiresReferer = true
|
||||||
|
|
||||||
|
override suspend fun getUrl(
|
||||||
|
url: String,
|
||||||
|
referer: String?,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
val res = app.get(url,referer=referer).text
|
||||||
|
val m3u8 = Regex("file:\\s*\"(.*?m3u8.*?)\"").find(res)?.groupValues?.getOrNull(1)
|
||||||
|
M3u8Helper.generateM3u8(
|
||||||
|
name,
|
||||||
|
m3u8 ?: return,
|
||||||
|
mainUrl
|
||||||
|
).forEach(callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Kotakajaib : ExtractorApi() {
|
||||||
|
override val name = "Kotakajaib"
|
||||||
|
override val mainUrl = "https://kotakajaib.me"
|
||||||
|
override val requiresReferer = true
|
||||||
|
|
||||||
|
override suspend fun getUrl(
|
||||||
|
url: String,
|
||||||
|
referer: String?,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
app.get(url,referer=referer).document.select("ul#dropdown-server li a").apmap {
|
||||||
|
loadExtractor(base64Decode(it.attr("data-frame")), "$mainUrl/", subtitleCallback, callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class Doods : DoodLaExtractor() {
|
class Doods : DoodLaExtractor() {
|
||||||
override var name = "Doods"
|
override var name = "Doods"
|
||||||
override var mainUrl = "https://doods.pro"
|
override var mainUrl = "https://doods.pro"
|
||||||
|
|
|
@ -191,10 +191,9 @@ open class Gomov : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun String?.fixImageQuality(): String? {
|
fun String?.fixImageQuality(): String? {
|
||||||
if(this == null) return null
|
if (this == null) return null
|
||||||
val regex = Regex("(-\\d*x\\d*)").find(this)?.groupValues
|
val regex = Regex("(-\\d*x\\d*)").find(this)?.groupValues?.get(0) ?: return this
|
||||||
if(regex?.isEmpty() == true) return this
|
return this.replace(regex, "")
|
||||||
return this.replace(regex?.get(0) ?: return null, "")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getBaseUrl(url: String): String {
|
fun getBaseUrl(url: String): String {
|
||||||
|
|
|
@ -14,6 +14,7 @@ class GomovPlugin: Plugin() {
|
||||||
registerMainAPI(Ngefilm())
|
registerMainAPI(Ngefilm())
|
||||||
registerMainAPI(Nodrakorid())
|
registerMainAPI(Nodrakorid())
|
||||||
registerMainAPI(Multiplex())
|
registerMainAPI(Multiplex())
|
||||||
|
registerMainAPI(Pusatfilm())
|
||||||
registerExtractorAPI(FilelionsTo())
|
registerExtractorAPI(FilelionsTo())
|
||||||
registerExtractorAPI(Likessb())
|
registerExtractorAPI(Likessb())
|
||||||
registerExtractorAPI(DbGdriveplayer())
|
registerExtractorAPI(DbGdriveplayer())
|
||||||
|
@ -22,5 +23,7 @@ class GomovPlugin: Plugin() {
|
||||||
registerExtractorAPI(Doods())
|
registerExtractorAPI(Doods())
|
||||||
registerExtractorAPI(Lylxan())
|
registerExtractorAPI(Lylxan())
|
||||||
registerExtractorAPI(FilelionsOn())
|
registerExtractorAPI(FilelionsOn())
|
||||||
|
registerExtractorAPI(Kotakajaib())
|
||||||
|
registerExtractorAPI(Uplayer())
|
||||||
}
|
}
|
||||||
}
|
}
|
41
Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt
Normal file
41
Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
package com.hexated
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.Episode
|
||||||
|
import com.lagradost.cloudstream3.LoadResponse
|
||||||
|
import com.lagradost.cloudstream3.TvSeriesLoadResponse
|
||||||
|
import com.lagradost.cloudstream3.*
|
||||||
|
|
||||||
|
class Pusatfilm : Gomov() {
|
||||||
|
override var mainUrl = "https://tv.pusatfilm21.wiki"
|
||||||
|
override var name = "Pusatfilm"
|
||||||
|
|
||||||
|
override val mainPage = mainPageOf(
|
||||||
|
"film-terbaru/page/%d/" to "Film Terbaru",
|
||||||
|
"series-terbaru/page/%d/" to "Series Terbaru",
|
||||||
|
"drama-korea/page/%d/" to "Drama Korea",
|
||||||
|
"drama-china/page/%d/" to "Drama China",
|
||||||
|
)
|
||||||
|
|
||||||
|
override suspend fun load(url: String): LoadResponse {
|
||||||
|
return super.load(url).apply {
|
||||||
|
when (this) {
|
||||||
|
is TvSeriesLoadResponse -> {
|
||||||
|
val document = app.get(url).document
|
||||||
|
this.episodes = document.select("div.vid-episodes a, div.gmr-listseries a").map { eps ->
|
||||||
|
val href = fixUrl(eps.attr("href"))
|
||||||
|
val name = eps.attr("title")
|
||||||
|
val episode = "Episode\\s*(\\d+)".toRegex().find(name)?.groupValues?.get(1)
|
||||||
|
val season = "Season\\s*(\\d+)".toRegex().find(name)?.groupValues?.get(1)
|
||||||
|
Episode(
|
||||||
|
href,
|
||||||
|
name,
|
||||||
|
season = season?.toIntOrNull(),
|
||||||
|
episode = episode?.toIntOrNull(),
|
||||||
|
)
|
||||||
|
}.filter { it.episode != null }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue