Fix japscan download (#12827)
This commit is contained in:
parent
26fa0af501
commit
9884a8a060
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Japscan'
|
||||
pkgNameSuffix = 'fr.japscan'
|
||||
extClass = '.Japscan'
|
||||
extVersionCode = 31
|
||||
extVersionCode = 32
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -350,11 +350,12 @@ class Japscan : ConfigurableSource, ParsedHttpSource() {
|
|||
Log.d("japscan", "ZJS at $zjsurl")
|
||||
val zjs = client.newCall(GET(baseUrl + zjsurl, headers)).execute().body!!.string()
|
||||
Log.d("japscan", "webtoon, netdumping initiated")
|
||||
val pagecount = document.getElementsByTag("option").size
|
||||
val pagesElement = document.getElementById("pages")
|
||||
val pagecount = pagesElement.getElementsByTag("option").size
|
||||
val pages = ArrayList<Page>()
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
val checkNew = ArrayList<String>(pagecount)
|
||||
var maxIter = document.getElementsByTag("option").size
|
||||
var maxIter = pagecount
|
||||
var isSinglePage = false
|
||||
if ((zjs.lowercase(Locale.ROOT).split("new image").size - 1) == 1) {
|
||||
isSinglePage = true
|
||||
|
@ -395,7 +396,7 @@ class Japscan : ConfigurableSource, ParsedHttpSource() {
|
|||
if (isSinglePage) {
|
||||
webView?.loadUrl(baseUrl + document.select("li[^data-]").first().dataset()["chapter-url"])
|
||||
} else {
|
||||
webView?.loadUrl(baseUrl + document.getElementsByTag("option")[i].attr("value"))
|
||||
webView?.loadUrl(baseUrl + pagesElement.getElementsByTag("option")[i].attr("value"))
|
||||
}
|
||||
}
|
||||
barrier.await()
|
||||
|
|
Loading…
Reference in New Issue