MangaPark v3 Fixes 2.0 (#7527)
* Update MangaPark.kt * Update build.gradle * *cough* * Fix?
This commit is contained in:
parent
fe5771b1e9
commit
ad61957f81
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'MangaPark v3'
|
||||
pkgNameSuffix = 'all.mangapark'
|
||||
extClass = '.MangaParkFactory'
|
||||
extVersionCode = 3
|
||||
extVersionCode = 4
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.util.asJsoup
|
|||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.buildJsonObject
|
||||
import kotlinx.serialization.json.jsonArray
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import kotlinx.serialization.json.put
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||
|
@ -22,6 +23,7 @@ import okhttp3.MediaType.Companion.toMediaType
|
|||
import okhttp3.OkHttpClient
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import okhttp3.Request
|
||||
import org.jsoup.Jsoup
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.util.Calendar
|
||||
|
@ -216,6 +218,12 @@ open class MangaPark(
|
|||
)
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val resTojson = json.parseToJsonElement(response.toString()).jsonObject
|
||||
val document = Jsoup.parse(resTojson["html"]!!.toString())
|
||||
return document.select(chapterListSelector()).map { chapterFromElement(it) }
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = "div.episode-item"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
|
|
Loading…
Reference in New Issue