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 {
|
when {
|
||||||
contains("https://moonanime.art") -> {
|
contains("https://moonanime.art") -> {
|
||||||
val document = app.get(this).document
|
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") -> {
|
contains("https://ashdi.vip/vod") -> {
|
||||||
|
|
|
@ -99,7 +99,7 @@ class EneyidaProvider : MainAPI() {
|
||||||
return if (tvType == TvType.TvSeries) {
|
return if (tvType == TvType.TvSeries) {
|
||||||
val episodes = mutableListOf<Episode>()
|
val episodes = mutableListOf<Episode>()
|
||||||
val playerRawJson = app.get(playerUrl).document.select("script").html()
|
val playerRawJson = app.get(playerUrl).document.select("script").html()
|
||||||
.substringAfterLast("file:\'")
|
.substringAfterLast("file: \'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
|
|
||||||
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||||
|
@ -153,7 +153,7 @@ class EneyidaProvider : MainAPI() {
|
||||||
// Its film, parse one m3u8
|
// Its film, parse one m3u8
|
||||||
if(dataList.size == 2){
|
if(dataList.size == 2){
|
||||||
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
||||||
.substringAfterLast("file:\"")
|
.substringAfterLast("file: \"")
|
||||||
.substringBefore("\",")
|
.substringBefore("\",")
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
source = dataList[0],
|
source = dataList[0],
|
||||||
|
@ -165,7 +165,7 @@ class EneyidaProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
||||||
.substringAfterLast("file:\'")
|
.substringAfterLast("file: \'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
|
|
||||||
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||||
|
|
|
@ -137,14 +137,19 @@ class HigoTVProvider : MainAPI() {
|
||||||
|
|
||||||
document.select("iframe").forEach {
|
document.select("iframe").forEach {
|
||||||
if(it.attr("src").isNotEmpty()){
|
if(it.attr("src").isNotEmpty()){
|
||||||
val playerDocument = app.get(it.attr("src")).document
|
val playerDocument = app.get(it.attr("src"),
|
||||||
// Log.d("CakesTwix-Debug", playerDocument.select("script[type*=text/javascript]").html().substringAfter("file:'").substringBefore("',"))
|
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>>(
|
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 ->
|
parsedJSON?.forEach {
|
||||||
seasons.folder?.forEach {
|
|
||||||
episodes.add(
|
episodes.add(
|
||||||
Episode(
|
Episode(
|
||||||
"${url}, ${it.title}",
|
"${url}, ${it.title}",
|
||||||
|
@ -156,7 +161,6 @@ class HigoTVProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Log.d("CakesTwix-Debug", playerRawJson)
|
// Log.d("CakesTwix-Debug", playerRawJson)
|
||||||
|
|
||||||
|
@ -201,24 +205,28 @@ class HigoTVProvider : MainAPI() {
|
||||||
|
|
||||||
document.select("iframe").forEach {
|
document.select("iframe").forEach {
|
||||||
if(it.attr("src").isNotEmpty()){
|
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("',"))
|
// Log.d("CakesTwix-Debug", playerDocument.select("script[type*=text/javascript]").html().substringAfter("file:'").substringBefore("',"))
|
||||||
val parsedJSON = gson.fromJson<List<PlayerJson>>(
|
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 ->
|
parsedJSON?.forEach {
|
||||||
seasons.folder?.forEach {
|
|
||||||
if(it.title != dataList[1]) return@forEach
|
if(it.title != dataList[1]) return@forEach
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
source = parsedJSON[0].title!!,
|
source = it.title,
|
||||||
streamUrl = it.file!!,
|
streamUrl = it.file!!,
|
||||||
referer = "https://moonanime.art"
|
referer = "https://moonanime.art"
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ class KinoVezhaProvider : MainAPI() {
|
||||||
// Parse Episodes as Series
|
// Parse Episodes as Series
|
||||||
return if (tvType == TvType.TvSeries) {
|
return if (tvType == TvType.TvSeries) {
|
||||||
val playerRawJson = app.get(playerUrl).document.select("script").html()
|
val playerRawJson = app.get(playerUrl).document.select("script").html()
|
||||||
.substringAfterLast("file:\'")
|
.substringAfterLast("file: \'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
|
|
||||||
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||||
|
@ -143,7 +143,7 @@ class KinoVezhaProvider : MainAPI() {
|
||||||
// Its film, parse one m3u8
|
// Its film, parse one m3u8
|
||||||
if(dataList.size == 2){
|
if(dataList.size == 2){
|
||||||
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
||||||
.substringAfterLast("file:\"")
|
.substringAfterLast("file: \"")
|
||||||
.substringBefore("\",")
|
.substringBefore("\",")
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
source = dataList[0],
|
source = dataList[0],
|
||||||
|
@ -155,7 +155,7 @@ class KinoVezhaProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
||||||
.substringAfterLast("file:\'")
|
.substringAfterLast("file: \'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
|
|
||||||
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||||
|
|
|
@ -223,7 +223,7 @@ class UASerialsProProvider : MainAPI() {
|
||||||
// Movie
|
// Movie
|
||||||
if(dataList.size == 2){
|
if(dataList.size == 2){
|
||||||
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
val m3u8Url = app.get(dataList[1]).document.select("script").html()
|
||||||
.substringAfterLast("file:\"")
|
.substringAfterLast("file: \"")
|
||||||
.substringBefore("\",")
|
.substringBefore("\",")
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
source = dataList[0],
|
source = dataList[0],
|
||||||
|
@ -247,7 +247,7 @@ class UASerialsProProvider : MainAPI() {
|
||||||
Gson().fromJson<List<DecodedJSON>>(decryptData, listDecodedJSONModel)[0]
|
Gson().fromJson<List<DecodedJSON>>(decryptData, listDecodedJSONModel)[0]
|
||||||
.seasons[dataList[0].toInt()].episodes[dataList[1].toInt()].sounds.forEach { episode ->
|
.seasons[dataList[0].toInt()].episodes[dataList[1].toInt()].sounds.forEach { episode ->
|
||||||
val m3u8Url = app.get(episode.url).document.select("script").html()
|
val m3u8Url = app.get(episode.url).document.select("script").html()
|
||||||
.substringAfterLast("file:\"")
|
.substringAfterLast("file: \"")
|
||||||
.substringBefore("\",")
|
.substringBefore("\",")
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
source = episode.title,
|
source = episode.title,
|
||||||
|
|
Loading…
Reference in a new issue