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
|
||||
version = 10
|
||||
version = 11
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package com.hexated
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.SubtitleFile
|
||||
import com.lagradost.cloudstream3.app
|
||||
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
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
|
||||
open class Mitedrive : ExtractorApi() {
|
||||
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())
|
||||
registerExtractorAPI(Mitedrive())
|
||||
registerExtractorAPI(Berkasdrive())
|
||||
registerExtractorAPI(Videogami())
|
||||
}
|
||||
}
|
|
@ -1065,9 +1065,9 @@ fun vidsrctoDecrypt(text: String): String {
|
|||
}
|
||||
|
||||
fun String?.createSlug(): String? {
|
||||
return this?.replace(Regex("[^\\w\\s-]"), "")
|
||||
?.replace(" ", "-")
|
||||
?.replace(Regex("( – )|( -)|(- )|(--)"), "-")
|
||||
return this?.filter { it.isWhitespace() || it.isLetterOrDigit() }
|
||||
?.trim()
|
||||
?.replace("\\s+".toRegex(), "-")
|
||||
?.lowercase()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue