fixed Aniworld

This commit is contained in:
hexated 2023-06-30 10:44:04 +07:00
parent fa3a705a4b
commit 55aa05ac5f

View file

@ -146,11 +146,12 @@ class Aniworld : MainAPI() {
it.third != "Vidoza"
}.apmap {
val redirectUrl = app.get(fixUrl(it.second)).url
val lang = it.first.getLanguage(document)
if (it.third == "VOE") {
invokeVoe(redirectUrl, data, callback)
invokeVoe(redirectUrl, lang, data, callback)
} else {
loadExtractor(redirectUrl, data, subtitleCallback) { link ->
val name = "${link.name} [${it.first.getLanguage(document)}]"
val name = "${link.name} [${lang}]"
callback.invoke(
ExtractorLink(
name,
@ -172,9 +173,11 @@ class Aniworld : MainAPI() {
private suspend fun invokeVoe(
url: String,
lang: String?,
referer: String,
callback: (ExtractorLink) -> Unit,
) {
val name = "Voe [${lang}]"
val request = app.get(url, referer = referer)
val baseUrl = getBaseUrl(request.url)
val res = request.document