small fix and rename bad typo

pull/223/head
devi 3 years ago
parent 0b54029e26
commit 2bf29da2ea

@ -88,13 +88,12 @@ internal abstract class FmreaderParser(
return doc.select("div.thumb-item-flow").map { div ->
val href = div.selectFirstOrThrow("div.series-title").selectFirstOrThrow("a").attrAsRelativeUrl("href")
val href = div.selectFirstOrThrow("div.series-title a").attrAsRelativeUrl("href")
Manga(
id = generateUid(href),
url = href,
publicUrl = href.toAbsoluteUrl(div.host ?: domain),
coverUrl = div.selectFirstOrThrow("div.img-in-ratio").attr("style").substringAfter("('")
.substringBeforeLast("')"),
coverUrl = div.selectFirstOrThrow("div.img-in-ratio").attr("style").substringAfter("('").substringBeforeLast("')"),
title = div.selectFirstOrThrow("div.series-title").text().orEmpty(),
altTitle = null,
rating = RATING_UNKNOWN,
@ -108,7 +107,7 @@ internal abstract class FmreaderParser(
}
override suspend fun getTags(): Set<MangaTag> {
val doc = webClient.httpGet("https://$domain/$listeurl/").parseHtml()
val doc = webClient.httpGet("https://$domain/$listeurl").parseHtml()
return doc.select("ul.filter-type li").mapNotNullToSet { li ->
val a = li.selectFirst("a") ?: return@mapNotNullToSet null
val href = a.attr("href").substringAfter("manga-list-genre-").substringBeforeLast(".html")
@ -120,7 +119,7 @@ internal abstract class FmreaderParser(
}
}
protected open val selectdesc = "div.summary-content"
protected open val selectDesc = "div.summary-content"
protected open val selectState = "ul.manga-info li:contains(Status) a"
protected open val selectAlt = "ul.manga-info li:contains(Other names)"
protected open val selectAut = "ul.manga-info li:contains(Author(s)) a"
@ -132,7 +131,7 @@ internal abstract class FmreaderParser(
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = doc.selectFirstOrThrow(selectdesc).html()
val desc = doc.selectFirstOrThrow(selectDesc).html()
val stateDiv = doc.selectFirst(selectState)
@ -163,14 +162,14 @@ internal abstract class FmreaderParser(
}
protected open val selectdate = "div.chapter-time"
protected open val selectchapter = "ul.list-chapters a"
protected open val selectDate = "div.chapter-time"
protected open val selectChapter = "ul.list-chapters a"
protected open suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.body().select(selectchapter).mapChapters(reversed = true) { i, a ->
return doc.body().select(selectChapter).mapChapters(reversed = true) { i, a ->
val href = a.attrAsRelativeUrl("href")
val dateText = a.selectFirst(selectdate)?.text()
val dateText = a.selectFirst(selectDate)?.text()
MangaChapter(
id = generateUid(href),
name = a.selectFirstOrThrow("div.chapter-name").text(),
@ -188,6 +187,7 @@ internal abstract class FmreaderParser(
}
protected open val selectPage = "div.chapter-content img"
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
val fullUrl = chapter.url.toAbsoluteUrl(domain)
val doc = webClient.httpGet(fullUrl).parseHtml()

@ -42,7 +42,7 @@ internal class Manhwa18Com(context: MangaLoaderContext) :
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = doc.selectFirstOrThrow(selectdesc).html()
val desc = doc.selectFirstOrThrow(selectDesc).html()
val stateDiv = doc.selectFirst(selectState)
@ -74,9 +74,9 @@ internal class Manhwa18Com(context: MangaLoaderContext) :
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.body().select(selectchapter).mapChapters(reversed = true) { i, a ->
return doc.body().select(selectChapter).mapChapters(reversed = true) { i, a ->
val href = a.attrAsRelativeUrl("href")
val dateText = a.selectFirst(selectdate)?.text()?.substringAfter("- ")
val dateText = a.selectFirst(selectDate)?.text()?.substringAfter("- ")
MangaChapter(
id = generateUid(href),
name = a.selectFirstOrThrow("div.chapter-name").text(),

@ -30,12 +30,12 @@ import java.text.SimpleDateFormat
internal class Klz9(context: MangaLoaderContext) :
FmreaderParser(context, MangaSource.KLZ9, "klz9.com") {
override val selectdesc = "div.row:contains(Description)"
override val selectDesc = "div.row:contains(Description)"
override val selectState = "ul.manga-info li:contains(Status) a"
override val selectAlt = "ul.manga-info li:contains(Other name (s))"
override val selectTag = "ul.manga-info li:contains(Genre(s)) a"
override val selectchapter = "tr"
override val selectdate = "td i"
override val selectChapter = "tr"
override val selectDate = "td i"
override val selectPage = "img"
override suspend fun getListPage(
@ -100,9 +100,9 @@ internal class Klz9(context: MangaLoaderContext) :
val docload =
webClient.httpGet("https://$domain/app/manga/controllers/cont.listChapter.php?slug=$slug").parseHtml()
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return docload.body().select(selectchapter).mapChapters(reversed = true) { i, a ->
return docload.body().select(selectChapter).mapChapters(reversed = true) { i, a ->
val href = "/" + a.selectFirstOrThrow("a.chapter").attrAsRelativeUrl("href")
val dateText = a.selectFirst(selectdate)?.text()
val dateText = a.selectFirst(selectDate)?.text()
MangaChapter(
id = generateUid(href),
name = a.selectFirstOrThrow("a").text(),

@ -30,9 +30,9 @@ internal class WeLoveManga(context: MangaLoaderContext) :
val docload =
webClient.httpGet("https://$domain/app/manga/controllers/cont.Listchapter.php?mid=$mid").parseHtml()
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return docload.body().select(selectchapter).mapChapters(reversed = true) { i, a ->
return docload.body().select(selectChapter).mapChapters(reversed = true) { i, a ->
val href = a.selectFirstOrThrow("a").attrAsRelativeUrl("href")
val dateText = a.selectFirst(selectdate)?.text()
val dateText = a.selectFirst(selectDate)?.text()
MangaChapter(
id = generateUid(href),
name = a.selectFirstOrThrow("a").text(),

@ -258,11 +258,9 @@ internal abstract class MadaraParser(
}
}
protected open val selectdesc =
protected open val selectDesc =
"div.description-summary div.summary__content, div.summary_content div.post-content_item > h5 + div, div.summary_content div.manga-excerpt, div.post-content div.manga-summary, div.post-content div.desc, div.c-page__content div.summary__content"
protected open val selectgenre = "div.genres-content a"
protected open val selectdate = "span.chapter-release-date i"
protected open val selectchapter = "li.wp-manga-chapter"
protected open val selectGenre = "div.genres-content a"
protected open val selectTestAsync = "div.listing-chapters_wrap"
override suspend fun getDetails(manga: Manga): Manga = coroutineScope {
@ -278,7 +276,7 @@ internal abstract class MadaraParser(
async { getChapters(manga, doc) }
}
val desc = body.select(selectdesc).html()
val desc = body.select(selectDesc).html()
val stateDiv = (body.selectFirst("div.post-content_item:contains(Status)")
?: body.selectFirst("div.post-content_item:contains(Statut)")
@ -307,7 +305,7 @@ internal abstract class MadaraParser(
.firstOrNull()?.tableValue()?.text()?.trim()
manga.copy(
tags = doc.body().select(selectgenre).mapNotNullToSet { a ->
tags = doc.body().select(selectGenre).mapNotNullToSet { a ->
MangaTag(
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
title = a.text().toTitleCase(),
@ -322,13 +320,16 @@ internal abstract class MadaraParser(
}
protected open val selectDate = "span.chapter-release-date i"
protected open val selectChapter = "li.wp-manga-chapter"
protected open suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.body().select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.body().select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),
@ -359,11 +360,11 @@ internal abstract class MadaraParser(
}
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),
@ -408,7 +409,7 @@ internal abstract class MadaraParser(
)
val unsaltedCiphertext = context.decodeBase64(chapterData.getString("ct"))
val salt = chapterData.getString("s").toString().decodeHex()
val ciphertext = SALTED + salt + unsaltedCiphertext
val ciphertext = "Salted__".toByteArray(Charsets.UTF_8) + salt + unsaltedCiphertext
val rawImgArray = CryptoAES(context).decrypt(context.encodeBase64(ciphertext), password)
val imgArrayString = rawImgArray.filterNot { c -> c == '[' || c == ']' || c == '\\' || c == '"' }
@ -567,7 +568,5 @@ internal abstract class MadaraParser(
return chunked(2).map { it.toInt(16).toByte() }.toByteArray()
}
const val URL_SEARCH_PREFIX = "slug:"
val SALTED = "Salted__".toByteArray(Charsets.UTF_8)
}
}

@ -20,11 +20,11 @@ internal class Hentaixdickgirl(context: MangaLoaderContext) :
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val root2 = doc.body().selectFirstOrThrow("div.listing-chapters_wrap")
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return root2.select(selectchapter).mapChapters(reversed = true) { i, li ->
return root2.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),

@ -109,7 +109,7 @@ internal class IsekaiScan(context: MangaLoaderContext) :
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
@ -121,7 +121,7 @@ internal class IsekaiScan(context: MangaLoaderContext) :
branch = null,
uploadDate = parseChapterDate(
dateFormat,
li.selectFirst(selectdate)?.text(),
li.selectFirst(selectDate)?.text(),
),
scanlator = null,
source = source,

@ -16,8 +16,8 @@ internal class MangaDass(context: MangaLoaderContext) :
override val datePattern = "dd MMM yyyy"
override val withoutAjax = true
override val selectchapter = "li.a-h"
override val selectdesc = "div.ss-manga"
override val selectChapter = "li.a-h"
override val selectDesc = "div.ss-manga"
override suspend fun getListPage(
page: Int,
@ -110,7 +110,7 @@ internal class MangaDass(context: MangaLoaderContext) :
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = body.select(selectdesc).html()
val desc = body.select(selectDesc).html()
val stateDiv = (body.selectFirst("div.post-content_item:contains(Status)"))?.selectLast("div.summary-content")
@ -128,7 +128,7 @@ internal class MangaDass(context: MangaLoaderContext) :
.firstOrNull()?.tableValue()?.text()?.trim()
manga.copy(
tags = doc.body().select(selectgenre).mapNotNullToSet { a ->
tags = doc.body().select(selectGenre).mapNotNullToSet { a ->
MangaTag(
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
title = a.text().toTitleCase(),
@ -145,11 +145,11 @@ internal class MangaDass(context: MangaLoaderContext) :
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val root2 = doc.body().selectFirstOrThrow("div.panel-manga-chapter")
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return root2.select(selectchapter).mapChapters(reversed = true) { i, li ->
return root2.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),

@ -16,8 +16,8 @@ internal class MangaDna(context: MangaLoaderContext) :
override val datePattern = "dd MMM yyyy"
override val withoutAjax = true
override val selectdesc = "div.dsct"
override val selectchapter = "li.a-h"
override val selectDesc = "div.dsct"
override val selectChapter = "li.a-h"
override suspend fun getListPage(
page: Int,
@ -108,7 +108,7 @@ internal class MangaDna(context: MangaLoaderContext) :
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = body.select(selectdesc).html()
val desc = body.select(selectDesc).html()
val stateDiv = (body.selectFirst("div.post-content_item:contains(Status)"))?.selectLast("div.summary-content")
@ -126,7 +126,7 @@ internal class MangaDna(context: MangaLoaderContext) :
.firstOrNull()?.tableValue()?.text()?.trim()
manga.copy(
tags = doc.body().select(selectgenre).mapNotNullToSet { a ->
tags = doc.body().select(selectGenre).mapNotNullToSet { a ->
MangaTag(
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
title = a.text().toTitleCase(),
@ -143,11 +143,11 @@ internal class MangaDna(context: MangaLoaderContext) :
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val root2 = doc.body().selectFirstOrThrow("div.panel-manga-chapter")
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return root2.select(selectchapter).mapChapters(reversed = true) { i, li ->
return root2.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),

@ -9,6 +9,6 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
internal class MangaDods(context: MangaLoaderContext) :
MadaraParser(context, MangaSource.MANGADODS, "www.mangadods.com") {
override val selectdesc = "div.description-summary"
override val selectDesc = "div.description-summary"
override val datePattern = "dd-MMM"
}

@ -24,11 +24,11 @@ internal class ManhwaTop(context: MangaLoaderContext) :
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
val dateText2 = if (dateText != "Complete") {
dateText

@ -9,6 +9,6 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
internal class Manhwasco(context: MangaLoaderContext) :
MadaraParser(context, MangaSource.MANHWASCO, "manhwasco.net") {
override val selectgenre = "div.mg_genres a"
override val selectGenre = "div.mg_genres a"
}

@ -10,7 +10,7 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
internal class MmScans(context: MangaLoaderContext) :
MadaraParser(context, MangaSource.MMSCANS, "mm-scans.org") {
override val selectchapter = "li.chapter-li"
override val selectdesc = "div.summary-text"
override val selectChapter = "li.chapter-li"
override val selectDesc = "div.summary-text"
override val withoutAjax = true
}

@ -22,11 +22,11 @@ internal class ManhwaLatino(context: MangaLoaderContext) :
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val root2 = doc.body().selectFirstOrThrow("div.content-area")
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return root2.select(selectchapter).mapChapters(reversed = true) { i, li ->
return root2.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val dateText2 = if (dateText == "¡Recién publicado!") {
"1 mins ago"
} else {

@ -17,9 +17,9 @@ import java.util.*
internal class HachiManga(context: MangaLoaderContext) : MadaraParser(context, MangaSource.HACHIMANGA, "hachiraw.com") {
override val datePattern = "MMMM dd, yyyy"
override val selectchapter = "li.a-h"
override val selectdate = "span.chapter-tim"
override val selectdesc = "div.dsct"
override val selectChapter = "li.a-h"
override val selectDate = "span.chapter-tim"
override val selectDesc = "div.dsct"
override val tagPrefix = "genre/"
override val sortOrders: Set<SortOrder> = EnumSet.of(
@ -119,7 +119,7 @@ internal class HachiManga(context: MangaLoaderContext) : MadaraParser(context, M
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = body.select(selectdesc).html()
val desc = body.select(selectDesc).html()
val stateDiv = (body.selectFirst("div.post-content_item:contains(状態)"))?.selectLast("div.summary-content")
@ -135,7 +135,7 @@ internal class HachiManga(context: MangaLoaderContext) : MadaraParser(context, M
?.text()?.trim()
manga.copy(
tags = doc.body().select(selectgenre).mapNotNullToSet { a ->
tags = doc.body().select(selectGenre).mapNotNullToSet { a ->
MangaTag(
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
title = a.text().toTitleCase(),
@ -152,11 +152,11 @@ internal class HachiManga(context: MangaLoaderContext) : MadaraParser(context, M
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val root2 = doc.body().selectFirstOrThrow("div.manga-content")
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return root2.select(selectchapter).mapChapters(reversed = true) { i, li ->
return root2.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirst("a")
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),

@ -27,11 +27,11 @@ internal class LimaScans(context: MangaLoaderContext) :
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirstOrThrow("a")
val href = a.attrAsRelativeUrl("href")
val link = href + stylepage
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
val name = a.selectFirst("p")?.text() ?: a.ownText()
MangaChapter(
id = generateUid(href),

@ -11,7 +11,7 @@ import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
internal class Mangabilgini(context: MangaLoaderContext) :
MadaraParser(context, MangaSource.MANGABILGINI, "mangabilgini.com", 44) {
override val selectdesc = "div.ozet__icerik"
override val selectDesc = "div.ozet__icerik"
override val postreq = true
override val datePattern = "d MMMM yyyy"
}

@ -123,7 +123,7 @@ internal class Saytruyenhay(context: MangaLoaderContext) :
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = body.select(selectdesc).let {
val desc = body.select(selectDesc).let {
if (it.select("p").text().isNotEmpty()) {
it.select("p").joinToString(separator = "\n\n") { p ->
p.text().replace("<br>", "\n")
@ -160,7 +160,7 @@ internal class Saytruyenhay(context: MangaLoaderContext) :
.firstOrNull()?.tableValue()?.text()?.trim()
manga.copy(
tags = doc.body().select(selectgenre).mapNotNullToSet { a ->
tags = doc.body().select(selectGenre).mapNotNullToSet { a ->
MangaTag(
key = a.attr("href").removeSuffix("/").substringAfterLast('/'),
title = a.text().toTitleCase(),

@ -124,9 +124,7 @@ internal abstract class Manga18Parser(
}
}
protected open val selectdesc = "div.detail_reviewContent"
protected open val selectdate = "div.item p"
protected open val selectchapter = "div.chapter_box li"
protected open val selectDesc = "div.detail_reviewContent"
protected open val selectState = "div.item:contains(Status) div.info_value"
protected open val selectAlt = "div.item:contains(Other name) div.info_value"
protected open val selectTag = "div.item:contains(Categories) div.info_value a"
@ -138,7 +136,7 @@ internal abstract class Manga18Parser(
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = doc.selectFirstOrThrow(selectdesc).html()
val desc = doc.selectFirstOrThrow(selectDesc).html()
val stateDiv = body.selectFirst(selectState)
@ -168,12 +166,15 @@ internal abstract class Manga18Parser(
}
protected open val selectDate = "div.item p"
protected open val selectChapter = "div.chapter_box li"
protected open suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.body().select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.body().select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirstOrThrow("a")
val href = a.attrAsRelativeUrl("href")
val dateText = li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst(selectDate)?.text()
MangaChapter(
id = generateUid(href),
name = a.text(),

@ -27,7 +27,7 @@ internal abstract class MmrcmsParser(
SortOrder.UPDATED,
)
protected open val listeurl = "filterList"
protected open val listUrl = "filterList"
protected open val tagUrl = "manga-list"
protected open val datePattern = "dd MMM. yyyy"
@ -68,7 +68,7 @@ internal abstract class MmrcmsParser(
buildString {
append("https://")
append(domain)
if (page == 2) {
if (page > 1) {
append("/STOP")
}
}
@ -77,7 +77,7 @@ internal abstract class MmrcmsParser(
append("https://")
append(domain)
append("/$listeurl/")
append("/$listUrl/")
append("?page=")
append(page.toString())
append("&asc=true&author=&tag=")
@ -161,7 +161,7 @@ internal abstract class MmrcmsParser(
}
}
protected open val selectdesc = "div.well"
protected open val selectDesc = "div.well"
protected open val selectState = "dt:contains(Statut)"
protected open val selectAlt = "dt:contains(Autres noms)"
protected open val selectAut = "dt:contains(Auteur(s))"
@ -174,7 +174,7 @@ internal abstract class MmrcmsParser(
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = doc.selectFirstOrThrow(selectdesc).text()
val desc = doc.selectFirstOrThrow(selectDesc).text()
val stateDiv = body.selectFirst(selectState)?.nextElementSibling()
@ -208,16 +208,16 @@ internal abstract class MmrcmsParser(
}
protected open val selectdate = "div.date-chapter-title-rtl"
protected open val selectchapter = "ul.chapters > li:not(.btn)"
protected open val selectDate = "div.date-chapter-title-rtl"
protected open val selectChapter = "ul.chapters > li:not(.btn)"
protected open suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
return doc.body().select(selectchapter).mapChapters(reversed = true) { i, li ->
return doc.body().select(selectChapter).mapChapters(reversed = true) { i, li ->
val a = li.selectFirstOrThrow("a")
val href = a.attrAsRelativeUrl("href")
val dateText = li.selectFirst(selectdate)?.text()
val dateText = li.selectFirst(selectDate)?.text()
MangaChapter(
id = generateUid(href),
name = li.selectFirstOrThrow("h5").text(),

@ -14,5 +14,5 @@ internal class ScanFrOrg(context: MangaLoaderContext) :
override val sourceLocale: Locale = Locale.ENGLISH
override val selectchapter = "ul.chapterszozo li"
override val selectChapter = "ul.chapterszozo li"
}

@ -20,7 +20,7 @@ import java.util.Locale
internal class Animaregia(context: MangaLoaderContext) :
MmrcmsParser(context, MangaSource.ANIMAREGIA, "animaregia.net") {
override val selectdate = "div.col-md-4"
override val selectDate = "div.col-md-4"
override val sourceLocale: Locale = Locale.ENGLISH
//temporary
@ -36,7 +36,7 @@ internal class Animaregia(context: MangaLoaderContext) :
val chaptersDeferred = async { getChapters(manga, doc) }
val desc = doc.select(selectdesc).text()
val desc = doc.select(selectDesc).text()
val stateDiv = body.selectFirst("li.list-group-item:contains(Status)")?.lastElementChild()

Loading…
Cancel
Save