|
|
|
@ -534,6 +534,14 @@ internal abstract class MadaraParser(
|
|
|
|
protected open val selectAlt =
|
|
|
|
protected open val selectAlt =
|
|
|
|
".post-content_item:contains(Alt) .summary-content, .post-content_item:contains(Nomes alternativos: ) .summary-content"
|
|
|
|
".post-content_item:contains(Alt) .summary-content, .post-content_item:contains(Nomes alternativos: ) .summary-content"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected open fun createMangaTag(a: Element): MangaTag? {
|
|
|
|
|
|
|
|
return MangaTag(
|
|
|
|
|
|
|
|
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
|
|
|
|
|
|
|
|
title = a.text().toTitleCase(),
|
|
|
|
|
|
|
|
source = source,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override suspend fun getDetails(manga: Manga): Manga = coroutineScope {
|
|
|
|
override suspend fun getDetails(manga: Manga): Manga = coroutineScope {
|
|
|
|
val fullUrl = manga.url.toAbsoluteUrl(domain)
|
|
|
|
val fullUrl = manga.url.toAbsoluteUrl(domain)
|
|
|
|
val doc = webClient.httpGet(fullUrl).parseHtml()
|
|
|
|
val doc = webClient.httpGet(fullUrl).parseHtml()
|
|
|
|
@ -566,13 +574,7 @@ internal abstract class MadaraParser(
|
|
|
|
title = doc.selectFirst("h1")?.textOrNull() ?: manga.title,
|
|
|
|
title = doc.selectFirst("h1")?.textOrNull() ?: manga.title,
|
|
|
|
url = href,
|
|
|
|
url = href,
|
|
|
|
publicUrl = href.toAbsoluteUrl(domain),
|
|
|
|
publicUrl = href.toAbsoluteUrl(domain),
|
|
|
|
tags = doc.body().select(selectGenre).mapToSet { a ->
|
|
|
|
tags = doc.body().select(selectGenre).mapToSet { a -> createMangaTag(a) }.filterNotNull().toSet(),
|
|
|
|
MangaTag(
|
|
|
|
|
|
|
|
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
|
|
|
|
|
|
|
|
title = a.text().toTitleCase(),
|
|
|
|
|
|
|
|
source = source,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
description = desc,
|
|
|
|
description = desc,
|
|
|
|
altTitles = setOfNotNull(alt),
|
|
|
|
altTitles = setOfNotNull(alt),
|
|
|
|
state = state,
|
|
|
|
state = state,
|
|
|
|
|