MangaFast: fix thumbnails (#5997)

* MangaFast: fix thumbnails

* Remove resize in details parse
This commit is contained in:
scb261 2021-02-27 19:58:47 +02:00 committed by GitHub
parent e0d101a4fd
commit be115f2f5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaFast' extName = 'MangaFast'
pkgNameSuffix = 'en.mangafast' pkgNameSuffix = 'en.mangafast'
extClass = '.MangaFast' extClass = '.MangaFast'
extVersionCode = 4 extVersionCode = 5
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -28,7 +28,7 @@ class MangaFast : ParsedHttpSource() {
override fun popularMangaFromElement(element: Element) = SManga.create().apply { override fun popularMangaFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.select("a").attr("href")) setUrlWithoutDomain(element.select("a").attr("href"))
title = element.select("h4").text().trim() title = element.select("h4").text().trim()
thumbnail_url = element.select("img").attr("abs:data-src").substringBeforeLast("resize") thumbnail_url = element.select("img").attr("src").substringBeforeLast("?resize")
} }
override fun popularMangaNextPageSelector(): String? = null override fun popularMangaNextPageSelector(): String? = null
@ -40,7 +40,7 @@ class MangaFast : ParsedHttpSource() {
override fun latestUpdatesFromElement(element: Element) = SManga.create().apply { override fun latestUpdatesFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.select("a").attr("href")) setUrlWithoutDomain(element.select("a").attr("href"))
title = element.select("h3").text().trim() title = element.select("h3").text().trim()
thumbnail_url = element.select("img").attr("abs:data-src").substringBeforeLast("resize") thumbnail_url = element.select("img").attr("src").substringBeforeLast("?resize")
} }
override fun latestUpdatesNextPageSelector() = "a.next" override fun latestUpdatesNextPageSelector() = "a.next"
@ -58,6 +58,7 @@ class MangaFast : ParsedHttpSource() {
status = parseStatus(document.select(".inftable").text()) status = parseStatus(document.select(".inftable").text())
genre = document.select("a[itemprop=genre]").joinToString { it.text() } genre = document.select("a[itemprop=genre]").joinToString { it.text() }
description = document.select("[itemprop=description]").first().text().trim() description = document.select("[itemprop=description]").first().text().trim()
thumbnail_url = document.select("div.cvr > img").first().attr("src").substringBeforeLast("?resize")
} }
private fun parseStatus(status: String) = when { private fun parseStatus(status: String) = when {