Fix some chapter images still not loading at MY!. (#8448)
This commit is contained in:
parent
f61b2e1553
commit
0120ffbb08
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'MangaYabu!'
|
||||
pkgNameSuffix = 'pt.mangayabu'
|
||||
extClass = '.MangaYabu'
|
||||
extVersionCode = 10
|
||||
extVersionCode = 11
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||
val tooltip = element.select("div.card-image.mango-hover").first()!!
|
||||
|
||||
title = Jsoup.parse(tooltip.attr("data-tooltip")).select("span b").first()!!.text()
|
||||
thumbnail_url = element.select("img").first()!!.attr("data-ezsrc")
|
||||
thumbnail_url = element.selectFirst("img")!!.imgAttr()
|
||||
setUrlWithoutDomain(element.attr("href"))
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SManga = SManga.create().apply {
|
||||
title = element.select("div.card-content h4").first()!!.text().withoutFlags()
|
||||
thumbnail_url = element.select("div.card-image img").first()!!.attr("src")
|
||||
thumbnail_url = element.selectFirst("div.card-image img")!!.imgAttr()
|
||||
url = mapChapterToMangaUrl(element.select("div.card-image > a").first()!!.attr("href"))
|
||||
}
|
||||
|
||||
@ -117,8 +117,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||
description = document.select("div.manga-info").first()!!.text()
|
||||
.substringAfter(title)
|
||||
.trim()
|
||||
thumbnail_url = document.select("div.manga-index div.mango-hover img")!!
|
||||
.attr("data-ezsrc")
|
||||
thumbnail_url = document.selectFirst("div.manga-index div.mango-hover img")!!.imgAttr()
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = "div.manga-info:contains(Capítulos) div.manga-chapters div.single-chapter"
|
||||
@ -132,7 +131,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select("div.image-navigator img.slideit")
|
||||
.mapIndexed { i, element ->
|
||||
Page(i, document.location(), element.attr("abs:src"))
|
||||
Page(i, document.location(), element.imgAttr())
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,6 +162,17 @@ class MangaYabu : ParsedHttpSource() {
|
||||
return "/manga/" + (SLUG_EXCEPTIONS[chapterSlug] ?: chapterSlug)
|
||||
}
|
||||
|
||||
private fun Element.imgAttr(): String {
|
||||
var imageSrc = attr(if (hasAttr("data-ezsrc")) "abs:data-ezsrc" else "abs:src")
|
||||
.substringBeforeLast("?")
|
||||
|
||||
if (imageSrc.contains("ezoimgfmt")) {
|
||||
imageSrc = "https://" + imageSrc.substringAfter("ezoimgfmt/")
|
||||
}
|
||||
|
||||
return imageSrc
|
||||
}
|
||||
|
||||
private fun String.toDate(): Long {
|
||||
return try {
|
||||
DATE_FORMATTER.parse(this)?.time ?: 0L
|
||||
|
Loading…
x
Reference in New Issue
Block a user