aniage: fix parsing m3u
Need full re-write this shitcode...
This commit is contained in:
parent
e7dff2532c
commit
66f975b479
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 8
|
||||
version = 9
|
||||
|
||||
dependencies{
|
||||
implementation("com.google.code.gson:gson:2.9.0")
|
||||
|
|
|
@ -233,7 +233,7 @@ class AniageProvider : MainAPI() {
|
|||
val jsonObject = JSONObject(document.selectFirst("script[type*=application/json]")!!.html())
|
||||
val buildId = jsonObject.getString("buildId")
|
||||
|
||||
val animeJSON = Gson().fromJson(app.get("$mainUrl/_next/data/$buildId/watch/${dataList[0]}.json").text, AnimeDetail::class.java)
|
||||
val animeJSON = Gson().fromJson(app.get("$mainUrl/_next/data/$buildId/watch.json?wid=${dataList[0]}").text, AnimeDetail::class.java)
|
||||
|
||||
// Parse list, by episode
|
||||
animeJSON.pageProps.teams.map { teams ->
|
||||
|
@ -245,7 +245,7 @@ class AniageProvider : MainAPI() {
|
|||
if(dataList[1].toIntOrNull() == null){
|
||||
M3u8Helper.generateM3u8(
|
||||
source = TeamsList.name,
|
||||
streamUrl = dataList[1],
|
||||
streamUrl = dataList[1].replace("}", ""),
|
||||
referer = mainUrl
|
||||
).forEach(callback)
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue