Add, fix sources
Manual addition of lang on Bato.To Add multi tag , lang and rework tags on exhentai Add lang on imhentai
parent
b3be87f541
commit
d6b578acb0
@ -0,0 +1,59 @@
|
||||
package org.koitharu.kotatsu.parsers.site.heancmsalt.es
|
||||
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||
import org.koitharu.kotatsu.parsers.model.Manga
|
||||
import org.koitharu.kotatsu.parsers.model.MangaChapter
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
import org.koitharu.kotatsu.parsers.site.heancmsalt.HeanCmsAlt
|
||||
import org.koitharu.kotatsu.parsers.util.attrAsRelativeUrl
|
||||
import org.koitharu.kotatsu.parsers.util.domain
|
||||
import org.koitharu.kotatsu.parsers.util.generateUid
|
||||
import org.koitharu.kotatsu.parsers.util.mapChapters
|
||||
import org.koitharu.kotatsu.parsers.util.parseHtml
|
||||
import org.koitharu.kotatsu.parsers.util.selectFirstOrThrow
|
||||
import org.koitharu.kotatsu.parsers.util.toAbsoluteUrl
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
@MangaSourceParser("BRAKEOUT", "Brakeout", "es")
|
||||
internal class Brakeout(context: MangaLoaderContext) :
|
||||
HeanCmsAlt(context, MangaSource.BRAKEOUT, "brakeout.xyz", 10) {
|
||||
override val selectManga = "div.grid.grid-cols-2 figure"
|
||||
override val selectMangaTitle = "figcaption"
|
||||
|
||||
override val selectDesc = "#section-sinopsis p"
|
||||
override val selectChapter = ".grid-capitulos div.contenedor-capitulo-miniatura"
|
||||
override val selectChapterTitle = "#name"
|
||||
override val selectChapterDate = "time"
|
||||
override val datePattern = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"
|
||||
override suspend fun getDetails(manga: Manga): Manga {
|
||||
val fullUrl = manga.url.toAbsoluteUrl(domain)
|
||||
val doc = webClient.httpGet(fullUrl).parseHtml()
|
||||
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
|
||||
return manga.copy(
|
||||
altTitle = doc.selectFirst(selectAlt)?.text().orEmpty(),
|
||||
description = doc.selectFirstOrThrow(selectDesc).html(),
|
||||
chapters = doc.select(selectChapter)
|
||||
.mapChapters(reversed = true) { i, div ->
|
||||
val a = div.selectFirstOrThrow("a")
|
||||
val dateText = div.selectFirstOrThrow(selectChapterDate).text()
|
||||
val url = a.attrAsRelativeUrl("href").toAbsoluteUrl(domain)
|
||||
MangaChapter(
|
||||
id = generateUid(url),
|
||||
name = div.selectFirstOrThrow(selectChapterTitle).text(),
|
||||
number = i + 1,
|
||||
url = url,
|
||||
scanlator = null,
|
||||
uploadDate = parseChapterDate(
|
||||
dateFormat,
|
||||
dateText,
|
||||
),
|
||||
branch = null,
|
||||
source = source,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
override val selectPage = "section img.readImg"
|
||||
}
|
||||
Loading…
Reference in New Issue