Nimegami: added Videogami

This commit is contained in:
Olivia 2024-01-26 02:21:19 +07:00
parent c4de07abb3
commit 25ab02c476
4 changed files with 24 additions and 10 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 10
version = 11
cloudstream {

View file

@ -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"
@ -80,3 +76,20 @@ 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)
}
}

View file

@ -12,5 +12,6 @@ class NimegamiPlugin: Plugin() {
registerMainAPI(Nimegami())
registerExtractorAPI(Mitedrive())
registerExtractorAPI(Berkasdrive())
registerExtractorAPI(Videogami())
}
}

View file

@ -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()
}