ComicExtra doesn't show chapters from multiple pages (#1107)
ComicExtra doesn't show chapters from multiple pages
This commit is contained in:
parent
9d5b774cc2
commit
8ed0f0728a
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: ComicExtra'
|
||||
pkgNameSuffix = 'en.comicextra'
|
||||
extClass = '.ComicExtra'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ class ComicExtra : ParsedHttpSource() {
|
|||
|
||||
private fun fetchThumbnailURL(url: String) = client.newCall(GET(url, headers)).execute().asJsoup().select("div.movie-l-img > img").attr("src")
|
||||
|
||||
private fun fetchChaptersFromNav(url: String) = client.newCall(GET(url, headers)).execute().asJsoup().select(chapterListSelector())
|
||||
|
||||
override fun popularMangaNextPageSelector() = "div.general-nav > a:contains(Next)"
|
||||
|
||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
@ -71,6 +73,7 @@ class ComicExtra : ParsedHttpSource() {
|
|||
manga.status = parseStatus(status)
|
||||
manga.author = document.select("dt:contains(Author:) + dd").text()
|
||||
manga.description = document.select("div#film-content").text()
|
||||
|
||||
return manga
|
||||
}
|
||||
|
||||
|
@ -80,6 +83,33 @@ class ComicExtra : ParsedHttpSource() {
|
|||
else -> SManga.UNKNOWN
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
|
||||
val document = response.asJsoup()
|
||||
val nav = document.getElementsByClass("general-nav").first()
|
||||
val chapters = ArrayList<SChapter>()
|
||||
|
||||
document.select(chapterListSelector()).forEach {
|
||||
chapters.add(chapterFromElement(it))
|
||||
}
|
||||
|
||||
if (nav == null) {
|
||||
return chapters
|
||||
}
|
||||
|
||||
val links = nav.getElementsByTag("a")
|
||||
|
||||
links.forEach {
|
||||
if (it.text() != "Next") {
|
||||
fetchChaptersFromNav(it.attr("href")).forEach { page ->
|
||||
chapters.add(chapterFromElement(page))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return chapters
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = "table.table > tbody#list > tr:has(td)"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
|
|
Loading…
Reference in New Issue