This commit is contained in:
helo 2023-10-21 04:40:44 +07:00
parent 4889f54f19
commit c954c59215
6 changed files with 17 additions and 19 deletions

View file

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

View file

@ -197,6 +197,7 @@ class KuramanimeProvider : MainAPI() {
val req = app.get(data)
val res = req.document
val token = res.select("meta[name=csrf-token]").attr("content")
val stRt = res.selectFirst("script:containsData(window\\.stRt)")?.data()?.substringAfter("stRt = \"")?.substringBefore("\"") ?: return false
headers = mapOf(
"X-Requested-With" to "XMLHttpRequest",
"X-CSRF-TOKEN" to token
@ -204,7 +205,7 @@ class KuramanimeProvider : MainAPI() {
cookies = req.cookies
res.select("select#changeServer option").apmap { source ->
val server = source.attr("value")
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getMisc()}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getMisc(stRt)}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
if (server.contains(Regex("(?i)kuramadrive|archive"))) {
invokeLocalSource(link, server, data, callback)
} else {
@ -222,10 +223,9 @@ class KuramanimeProvider : MainAPI() {
return true
}
private suspend fun getMisc() = misc ?: fetchMisc()
private suspend fun getMisc(url: String) = misc ?: fetchMisc(url)
private suspend fun fetchMisc(): String {
return app.post("$mainUrl/misc/post/fSbSQa7q5W8b9rhsGwu0KThQImPPQI2k", headers = headers, cookies = cookies).parsed()
private suspend fun fetchMisc(url: String): String {
return app.post(url, headers = headers, cookies = cookies).parsed()
}
}

View file

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

View file

@ -124,20 +124,20 @@ open class Akamaicdn : ExtractorApi() {
callback: (ExtractorLink) -> Unit
) {
val res = app.get(url, referer = referer).document
val mapper = res.select("script:containsData(sniff)").last()?.data()?.substringAfter("sniff(")
?.substringBefore(");")?.split(",")?.map { it.replace("\"", "").trim() } ?: return
val mappers = res.selectFirst("script:containsData(sniff\\()")?.data()?.substringAfter("sniff(")
?.substringBefore(");") ?: return
val ids = mappers.split(",").map { it.replace("\"", "") }
callback.invoke(
ExtractorLink(
this.name,
this.name,
"$mainUrl/m3u8/${mapper[1]}/${mapper[2]}/master.txt?s=1&cache=1",
"$mainUrl/m3u8/${ids[1]}/${ids[2]}/master.txt?s=1&cache=1",
url,
Qualities.Unknown.value,
isM3u8 = true,
)
)
}
}
suspend fun invokeTwoEmbed(

View file

@ -12,10 +12,8 @@ import org.jsoup.Jsoup
class Hdmovie2 : Movierulzhd() {
override var mainUrl = "https://hdmovie2.tel"
override var mainUrl = "https://hdmovie2.pink"
override var name = "Hdmovie2"
override val mainPage = mainPageOf(
"trending" to "Trending",
"movies" to "Movies",
@ -54,10 +52,10 @@ class Hdmovie2 : Movierulzhd() {
document.select("ul#playeroptionsul > li").map {
it.attr("data-nume")
}.apmap { nume ->
val source = app.get(
url = "$directUrl/wp-json/dooplayer/v2/${id}/${type}/${nume}",
referer = data,
headers = mapOf("X-Requested-With" to "XMLHttpRequest")
val source = app.post(
url = "$directUrl/wp-admin/admin-ajax.php", data = mapOf(
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
), referer = data, headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest")
).parsed<ResponseHash>().embed_url.getIframe()
when {
!source.contains("youtube") -> loadExtractor(

View file

@ -2031,7 +2031,7 @@ object SoraExtractor : SoraStream() {
episode,
callback,
movies123API,
"Movie123",
"Movies123",
"mouCgDQMxDwt",
"moFHVogrVLMH"
)