From ab17d6f122bd2b1331c2a19c8f73ab85fae3f0d2 Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Sat, 15 Aug 2020 20:22:16 -0400 Subject: [PATCH] Dmzj - update page parsing (#4138) --- src/zh/dmzj/build.gradle | 2 +- .../dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/zh/dmzj/build.gradle b/src/zh/dmzj/build.gradle index 67ac31c38..365c93a26 100644 --- a/src/zh/dmzj/build.gradle +++ b/src/zh/dmzj/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Dmzj' pkgNameSuffix = 'zh.dmzj' extClass = '.Dmzj' - extVersionCode = 10 + extVersionCode = 11 libVersion = '1.2' } diff --git a/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt b/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt index c9dd7ab38..a21f825f1 100644 --- a/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt +++ b/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt @@ -160,8 +160,7 @@ class Dmzj : HttpSource() { ret.add(SChapter.create().apply { name = "$prefix: ${chapter.getString("chapter_title")}" date_upload = chapter.getString("updatetime").toLong() * 1000 // milliseconds - url = "$baseUrl/chapter/$cid/${chapter.getString("chapter_id")}.json" - // url = "http://m.dmzj.com/chapinfo/$cid/${chapter.getString("chapter_id")}.html" // From m_readerBg.js + url = "https://api.m.dmzj.com/comic/chapter/$cid/${chapter.getString("chapter_id")}.html" }) } } @@ -172,7 +171,7 @@ class Dmzj : HttpSource() { override fun pageListParse(response: Response): List { val obj = JSONObject(response.body()!!.string()) - val arr = obj.getJSONArray("page_url") + val arr = obj.getJSONObject("chapter").getJSONArray("page_url") val ret = ArrayList(arr.length()) for (i in 0 until arr.length()) { ret.add(Page(i, "", arr.getString(i)))