BainianManga: Fix image url and chapter list (#11459)

This commit is contained in:
anenasa 2022-04-14 16:42:49 +08:00 committed by GitHub
parent 2740c1c729
commit 5b70456840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'BainianManga'
pkgNameSuffix = 'zh.bainianmanga'
extClass = '.BainianManga'
extVersionCode = 5
extVersionCode = 6
}
apply from: "$rootDir/common.gradle"

View File

@ -61,7 +61,8 @@ class BainianManga : ParsedHttpSource() {
override fun popularMangaSelector() = "ul#list_img > li"
override fun latestUpdatesSelector() = popularMangaSelector()
override fun searchMangaSelector() = popularMangaSelector()
override fun chapterListSelector() = "ul.jslist01 > li"
// Ignore first item, which is link to another comic site
override fun chapterListSelector() = "ul.jslist01 > li:not(:first-child)"
override fun searchMangaNextPageSelector() = ".pagination > li:last-child > a"
override fun popularMangaNextPageSelector() = searchMangaNextPageSelector()
@ -107,7 +108,10 @@ class BainianManga : ParsedHttpSource() {
.substringAfter("var z_img='")
.substringBefore("';")
).mapIndexed { i, imageUrl ->
Page(i, "", imageUrl)
when {
imageUrl.startsWith("http") -> Page(i, "", imageUrl)
else -> Page(i, "", "https://img.hngxgt.net/$imageUrl")
}
}
}