uakino: hotfix
This commit is contained in:
parent
84d5425a5d
commit
2aa931b0f6
1 changed files with 22 additions and 3 deletions
|
@ -142,8 +142,9 @@ class UakinoProvider : MainAPI() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
): Boolean {
|
): Boolean {
|
||||||
// TODO: OPTIMIZE code!!!
|
val dataList = data.split(",")
|
||||||
if(data.contains("https://uakino.club")){
|
// TODO: OPTIMIZE code!!! Remove this shitty code as soon as possible!!!!!!
|
||||||
|
if(dataList.size == 1){
|
||||||
val id = data.split("/").last().split("-").first()
|
val id = data.split("/").last().split("-").first()
|
||||||
val responseGet = app.get("$mainUrl/engine/ajax/playlists.php?news_id=$id&xfield=playlist&time=${Date().time}").parsedSafe<Responses>()
|
val responseGet = app.get("$mainUrl/engine/ajax/playlists.php?news_id=$id&xfield=playlist&time=${Date().time}").parsedSafe<Responses>()
|
||||||
if (responseGet?.success == true) { // Its serial
|
if (responseGet?.success == true) { // Its serial
|
||||||
|
@ -174,10 +175,28 @@ class UakinoProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Its maybe film
|
||||||
|
val document = app.get(data).document
|
||||||
|
val iframeUrl = document.selectFirst("iframe#pre")?.attr("src")
|
||||||
|
// Get m3u from player script
|
||||||
|
if (iframeUrl != null) {
|
||||||
|
app.get(iframeUrl, referer = "$mainUrl/").document.select("script").map { script ->
|
||||||
|
if (script.data().contains("var player = new Playerjs({")) {
|
||||||
|
val m3uLink = script.data().substringAfterLast("file:\"").substringBefore("\",")
|
||||||
|
|
||||||
|
// Add as source
|
||||||
|
M3u8Helper.generateM3u8(
|
||||||
|
source = document.selectFirst("h1 span.solototle")?.text()?.trim().toString(),
|
||||||
|
streamUrl = m3uLink,
|
||||||
|
referer = "https://ashdi.vip/"
|
||||||
|
).forEach(callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
val dataList = data.split(",")
|
|
||||||
|
|
||||||
val responseGet = app.get(dataList[0]).parsedSafe<Responses>() // ajax link
|
val responseGet = app.get(dataList[0]).parsedSafe<Responses>() // ajax link
|
||||||
if (responseGet?.success == true){ // Its serial
|
if (responseGet?.success == true){ // Its serial
|
||||||
|
|
Loading…
Reference in a new issue