6Manhua: only parse the first chapter tab (#12433)
This commit is contained in:
parent
50e58499a9
commit
c52e47169b
|
@ -6,11 +6,11 @@ ext {
|
|||
extName = '6Manhua'
|
||||
pkgNameSuffix = 'zh.sixmh'
|
||||
extClass = '.SixMH'
|
||||
extVersionCode = 1
|
||||
extVersionCode = 2
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.stevenyomi:unpacker:919be5cb30' // SHA of 1.0 tag
|
||||
implementation 'com.github.stevenyomi:unpacker:12a09e3c1a' // 1.1
|
||||
}
|
||||
|
|
|
@ -112,14 +112,16 @@ class SixMH : ParsedHttpSource() {
|
|||
val document = client.newCall(mobileRequest(manga)).execute().asJsoup()
|
||||
val list = mutableListOf<SChapter>()
|
||||
|
||||
document.select(".chapter-list > a, dd[class^=gengduo]").forEach { element ->
|
||||
if (element.tagName() == "a") {
|
||||
val chapter = SChapter.create().apply {
|
||||
val tab = document.selectFirst(Evaluator.Class("cartoon-directory")).children()
|
||||
if (tab.size >= 2) {
|
||||
tab[1].children().mapTo(list) { element ->
|
||||
SChapter.create().apply {
|
||||
url = element.attr("href")
|
||||
name = element.text()
|
||||
}
|
||||
list.add(chapter)
|
||||
} else {
|
||||
}
|
||||
if (tab.size >= 3) {
|
||||
val element = tab[2]
|
||||
val path = manga.url
|
||||
val body = FormBody.Builder().apply {
|
||||
addEncoded("id", element.attr("data-id"))
|
||||
|
|
Loading…
Reference in New Issue