NHentai: fix thumbnails (closes #1088) (#1125)

This commit is contained in:
Eugene 2019-05-21 19:07:49 -04:00 committed by GitHub
parent 8d6dd2e419
commit 2702a755c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: NHentai'
pkgNameSuffix = 'all.nhentai'
extClass = '.NHEnglish; .NHJapanese; .NHChinese'
extVersionCode = 8
extVersionCode = 9
libVersion = '1.2'
}

View File

@ -41,7 +41,9 @@ open class NHentai(override val lang: String, private val nhLang: String) : Pars
override fun latestUpdatesFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.select("a").attr("href"))
title = element.select("a > div").text().replace("\"", "").trim()
thumbnail_url = element.select(".cover img").attr("data-src")
val img = element.select(".cover img").first()
thumbnail_url = if (img.hasAttr("data-src")) img.absUrl("data-src") else img.absUrl("src")
}
override fun latestUpdatesNextPageSelector() = "#content > section.pagination > a.next"