Add missing chapter scanlator in MM. (#8783)

This commit is contained in:
Alessandro Jean 2021-08-24 07:41:59 -03:00 committed by GitHub
parent 7f232185fb
commit 42f6a32163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Muito Mangá'
pkgNameSuffix = 'pt.muitomanga'
extClass = '.MuitoManga'
extVersionCode = 4
extVersionCode = 5
libVersion = '1.2'
containsNsfw = true
}

View File

@ -131,7 +131,7 @@ class MuitoManga : ParsedHttpSource() {
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
name = element.select("a").first()!!.text()
date_upload = element.select("small[title]").first()!!.text().toDate()
scanlator = element.select("scanlator2 a").joinToString { it.text().trim() }
scanlator = element.select("div.scanlator2 a").joinToString { it.text().trim() }
setUrlWithoutDomain(element.select("a").first()!!.attr("abs:href"))
}
@ -204,11 +204,8 @@ class MuitoManga : ParsedHttpSource() {
}
private fun String.toDate(): Long {
return try {
DATE_FORMATTER.parse(this)?.time ?: 0L
} catch (e: ParseException) {
0L
}
return runCatching { DATE_FORMATTER.parse(this)?.time }
.getOrNull() ?: 0L
}
companion object {