whoops fix gateanime, and fix last build
This commit is contained in:
parent
1ec8892184
commit
7ece960847
4 changed files with 24 additions and 3 deletions
|
@ -15,6 +15,26 @@ import java.util.Base64
|
|||
import org.mozilla.javascript.Context
|
||||
import org.mozilla.javascript.Scriptable
|
||||
|
||||
fun String.runJS(variableName: String): String {
|
||||
val rhino = Context.enter()
|
||||
rhino.initSafeStandardObjects()
|
||||
rhino.optimizationLevel = -1
|
||||
val scope: Scriptable = rhino.initSafeStandardObjects()
|
||||
val script = this
|
||||
val result: String
|
||||
try {
|
||||
var js = ""
|
||||
for (i in script.indices) {
|
||||
js += script[i]
|
||||
}
|
||||
rhino.evaluateString(scope, js, "JavaScript", 1, null)
|
||||
result = Context.toString(scope.get(variableName, scope))
|
||||
} finally {
|
||||
Context.exit()
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
class EgyBest : MainAPI() {
|
||||
override var lang = "ar"
|
||||
override var mainUrl = "https://www.egy.best"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version = 2
|
||||
version = 3
|
||||
|
||||
cloudstream {
|
||||
description = ""
|
||||
|
|
|
@ -44,8 +44,8 @@ class GateAnime : MainAPI() {
|
|||
}
|
||||
}
|
||||
override val mainPage = mainPageOf(
|
||||
"$mainUrl/الأفلام/page/" to "Anime Movies",
|
||||
"$mainUrl/المسلسلات/page/" to "Anime",
|
||||
"$mainUrl/movies/page/" to "Anime Movies",
|
||||
"$mainUrl/series/page/" to "Anime",
|
||||
"$mainUrl/category/مدبلج/page/" to "Dubbed"
|
||||
)
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ subprojects {
|
|||
implementation("com.github.Blatzar:NiceHttp:0.3.2") // http library
|
||||
implementation("org.jsoup:jsoup:1.13.1") // html parser
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.+")
|
||||
implementation("org.mozilla:rhino:1.7.14")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue