sora: fixed Kimcartoon

This commit is contained in:
hexated 2023-02-22 16:31:40 +07:00
parent 5e71686299
commit b6e3934593
2 changed files with 13 additions and 25 deletions

View file

@ -700,20 +700,7 @@ object SoraExtractor : SoraStream() {
fixUrl(iframe, kimcartoonAPI) fixUrl(iframe, kimcartoonAPI)
).document.selectFirst("div#divContentVideo iframe") ).document.selectFirst("div#divContentVideo iframe")
?.attr("src") ?: return ?.attr("src") ?: return
loadExtractor(source, "$kimcartoonAPI/", subtitleCallback) { link -> loadExtractor(source, "$kimcartoonAPI/", subtitleCallback, callback)
callback.invoke(
ExtractorLink(
"Kimcartoon",
"Kimcartoon",
link.url,
link.referer,
link.quality,
link.isM3u8,
link.headers,
link.extractorData
)
)
}
} }
suspend fun invokeSoraStream( suspend fun invokeSoraStream(
@ -953,17 +940,12 @@ object SoraExtractor : SoraStream() {
).parsedSafe<KisskhSources>()?.let { source -> ).parsedSafe<KisskhSources>()?.let { source ->
listOf(source.video, source.thirdParty).apmap { link -> listOf(source.video, source.thirdParty).apmap { link ->
if (link?.contains(".m3u8") == true) { if (link?.contains(".m3u8") == true) {
callback.invoke( M3u8Helper.generateM3u8(
ExtractorLink( "Kisskh",
"Kisskh", link,
"Kisskh", "$kissKhAPI/",
link, headers = mapOf("Origin" to kissKhAPI)
referer = "$kissKhAPI/", ).forEach(callback)
Qualities.P720.value,
true,
headers = mapOf("Origin" to kissKhAPI)
)
)
} else { } else {
loadExtractor( loadExtractor(
link?.substringBefore("=http") ?: return@apmap null, link?.substringBefore("=http") ?: return@apmap null,
@ -2641,6 +2623,11 @@ class Sblongvu : StreamSB() {
override var mainUrl = "https://sblongvu.com" override var mainUrl = "https://sblongvu.com"
} }
class Keephealth : StreamSB() {
override var name = "Kimcartoon"
override var mainUrl = "https://keephealth.info"
}
data class TitleSlug( data class TitleSlug(
val dotSlug: String? = null, val dotSlug: String? = null,
val spaceSlug: String? = null, val spaceSlug: String? = null,

View file

@ -13,5 +13,6 @@ class SoraStreamPlugin: Plugin() {
registerMainAPI(SoraStreamLite()) registerMainAPI(SoraStreamLite())
registerExtractorAPI(StreamM4u()) registerExtractorAPI(StreamM4u())
registerExtractorAPI(Sblongvu()) registerExtractorAPI(Sblongvu())
registerExtractorAPI(Keephealth())
} }
} }