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