Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ne1work authored Aug 20, 2024
1 parent a3b6700 commit 8ac1cf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Kinoger/src/main/kotlin/com/ne1work/Kinoger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ class Kinoger : MainAPI() {

val scripts = document.select("script").mapNotNull { script ->
val scriptContent = script.data()
val showPattern = Regex("""show\s*\(\s*\d+\s*,\s*(\[\[.*?\]\])\s*(,\s*.*?)*\s*\)""")
val showPattern = Regex("""show\s*\(\s*\d+\s*,\s*\[\[(.*?)\]\],\s*0\.2""")
val match = showPattern.find(scriptContent)
match?.groupValues?.get(1)?.replace("'", "\"")
}

val jsonData = scripts.flatMap { data ->
val parsedData = AppUtils.tryParseJson<List<List<String>>>(data)
val parsedData = AppUtils.tryParseJson<List<List<String>>>("[[$data]]")
parsedData ?: emptyList()
}

Expand All @@ -109,6 +109,7 @@ class Kinoger : MainAPI() {
}
}


override suspend fun loadLinks(
data: String,
isCasting: Boolean,
Expand Down

0 comments on commit 8ac1cf4

Please sign in to comment.