Fix Mangapark page list empty error (#818)
Fix Mangapark page list empty error
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: MangaPark'
|
appName = 'Tachiyomi: MangaPark'
|
||||||
pkgNameSuffix = 'en.mangapark'
|
pkgNameSuffix = 'en.mangapark'
|
||||||
extClass = '.MangaPark'
|
extClass = '.MangaPark'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 17 KiB |
|
@ -5,6 +5,7 @@ import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.*
|
import eu.kanade.tachiyomi.source.model.*
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
import org.json.JSONObject
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
|
@ -16,7 +17,7 @@ class MangaPark : ParsedHttpSource() {
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
override val name = "MangaPark"
|
override val name = "MangaPark"
|
||||||
override val baseUrl = "https://mangapark.me"
|
override val baseUrl = "https://mangapark.net"
|
||||||
|
|
||||||
private val directorySelector = ".ls1 .item"
|
private val directorySelector = ".ls1 .item"
|
||||||
private val directoryUrl = "/genre"
|
private val directoryUrl = "/genre"
|
||||||
|
@ -175,9 +176,20 @@ class MangaPark : ParsedHttpSource() {
|
||||||
return now.timeInMillis
|
return now.timeInMillis
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document)
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
= document.getElementsByClass("img").map {
|
val doc = document.toString()
|
||||||
Page(it.attr("i").toInt() - 1, "", cleanUrl(it.attr("src")))
|
val obj = doc.substringAfter("var _load_pages = ").substringBefore(";")
|
||||||
|
val pages = mutableListOf<Page>()
|
||||||
|
var imglist = JSONObject("""{"data": $obj}""").getJSONArray("data")
|
||||||
|
for (i in 0 until imglist.length()) {
|
||||||
|
var item = imglist.getJSONObject(i)
|
||||||
|
var page = item.getString("u")
|
||||||
|
if (page.startsWith("//")) {
|
||||||
|
page = "https:$page"
|
||||||
|
}
|
||||||
|
pages.add(Page(i, "", page))
|
||||||
|
}
|
||||||
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
//Unused, we can get image urls directly from the chapter page
|
//Unused, we can get image urls directly from the chapter page
|
||||||
|
|