[Asura Scans] New parser
This commit is contained in:
@@ -441,6 +441,33 @@ internal abstract class MangaReaderParser(
|
||||
get() = "/manga"
|
||||
override val tableMode: Boolean
|
||||
get() = true
|
||||
|
||||
override val chapterDateFormat: SimpleDateFormat = SimpleDateFormat("MMM d, yyyy", idLocale)
|
||||
}
|
||||
|
||||
@MangaSourceParser("ASURASCANS", "Asura Scans", "en")
|
||||
class AsuraScansParser(override val context: MangaLoaderContext) : MangaReaderParser(MangaSource.ASURASCANS, pageSize = 20, searchPageSize = 10) {
|
||||
override val configKeyDomain: ConfigKey.Domain
|
||||
get() = ConfigKey.Domain("asurascans.com", null)
|
||||
|
||||
override val listUrl: String
|
||||
get() = "/manga"
|
||||
override val tableMode: Boolean
|
||||
get() = false
|
||||
|
||||
override val chapterDateFormat: SimpleDateFormat = SimpleDateFormat("MMM d, yyyy", Locale.ENGLISH)
|
||||
|
||||
override suspend fun parseInfoList(docs: Document, manga: Manga, chapters: List<MangaChapter>): Manga {
|
||||
val infoElement = docs.selectFirst("div.infox")
|
||||
return manga.copy(
|
||||
chapters = chapters,
|
||||
description = infoElement?.selectFirst("div.entry-content")?.html(),
|
||||
author = infoElement?.selectFirst(".flex-wrap div:contains(Author)")?.lastElementSibling()?.text(),
|
||||
tags = infoElement?.select(".wd-full .mgen > a")
|
||||
?.mapNotNullToSet { getOrCreateTagMap()[it.text()] }
|
||||
.orEmpty(),
|
||||
isNsfw = docs.selectFirst(".postbody .alr") != null,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user