fix(BuonDua): resolve issue with loading more than 9 galleries (#10074)

- Use URL of the last page to determine maximum page count

#Closes: #9139
This commit is contained in:
marioplus 2025-08-11 10:50:23 +08:00 committed by Draff
parent 4c7f8ebf68
commit e8fe42b283
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Buon Dua'
extClass = '.BuonDua'
extVersionCode = 4
extVersionCode = 5
isNsfw = true
}

View File

@ -93,7 +93,11 @@ class BuonDua() : ParsedHttpSource() {
val doc = response.asJsoup()
val dateUploadStr = doc.selectFirst(".article-info > small")?.text()
val dateUpload = DATE_FORMAT.tryParse(dateUploadStr)
val maxPage = doc.select("nav.pagination:first-of-type a.pagination-link").last()?.text()?.toInt() ?: 1
// /xiuren-no-10051---10065-1127-photos-467c89d5b3e204eebe33ddbc54d905b1-47452?page=57
val maxPage = doc.select("nav.pagination:first-of-type a.pagination-next").last()
?.absUrl("href")
?.toHttpUrl()
?.queryParameter("page")?.toInt() ?: 1
val basePageUrl = response.request.url
return (maxPage downTo 1).map { page ->
SChapter.create().apply {