Everia.club: fix page list parsing (#15061)

This commit is contained in:
stevenyomi 2023-01-22 05:52:30 +08:00 committed by GitHub
parent fe093b3eac
commit ab1a500acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Everia.club'
pkgNameSuffix = 'all.everiaclub'
extClass = '.EveriaClub'
extVersionCode = 4
extVersionCode = 5
isNsfw = true
}

View File

@ -19,6 +19,9 @@ class EveriaClub() : ParsedHttpSource() {
override val name = "Everia.club"
override val supportsLatest = true
override fun headersBuilder() = super.headersBuilder()
.add("Referer", "$baseUrl/")
// Latest
override fun latestUpdatesFromElement(element: Element): SManga {
val manga = SManga.create()
@ -96,7 +99,7 @@ class EveriaClub() : ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
document.select("article img").forEachIndexed { i, it ->
val itUrl = it.attr("src")
val itUrl = it.attr("data-src").ifEmpty { it.attr("src") }
pages.add(Page(i, itUrl, itUrl))
}
return pages