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 // use an integer for version numbers
version = 17 version = 18
cloudstream { cloudstream {

View file

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

View file

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

View file

@ -124,20 +124,20 @@ open class Akamaicdn : ExtractorApi() {
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val res = app.get(url, referer = referer).document val res = app.get(url, referer = referer).document
val mapper = res.select("script:containsData(sniff)").last()?.data()?.substringAfter("sniff(") val mappers = res.selectFirst("script:containsData(sniff\\()")?.data()?.substringAfter("sniff(")
?.substringBefore(");")?.split(",")?.map { it.replace("\"", "").trim() } ?: return ?.substringBefore(");") ?: return
val ids = mappers.split(",").map { it.replace("\"", "") }
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
this.name, this.name,
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, url,
Qualities.Unknown.value, Qualities.Unknown.value,
isM3u8 = true, isM3u8 = true,
) )
) )
} }
} }
suspend fun invokeTwoEmbed( suspend fun invokeTwoEmbed(

View file

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

View file

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