added tracker into Neonime

This commit is contained in:
hexated 2022-11-26 13:18:51 +07:00
parent 81f8dcd4ca
commit 36c5a117c8
5 changed files with 87 additions and 42 deletions

View file

@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.httpsify
import com.lagradost.cloudstream3.utils.loadExtractor
import com.lagradost.nicehttp.NiceResponse
import org.jsoup.Jsoup
@ -186,13 +187,13 @@ class AnimeIndoProvider : MainAPI() {
document.select("div.itemleft > .mirror > option").mapNotNull {
fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src"))
}.apmap {
if (it.startsWith("https://uservideo.xyz")) {
if (it.startsWith("https://uservideo.xyz") || it.startsWith(mainUrl)) {
app.get(it, referer = "$mainUrl/").document.select("iframe").attr("src")
} else {
it
}
}.apmap {
loadExtractor(it, data, subtitleCallback, callback)
loadExtractor(httpsify(it), data, subtitleCallback, callback)
}
return true