mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
commit
912f3f4efe
2 changed files with 27 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -25,6 +25,9 @@ class GomunimeProvider : MainAPI() {
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
|
private const val mainServer = "https://path.onicdn.xyz/app/rapi.php"
|
||||||
|
|
||||||
fun getType(t: String): TvType {
|
fun getType(t: String): TvType {
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
else if (t.contains("Movie")) TvType.AnimeMovie
|
||||||
|
@ -152,14 +155,16 @@ class GomunimeProvider : MainAPI() {
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val document = app.get(data).document
|
val document = app.get(data).document
|
||||||
|
|
||||||
val scriptData = document.select("aside.sidebar > script").dataNodes().toString()
|
val scriptData = document.select("aside.sidebar > script").dataNodes().toString()
|
||||||
val key = scriptData.substringAfter("var a_ray = '").substringBefore("';")
|
val key = scriptData.substringAfter("var a_ray = '").substringBefore("';")
|
||||||
val title = scriptData.substringAfter("var judul_postingan = \"").substringBefore("\";")
|
val title = scriptData.substringAfter("var judul_postingan = \"").substringBefore("\";")
|
||||||
|
.replace(" ", "+")
|
||||||
|
val image = document.select("img#tempvid").last()?.attr("src").toString()
|
||||||
|
|
||||||
val sources: List<Pair<String, String>> = app.post(
|
val sources: List<Pair<String, String>> = app.post(
|
||||||
url = "https://path.gomuni.me/app/vapi.php",
|
url = mainServer,
|
||||||
data = mapOf("data" to key, "judul" to title, "func" to "mirror")
|
data = mapOf("data" to key, "gambar" to image, "judul" to title, "func" to "mirror"),
|
||||||
|
referer = "$mainUrl/"
|
||||||
).document.select("div.gomunime-server-mirror").map {
|
).document.select("div.gomunime-server-mirror").map {
|
||||||
Pair(
|
Pair(
|
||||||
it.attr("data-vhash"),
|
it.attr("data-vhash"),
|
||||||
|
@ -171,24 +176,25 @@ class GomunimeProvider : MainAPI() {
|
||||||
safeApiCall {
|
safeApiCall {
|
||||||
when {
|
when {
|
||||||
it.second.contains("frame") -> {
|
it.second.contains("frame") -> {
|
||||||
loadExtractor(it.first, data, subtitleCallback, callback)
|
loadExtractor(it.first, mainUrl, subtitleCallback, callback)
|
||||||
}
|
|
||||||
it.second.contains("hls") -> {
|
|
||||||
app.post(
|
|
||||||
url = "https://path.gomuni.me/app/vapi.php",
|
|
||||||
data = mapOf("fid" to it.first, "func" to "hls")
|
|
||||||
).text.let { link ->
|
|
||||||
M3u8Helper.generateM3u8(
|
|
||||||
this.name,
|
|
||||||
link,
|
|
||||||
"$mainUrl/",
|
|
||||||
headers = mapOf("Origin" to mainUrl)
|
|
||||||
).forEach(callback)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// Skip for now
|
||||||
|
// it.second.contains("hls") -> {
|
||||||
|
// app.post(
|
||||||
|
// url = mainServer,
|
||||||
|
// data = mapOf("fid" to it.first, "func" to "hls")
|
||||||
|
// ).text.let { link ->
|
||||||
|
// M3u8Helper.generateM3u8(
|
||||||
|
// this.name,
|
||||||
|
// link,
|
||||||
|
// "$mainUrl/",
|
||||||
|
// headers = mapOf("Origin" to mainUrl)
|
||||||
|
// ).forEach(callback)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
it.second.contains("mp4") -> {
|
it.second.contains("mp4") -> {
|
||||||
app.post(
|
app.post(
|
||||||
url = "https://path.gomuni.me/app/vapi.php",
|
url = mainServer,
|
||||||
data = mapOf("data" to it.first, "func" to "blogs")
|
data = mapOf("data" to it.first, "func" to "blogs")
|
||||||
).parsed<List<MobiSource>>().map {
|
).parsed<List<MobiSource>>().map {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
|
|
Loading…
Reference in a new issue