[Fix] Kuaikanmanhua - locked chapters (#1731)

* Update Kuaikanmanhua.kt

* Update build.gradle
This commit is contained in:
happywillow0 2019-11-01 17:10:22 -04:00 committed by arkon
parent 27c456e66d
commit 14e8d1ceff
2 changed files with 10 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Kuaikanmanhua'
pkgNameSuffix = 'zh.kuaikanmanhua'
extClass = '.Kuaikanmanhua'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -155,12 +155,19 @@ class Kuaikanmanhua : ParsedHttpSource() {
val chapter = SChapter.create()
element.select("div.title a").let {
chapter.setUrlWithoutDomain(it.attr("href"))
chapter.name = it.text()
chapter.url = it.attr("href")
chapter.name = it.text() + if (element.select("i.lockedIcon").isNotEmpty()) {" \uD83D\uDD12"} else {""}
}
return chapter
}
override fun pageListRequest(chapter: SChapter): Request {
if (chapter.url=="javascript:void(0);") {
return throw Exception("[此章节为付费内容]")
}
return super.pageListRequest(chapter)
}
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()