NHentai - fix pages (#3455)

This commit is contained in:
Mike 2020-06-09 02:38:48 -04:00 committed by GitHub
parent af807266b8
commit 7a0b545316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 14 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: NHentai'
pkgNameSuffix = 'all.nhentai'
extClass = '.NHFactory'
extVersionCode = 19
extVersionCode = 20
libVersion = '1.2'
}

View File

@ -224,21 +224,10 @@ open class NHentai(
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
override fun pageListRequest(chapter: SChapter) = GET("$baseUrl${chapter.url}", headers)
override fun pageListParse(document: Document): List<Page> {
val pageElements = document.select("#thumbnail-container > div")
val pageList = mutableListOf<Page>()
pageElements.forEach {
Page(pageList.size).run {
this.imageUrl = it.select("a > img").attr("data-src").replace("t.nh", "i.nh").replace("t.", ".")
pageList.add(pageList.size, this)
}
return document.select("div.thumbs a > img").mapIndexed { i, img ->
Page(i, "", img.attr("abs:data-src").replace("t.nh", "i.nh").replace("t.", "."))
}
return pageList
}
override fun getFilterList(): FilterList = FilterList(