Kickassanime: added Pinkbird

This commit is contained in:
hexated 2023-02-08 12:17:32 +07:00
parent b31a4c92e4
commit 44c720c8c7
3 changed files with 37 additions and 1 deletions

View file

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

View file

@ -6,6 +6,7 @@ import com.hexated.KickassanimeExtractor.invokeBeta
import com.hexated.KickassanimeExtractor.invokeDailymotion import com.hexated.KickassanimeExtractor.invokeDailymotion
import com.hexated.KickassanimeExtractor.invokeGogo import com.hexated.KickassanimeExtractor.invokeGogo
import com.hexated.KickassanimeExtractor.invokeMave import com.hexated.KickassanimeExtractor.invokeMave
import com.hexated.KickassanimeExtractor.invokePinkbird
import com.hexated.KickassanimeExtractor.invokeSapphire import com.hexated.KickassanimeExtractor.invokeSapphire
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
@ -199,6 +200,9 @@ open class Kickassanime : MainAPI() {
name?.contains(Regex("(?i)(SAPPHIRE-DUCK)")) == true -> { name?.contains(Regex("(?i)(SAPPHIRE-DUCK)")) == true -> {
invokeSapphire(link, isDub, subtitleCallback, callback) invokeSapphire(link, isDub, subtitleCallback, callback)
} }
name?.contains(Regex("(?i)(PINK-BIRD)")) == true -> {
invokePinkbird(sourceName, link, callback)
}
else -> return@apmap null else -> return@apmap null
} }
} }
@ -351,6 +355,15 @@ open class Kickassanime : MainAPI() {
@JsonProperty("subtitles") val subtitles: ArrayList<SapphireSubtitles>? = arrayListOf(), @JsonProperty("subtitles") val subtitles: ArrayList<SapphireSubtitles>? = arrayListOf(),
) )
data class PinkbirdSources(
@JsonProperty("data") val data: ArrayList<PinkbirdData>? = null,
)
data class PinkbirdData(
@JsonProperty("eid") val eid: String? = null,
@JsonProperty("lh") val lh: String? = null,
)
data class SyncTitle( data class SyncTitle(
@JsonProperty("romaji") val romaji: String? = null, @JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null, @JsonProperty("english") val english: String? = null,

View file

@ -8,6 +8,29 @@ import com.lagradost.cloudstream3.utils.*
import org.jsoup.Jsoup import org.jsoup.Jsoup
object KickassanimeExtractor : Kickassanime() { object KickassanimeExtractor : Kickassanime() {
suspend fun invokePinkbird(
name: String,
url: String? = null,
callback: (ExtractorLink) -> Unit
) {
val fixUrl = url?.replace(Regex("(player|embed)\\.php"), "pref.php")
app.get(fixUrl ?: return,
).parsedSafe<PinkbirdSources>()?.data?.map { source ->
val eid = base64Decode(source.eid ?: return@map null)
callback.invoke(
ExtractorLink(
name,
name,
"https://pb.kaast1.com/manifest/$eid/master.m3u8",
"$kaast/",
Qualities.P1080.value,
true
)
)
}
}
suspend fun invokeAlpha( suspend fun invokeAlpha(
name: String, name: String,
url: String? = null, url: String? = null,