exts: Fix moonanime player
This commit is contained in:
parent
483dea7476
commit
3c8dc3d4e5
5 changed files with 34 additions and 26 deletions
|
@ -228,7 +228,7 @@ class AnimeONProvider : MainAPI() {
|
|||
when {
|
||||
contains("https://moonanime.art") -> {
|
||||
val document = app.get(this).document
|
||||
return document.select("script[type*=text/javascript]").html().substringAfter("file:\"").substringBefore("\",")
|
||||
return document.select("script[type*=text/javascript]").html().substringAfter("file: \"").substringBefore("\",")
|
||||
}
|
||||
|
||||
contains("https://ashdi.vip/vod") -> {
|
||||
|
|
|
@ -99,7 +99,7 @@ class EneyidaProvider : MainAPI() {
|
|||
return if (tvType == TvType.TvSeries) {
|
||||
val episodes = mutableListOf<Episode>()
|
||||
val playerRawJson = app.get(playerUrl).document.select("script").html()
|
||||
.substringAfterLast("file:\'")
|
||||
.substringAfterLast("file: \'")
|
||||
.substringBefore("\',")
|
||||
|
||||
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||
|
@ -153,7 +153,7 @@ class EneyidaProvider : MainAPI() {
|
|||
// Its film, parse one m3u8
|
||||
if(dataList.size == 2){
|
||||
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
||||
.substringAfterLast("file:\"")
|
||||
.substringAfterLast("file: \"")
|
||||
.substringBefore("\",")
|
||||
M3u8Helper.generateM3u8(
|
||||
source = dataList[0],
|
||||
|
@ -165,7 +165,7 @@ class EneyidaProvider : MainAPI() {
|
|||
}
|
||||
|
||||
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
||||
.substringAfterLast("file:\'")
|
||||
.substringAfterLast("file: \'")
|
||||
.substringBefore("\',")
|
||||
|
||||
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||
|
|
|
@ -137,14 +137,19 @@ class HigoTVProvider : MainAPI() {
|
|||
|
||||
document.select("iframe").forEach {
|
||||
if(it.attr("src").isNotEmpty()){
|
||||
val playerDocument = app.get(it.attr("src")).document
|
||||
// Log.d("CakesTwix-Debug", playerDocument.select("script[type*=text/javascript]").html().substringAfter("file:'").substringBefore("',"))
|
||||
val playerDocument = app.get(it.attr("src"),
|
||||
headers = mapOf(
|
||||
"Host" to "moonanime.art",
|
||||
"Accept" to "*/*",
|
||||
"User-Agent" to "Mozilla/5.0 (Windows NT 10.0; rv:126.0) Gecko/20100101 Firefox/126.0",
|
||||
"accept-language" to "en-US,en;q=0.5"
|
||||
)).document
|
||||
Log.d("CakesTwix-Debug", playerDocument.select("script[type*=text/javascript]").html().substringAfter("file: '").substringBefore("',"))
|
||||
val parsedJSON = gson.fromJson<List<PlayerJson>>(
|
||||
playerDocument.select("script[type*=text/javascript]").html().substringAfter("file:'").substringBefore("',"), listPlayer
|
||||
playerDocument.select("script[type*=text/javascript]").html().substringAfter("file: '").substringBefore("',"), listPlayer
|
||||
)
|
||||
|
||||
parsedJSON[0].folder?.forEach { seasons ->
|
||||
seasons.folder?.forEach {
|
||||
parsedJSON?.forEach {
|
||||
episodes.add(
|
||||
Episode(
|
||||
"${url}, ${it.title}",
|
||||
|
@ -155,7 +160,6 @@ class HigoTVProvider : MainAPI() {
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Log.d("CakesTwix-Debug", playerRawJson)
|
||||
|
@ -201,21 +205,25 @@ class HigoTVProvider : MainAPI() {
|
|||
|
||||
document.select("iframe").forEach {
|
||||
if(it.attr("src").isNotEmpty()){
|
||||
val playerDocument = app.get(it.attr("src")).document
|
||||
val playerDocument = app.get(it.attr("src"),
|
||||
headers = mapOf(
|
||||
"Host" to "moonanime.art",
|
||||
"Accept" to "*/*",
|
||||
"User-Agent" to "Mozilla/5.0 (Windows NT 10.0; rv:126.0) Gecko/20100101 Firefox/126.0",
|
||||
"accept-language" to "en-US,en;q=0.5"
|
||||
)).document
|
||||
// Log.d("CakesTwix-Debug", playerDocument.select("script[type*=text/javascript]").html().substringAfter("file:'").substringBefore("',"))
|
||||
val parsedJSON = gson.fromJson<List<PlayerJson>>(
|
||||
playerDocument.select("script[type*=text/javascript]").html().substringAfter("file:'").substringBefore("',"), listPlayer
|
||||
playerDocument.select("script[type*=text/javascript]").html().substringAfter("file: '").substringBefore("',"), listPlayer
|
||||
)
|
||||
|
||||
parsedJSON[0].folder?.forEach { seasons ->
|
||||
seasons.folder?.forEach {
|
||||
if(it.title != dataList[1]) return@forEach
|
||||
M3u8Helper.generateM3u8(
|
||||
source = parsedJSON[0].title!!,
|
||||
streamUrl = it.file!!,
|
||||
referer = "https://moonanime.art"
|
||||
).forEach(callback)
|
||||
}
|
||||
parsedJSON?.forEach {
|
||||
if(it.title != dataList[1]) return@forEach
|
||||
M3u8Helper.generateM3u8(
|
||||
source = it.title,
|
||||
streamUrl = it.file!!,
|
||||
referer = "https://moonanime.art"
|
||||
).forEach(callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ class KinoVezhaProvider : MainAPI() {
|
|||
// Parse Episodes as Series
|
||||
return if (tvType == TvType.TvSeries) {
|
||||
val playerRawJson = app.get(playerUrl).document.select("script").html()
|
||||
.substringAfterLast("file:\'")
|
||||
.substringAfterLast("file: \'")
|
||||
.substringBefore("\',")
|
||||
|
||||
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||
|
@ -143,7 +143,7 @@ class KinoVezhaProvider : MainAPI() {
|
|||
// Its film, parse one m3u8
|
||||
if(dataList.size == 2){
|
||||
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
||||
.substringAfterLast("file:\"")
|
||||
.substringAfterLast("file: \"")
|
||||
.substringBefore("\",")
|
||||
M3u8Helper.generateM3u8(
|
||||
source = dataList[0],
|
||||
|
@ -155,7 +155,7 @@ class KinoVezhaProvider : MainAPI() {
|
|||
}
|
||||
|
||||
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
||||
.substringAfterLast("file:\'")
|
||||
.substringAfterLast("file: \'")
|
||||
.substringBefore("\',")
|
||||
|
||||
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||
|
|
|
@ -223,7 +223,7 @@ class UASerialsProProvider : MainAPI() {
|
|||
// Movie
|
||||
if(dataList.size == 2){
|
||||
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
||||
.substringAfterLast("file:\"")
|
||||
.substringAfterLast("file: \"")
|
||||
.substringBefore("\",")
|
||||
M3u8Helper.generateM3u8(
|
||||
source = dataList[0],
|
||||
|
@ -247,7 +247,7 @@ class UASerialsProProvider : MainAPI() {
|
|||
Gson().fromJson<List<DecodedJSON>>(decryptData, listDecodedJSONModel)[0]
|
||||
.seasons[dataList[0].toInt()].episodes[dataList[1].toInt()].sounds.forEach { episode ->
|
||||
val m3u8Url = app.get(episode.url).document.select("script").html()
|
||||
.substringAfterLast("file:\"")
|
||||
.substringAfterLast("file: \"")
|
||||
.substringBefore("\",")
|
||||
M3u8Helper.generateM3u8(
|
||||
source = episode.title,
|
||||
|
|
Loading…
Reference in a new issue