anitubeinua: ass csst player

This commit is contained in:
CakesTwix 2023-02-28 19:34:23 +02:00
parent 04f489a627
commit 4677072d1c
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 44 additions and 0 deletions

View file

@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.extractors.csstExtractor
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
import java.util.*
@ -214,6 +215,20 @@ class AnitubeinuaProvider : MainAPI() {
referer = "https://qeruya.cyou"
).forEach(callback)
}
contains("https://csst.online/embed/") -> {
csstExtractor().ParseUrl(href).split(",").forEach{
callback.invoke(
ExtractorLink(
"$playerName ($dubName)",
name = "$playerName ($dubName) ${it.substringBefore("]").drop(1)}",
it.substringAfter("]"),
"",
0,
isM3u8 = false,
)
)
}
}
else -> {}
}
}
@ -249,6 +264,19 @@ class AnitubeinuaProvider : MainAPI() {
referer = "https://qeruya.cyou"
).forEach(callback)
}
contains("https://csst.online/embed/") -> {
callback.invoke(
ExtractorLink(
decode(playerNamesArray[index]),
name = decode(playerNamesArray[index]),
csstExtractor().ParseUrl(dub[dataList[0].toInt()].code).split(",")[0].substringAfter("]"),
"",
1,
isM3u8 = false
)
)
}
else -> {}
}
}

View file

@ -0,0 +1,16 @@
package com.lagradost.extractors
import android.util.Log
import com.lagradost.cloudstream3.app
class csstExtractor {
suspend fun ParseUrl(url: String): String{
val playerLinks = app.get(url).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
Log.d("load-debug", playerLinks)
return playerLinks
}
}