mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Nimegami: added Videogami
This commit is contained in:
parent
c4de07abb3
commit
25ab02c476
4 changed files with 24 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 10
|
version = 11
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
package com.hexated
|
package com.hexated
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
|
||||||
|
|
||||||
open class Mitedrive : ExtractorApi() {
|
open class Mitedrive : ExtractorApi() {
|
||||||
override val name = "Mitedrive"
|
override val name = "Mitedrive"
|
||||||
|
@ -79,4 +75,21 @@ open class Berkasdrive : ExtractorApi() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Videogami : ExtractorApi() {
|
||||||
|
override val name = "Videogami"
|
||||||
|
override val mainUrl = "https://video.nimegami.id"
|
||||||
|
override val requiresReferer = false
|
||||||
|
|
||||||
|
override suspend fun getUrl(
|
||||||
|
url: String,
|
||||||
|
referer: String?,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
val id = base64Decode(url.substringAfter("url=")).substringAfterLast("/")
|
||||||
|
loadExtractor("https://hxfile.co/embed-$id.html", "$mainUrl/", subtitleCallback, callback)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -12,5 +12,6 @@ class NimegamiPlugin: Plugin() {
|
||||||
registerMainAPI(Nimegami())
|
registerMainAPI(Nimegami())
|
||||||
registerExtractorAPI(Mitedrive())
|
registerExtractorAPI(Mitedrive())
|
||||||
registerExtractorAPI(Berkasdrive())
|
registerExtractorAPI(Berkasdrive())
|
||||||
|
registerExtractorAPI(Videogami())
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1065,9 +1065,9 @@ fun vidsrctoDecrypt(text: String): String {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun String?.createSlug(): String? {
|
fun String?.createSlug(): String? {
|
||||||
return this?.replace(Regex("[^\\w\\s-]"), "")
|
return this?.filter { it.isWhitespace() || it.isLetterOrDigit() }
|
||||||
?.replace(" ", "-")
|
?.trim()
|
||||||
?.replace(Regex("( – )|( -)|(- )|(--)"), "-")
|
?.replace("\\s+".toRegex(), "-")
|
||||||
?.lowercase()
|
?.lowercase()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue