Add ZScanlation, KomikGesn , Kenhuav2Scan
Fix MangaMate
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package org.koitharu.kotatsu.parsers.site.madara.es
|
||||
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
||||
|
||||
@MangaSourceParser("KENHUAV2SCANK", "Kenhuav2Scan", "es")
|
||||
internal class Kenhuav2Scan(context: MangaLoaderContext) :
|
||||
MadaraParser(context, MangaSource.KENHUAV2SCANK, "kenhuav2scan.com")
|
||||
@@ -11,6 +11,4 @@ internal class MangaMate(context: MangaLoaderContext) :
|
||||
MangaReaderParser(context, MangaSource.MANGAMATE, "manga-mate.org", pageSize = 10, searchPageSize = 10) {
|
||||
override val datePattern = "M月 d, yyyy"
|
||||
override val sourceLocale: Locale = Locale.ENGLISH
|
||||
override val encodedSrc = true
|
||||
|
||||
}
|
||||
|
||||
@@ -213,6 +213,7 @@ internal abstract class ZeistMangaParser(
|
||||
?: doc.selectFirst("div.y6x11p:contains(Yazar) .dt")
|
||||
|
||||
val desc = doc.getElementById("synopsis") ?: doc.getElementById("Sinopse") ?: doc.getElementById("sinopas")
|
||||
?: doc.selectFirst(".sinopsis")
|
||||
val chaptersDeferred = async { loadChapters(manga.url, doc) }
|
||||
manga.copy(
|
||||
author = author?.text(),
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package org.koitharu.kotatsu.parsers.site.zeistmanga.id
|
||||
|
||||
import org.jsoup.nodes.Document
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||
import org.koitharu.kotatsu.parsers.model.MangaChapter
|
||||
import org.koitharu.kotatsu.parsers.model.MangaPage
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
import org.koitharu.kotatsu.parsers.site.zeistmanga.ZeistMangaParser
|
||||
import org.koitharu.kotatsu.parsers.util.*
|
||||
import org.koitharu.kotatsu.parsers.util.json.toJSONList
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
@MangaSourceParser("KOMIKGES", "KomikGes", "id")
|
||||
internal class KomikGes(context: MangaLoaderContext) :
|
||||
ZeistMangaParser(context, MangaSource.KOMIKGES, "www.komikges.my.id") {
|
||||
|
||||
override suspend fun loadChapters(mangaUrl: String, doc: Document): List<MangaChapter> {
|
||||
val feed = doc.selectFirstOrThrow(".episode-list script").html().substringAfter("('").substringBefore("');")
|
||||
val url = buildString {
|
||||
append("https://")
|
||||
append(domain)
|
||||
append("/feeds/posts/default/-/")
|
||||
append(feed)
|
||||
append("?alt=json&orderby=published&max-results=9999")
|
||||
}
|
||||
val json =
|
||||
webClient.httpGet(url).parseJson().getJSONObject("feed").getJSONArray("entry").toJSONList().reversed()
|
||||
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
|
||||
return json.mapIndexedNotNull { i, j ->
|
||||
val name = j.getJSONObject("title").getString("\$t")
|
||||
val href =
|
||||
j.getJSONArray("link").toJSONList().first { it.getString("rel") == "alternate" }.getString("href")
|
||||
val dateText = j.getJSONObject("published").getString("\$t").substringBefore("T")
|
||||
val slug = mangaUrl.substringAfterLast('/')
|
||||
val slugChapter = href.substringAfterLast('/')
|
||||
if (slug == slugChapter) {
|
||||
return@mapIndexedNotNull null
|
||||
}
|
||||
MangaChapter(
|
||||
id = generateUid(href),
|
||||
url = href,
|
||||
name = name,
|
||||
number = i + 1,
|
||||
branch = null,
|
||||
uploadDate = dateFormat.tryParse(dateText),
|
||||
scanlator = null,
|
||||
source = source,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
|
||||
|
||||
val doc = webClient.httpGet(chapter.url.toAbsoluteUrl(domain)).parseHtml()
|
||||
|
||||
return doc.selectFirstOrThrow("script:containsData(let data_content =)").data().split("src\\x3d\\x22").drop(1)
|
||||
|
||||
.map { img ->
|
||||
val url = img.substringBefore("\\x22")
|
||||
MangaPage(
|
||||
id = generateUid(url),
|
||||
url = url,
|
||||
preview = null,
|
||||
source = source,
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.koitharu.kotatsu.parsers.site.zeistmanga.pt
|
||||
|
||||
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
||||
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
||||
import org.koitharu.kotatsu.parsers.model.ContentType
|
||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||
import org.koitharu.kotatsu.parsers.site.zeistmanga.ZeistMangaParser
|
||||
|
||||
@MangaSourceParser("ZSCANLATION", "ZScanlation", "pt", ContentType.HENTAI)
|
||||
internal class ZScanlation(context: MangaLoaderContext) :
|
||||
ZeistMangaParser(context, MangaSource.ZSCANLATION, "www.zscanlation.com") {
|
||||
override val sateOngoing: String = "Em Lançamento"
|
||||
override val sateFinished: String = "Completo"
|
||||
override val sateAbandoned: String = "Dropado"
|
||||
}
|
||||
Reference in New Issue
Block a user