ReadComicOnline: Fix pagination (#14405)

This commit is contained in:
Vetle Ledaal 2022-12-01 04:50:53 +01:00 committed by GitHub
parent d938c3ceb6
commit 3af0f71eaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'ReadComicOnline'
pkgNameSuffix = 'en.readcomiconline'
extClass = '.Readcomiconline'
extVersionCode = 13
extVersionCode = 14
}
apply from: "$rootDir/common.gradle"

View File

@ -95,13 +95,14 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
return popularMangaFromElement(element)
}
override fun popularMangaNextPageSelector() = "li > a:contains(Next)"
override fun popularMangaNextPageSelector() = "ul.pager > li > a:contains(Next)"
override fun latestUpdatesNextPageSelector(): String = "ul.pager > li > a:contains(Next)"
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val form = FormBody.Builder().apply {
add("comicName", query)
add("page", page.toString())
for (filter in if (filters.isEmpty()) getFilterList() else filters) {
when (filter) {
@ -120,7 +121,7 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
return popularMangaFromElement(element)
}
override fun searchMangaNextPageSelector(): String? = null
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
override fun mangaDetailsParse(document: Document): SManga {
val infoElement = document.select("div.barContent").first()