KomikIndo.co: fix manga details N chapter timestamp (#10122)
* KomikIndo.co: fix manga details & chapter timestamp * cleanup
This commit is contained in:
parent
e5378fc4ea
commit
8b7c91627d
|
@ -3,6 +3,5 @@ package eu.kanade.tachiyomi.extension.en.mangagreat
|
|||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
|
||||
class MangaGreat : Madara("MangaGreat", "https://mangagreat.com", "en") {
|
||||
override val pageListParseSelector= "div.page-break, li.blocks-gallery-item, .reading-content .text-left:not(:has(.blocks-gallery-item)) img"
|
||||
|
||||
override val pageListParseSelector = "div.page-break, li.blocks-gallery-item, .reading-content .text-left:not(:has(.blocks-gallery-item)) img"
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara
|
|||
class ManhuaUS : Madara("ManhuaUS", "https://manhuaus.com", "en") {
|
||||
override val useNewChapterEndpoint: Boolean = true
|
||||
|
||||
override val pageListParseSelector= "div.page-break, li.blocks-gallery-item, .reading-content .text-left:not(:has(.blocks-gallery-item)) img"
|
||||
override val pageListParseSelector = "div.page-break, li.blocks-gallery-item, .reading-content .text-left:not(:has(.blocks-gallery-item)) img"
|
||||
}
|
||||
|
|
|
@ -3,19 +3,18 @@ package eu.kanade.tachiyomi.extension.id.komikindoco
|
|||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonArray
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import okhttp3.OkHttpClient
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class KomikindoCo : WPMangaStream("KomikIndo.co", "https://komikindo.co", "id", SimpleDateFormat("dd-MM-yyyy", Locale.US)) {
|
||||
class KomikindoCo : WPMangaStream("KomikIndo.co", "https://komikindo.co", "id", SimpleDateFormat("MMM dd, yyyy", Locale("id"))) {
|
||||
// Formerly "Komikindo.co"
|
||||
override val id = 734619124437406170
|
||||
|
||||
|
@ -29,13 +28,33 @@ class KomikindoCo : WPMangaStream("KomikIndo.co", "https://komikindo.co", "id",
|
|||
|
||||
override val hasProjectPage = true
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
val urlElement = element.select(".lchx > a, span.leftoff a, div.eph-num > a").first()
|
||||
val chapter = SChapter.create()
|
||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||
chapter.name = if (urlElement.select("span.chapternum").isNotEmpty()) urlElement.select("span.chapternum").text() else urlElement.text()
|
||||
chapter.date_upload = element.select("span .waktu").firstOrNull()?.text()?.let { parseChapterDate(it) } ?: 0
|
||||
return chapter
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
return SManga.create().apply {
|
||||
document.select(".seriestucontent").firstOrNull()?.let { infoElement ->
|
||||
genre = infoElement.select(".seriestugenre a").joinToString { it.text() }
|
||||
status = parseStatus(infoElement.select(".infotable tr:contains(Status) td:last-child").firstOrNull()?.ownText())
|
||||
author = infoElement.select(".infotable tr:contains(Author) td:last-child").firstOrNull()?.ownText()
|
||||
description = infoElement.select(".entry-content-single[itemprop=\"description\"]").joinToString("\n") { it.text() }
|
||||
thumbnail_url = infoElement.select("div.thumb img").imgAttr()
|
||||
|
||||
// add series type(manga/manhwa/manhua/other) thinggy to genre
|
||||
document.select(seriesTypeSelector).firstOrNull()?.ownText()?.let {
|
||||
if (it.isEmpty().not() && genre!!.contains(it, true).not()) {
|
||||
genre += if (genre!!.isEmpty()) it else ", $it"
|
||||
}
|
||||
}
|
||||
|
||||
// add alternative name to manga description
|
||||
document.select(altNameSelector).firstOrNull()?.ownText()?.let {
|
||||
if (it.isBlank().not() && it != "N/A" && it != "-") {
|
||||
description = when {
|
||||
description.isNullOrBlank() -> altName + it
|
||||
else -> description + "\n\n$altName" + it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val json: Json by injectLazy()
|
||||
|
|
|
@ -25,7 +25,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Sekte Komik", "https://sektekomik.com", "id", overrideVersionCode = 3),
|
||||
SingleLang("Komik Station", "https://komikstation.com", "id", overrideVersionCode = 2),
|
||||
SingleLang("Non-Stop Scans", "https://www.nonstopscans.com", "en", className = "NonStopScans"),
|
||||
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 2),
|
||||
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
||||
SingleLang("Readkomik", "https://readkomik.com", "en", className = "ReadKomik", overrideVersionCode = 1),
|
||||
SingleLang("MangaIndonesia", "https://mangaindonesia.net", "id"),
|
||||
SingleLang("Liebe Schnee Hiver", "https://www.liebeschneehiver.com", "tr"),
|
||||
|
|
Loading…
Reference in New Issue