fix(buondua): handle single-page URL parsing case (#10714)

- Fix URL extraction when only one page exists
This commit is contained in:
marioplus 2025-09-26 13:35:43 +08:00 committed by Draff
parent ff7a95faa0
commit 728dd0de50
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -96,6 +96,7 @@ class BuonDua() : ParsedHttpSource() {
// /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")
?.takeIf { it.startsWith("http") }
?.toHttpUrl()
?.queryParameter("page")?.toInt() ?: 1
val basePageUrl = response.request.url