diff --git a/src/all/imhentai/build.gradle b/src/all/imhentai/build.gradle index d34a339ef..e7b020e82 100644 --- a/src/all/imhentai/build.gradle +++ b/src/all/imhentai/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'IMHentai' pkgNameSuffix = 'all.imhentai' extClass = '.IMHentaiFactory' - extVersionCode = 9 + extVersionCode = 10 isNsfw = true } diff --git a/src/all/imhentai/src/eu/kanade/tachiyomi/extension/all/imhentai/IMHentai.kt b/src/all/imhentai/src/eu/kanade/tachiyomi/extension/all/imhentai/IMHentai.kt index d37d22c86..a5f25cb97 100644 --- a/src/all/imhentai/src/eu/kanade/tachiyomi/extension/all/imhentai/IMHentai.kt +++ b/src/all/imhentai/src/eu/kanade/tachiyomi/extension/all/imhentai/IMHentai.kt @@ -54,7 +54,9 @@ class IMHentai(override val lang: String, private val imhLang: String) : ParsedH override fun popularMangaFromElement(element: Element): SManga { return SManga.create().apply { - thumbnail_url = element.select(".inner_thumb img").attr("data-src") + thumbnail_url = element.selectFirst(".inner_thumb img")?.let { + it.absUrl(if (it.hasAttr("data-src")) "data-src" else "src") + } with(element.select(".caption a")) { url = this.attr("href") title = this.text() @@ -152,7 +154,9 @@ class IMHentai(override val lang: String, private val imhLang: String) : ParsedH title = document.selectFirst("div.right_details > h1").text() - thumbnail_url = document.selectFirst("div.left_cover img").attr("abs:data-src") + thumbnail_url = document.selectFirst("div.left_cover img")?.let { + it.absUrl(if (it.hasAttr("data-src")) "data-src" else "src") + } val mangaInfoElement = document.select(".galleries_info") val infoMap = mangaInfoElement.select("li:not(.pages)").map {