fix(buondua): handle single-page URL parsing case (#10714)
- Fix URL extraction when only one page exists
This commit is contained in:
parent
ff7a95faa0
commit
728dd0de50
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Buon Dua'
|
extName = 'Buon Dua'
|
||||||
extClass = '.BuonDua'
|
extClass = '.BuonDua'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ class BuonDua() : ParsedHttpSource() {
|
|||||||
// /xiuren-no-10051---10065-1127-photos-467c89d5b3e204eebe33ddbc54d905b1-47452?page=57
|
// /xiuren-no-10051---10065-1127-photos-467c89d5b3e204eebe33ddbc54d905b1-47452?page=57
|
||||||
val maxPage = doc.select("nav.pagination:first-of-type a.pagination-next").last()
|
val maxPage = doc.select("nav.pagination:first-of-type a.pagination-next").last()
|
||||||
?.absUrl("href")
|
?.absUrl("href")
|
||||||
|
?.takeIf { it.startsWith("http") }
|
||||||
?.toHttpUrl()
|
?.toHttpUrl()
|
||||||
?.queryParameter("page")?.toInt() ?: 1
|
?.queryParameter("page")?.toInt() ?: 1
|
||||||
val basePageUrl = response.request.url
|
val basePageUrl = response.request.url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user