Bato.To: Fix infinitiy search (#7156)

* Update build.gradle

* Update BatoTo.kt
This commit is contained in:
Johannes Joens 2021-05-22 16:20:45 +12:00 committed by GitHub
parent 6f3ea81db1
commit 9c4b1caee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Bato.to'
pkgNameSuffix = 'all.batoto'
extClass = '.BatoToFactory'
extVersionCode = 11
extVersionCode = 12
libVersion = '1.2'
containsNsfw = true
}

View File

@ -60,7 +60,7 @@ open class BatoTo(
return manga
}
override fun latestUpdatesNextPageSelector() = "div#mainer .pagination .page-item:not(.disabled) a.page-link:contains(»)"
override fun latestUpdatesNextPageSelector() = "div#mainer nav.d-none .pagination .page-item:last-of-type:not(.disabled)"
override fun popularMangaRequest(page: Int): Request {
return GET("$baseUrl/browse?langs=$siteLang&sort=views_w&page=$page")
@ -159,7 +159,7 @@ open class BatoTo(
document.select(latestUpdatesSelector()).forEach { element ->
mangas.add(latestUpdatesFromElement(element))
}
val nextPage = document.select(latestUpdatesNextPageSelector()) != null
val nextPage = document.select(latestUpdatesNextPageSelector()).first() != null
return MangasPage(mangas, nextPage)
}