KomikCast: fix website redesign (#6216)
* update some element * fix chapter list
This commit is contained in:
parent
7316207883
commit
77bd913513
|
@ -1,18 +1,19 @@
|
|||
package eu.kanade.tachiyomi.extension.id.komikcast
|
||||
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import java.util.concurrent.TimeUnit
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
class KomikCast : WPMangaStream("Komik Cast", "https://komikcast.com", "id") {
|
||||
// Formerly "Komik Cast (WP Manga Stream)"
|
||||
|
@ -26,6 +27,8 @@ class KomikCast : WPMangaStream("Komik Cast", "https://komikcast.com", "id") {
|
|||
.addNetworkInterceptor(rateLimitInterceptor)
|
||||
.build()
|
||||
|
||||
override fun popularMangaSelector() = "div.list-update_item"
|
||||
|
||||
override fun popularMangaRequest(page: Int): Request {
|
||||
return GET("$baseUrl/daftar-komik/page/$page/?order=popular", headers)
|
||||
}
|
||||
|
@ -77,16 +80,40 @@ class KomikCast : WPMangaStream("Komik Cast", "https://komikcast.com", "id") {
|
|||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
manga.thumbnail_url = element.select("div.limit img").attr("src")
|
||||
element.select("div.bigor > a").first().let {
|
||||
manga.thumbnail_url = element.select("div.list-update_item-image img").imgAttr()
|
||||
element.select("a").first().let {
|
||||
manga.setUrlWithoutDomain(it.attr("href"))
|
||||
manga.title = it.attr("title")
|
||||
}
|
||||
return manga
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
return SManga.create().apply {
|
||||
document.select("div.komik_info").firstOrNull()?.let { infoElement ->
|
||||
genre = infoElement.select(".komik_info-content-genre a").joinToString { it.text() }
|
||||
status = parseStatus(infoElement.select("span:contains(Status:)").firstOrNull()?.ownText())
|
||||
author = infoElement.select("span:contains(Author:)").firstOrNull()?.ownText()
|
||||
artist = infoElement.select("span:contains(Author:)").firstOrNull()?.ownText()
|
||||
description = infoElement.select("div.komik_info-description-sinopsis p").joinToString("\n") { it.text() }
|
||||
thumbnail_url = infoElement.select("div.komik_info-content-thumbnail img").imgAttr()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = "div.komik_info-chapters li"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
val urlElement = element.select("a").first()
|
||||
val chapter = SChapter.create()
|
||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||
chapter.name = urlElement.text()
|
||||
chapter.date_upload = element.select(".chapter-link-time").firstOrNull()?.text()?.let { parseChapterDate(it) } ?: 0
|
||||
return chapter
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select("div#readerarea img.size-full")
|
||||
return document.select("div#chapter_body .main-reading-area img.size-full")
|
||||
.mapIndexed { i, img -> Page(i, "", img.attr("abs:Src")) }
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Shea Manga", "https://sheamanga.my.id", "id"),
|
||||
SingleLang("Kiryuu", "https://kiryuu.co", "id"),
|
||||
SingleLang("Komik AV", "https://komikav.com", "id"),
|
||||
SingleLang("Komik Cast", "https://komikcast.com", "id"),
|
||||
SingleLang("Komik Cast", "https://komikcast.com", "id", overrideVersionCode = 3), // make it from v0 to v3 to force update user who still use old standalone ext, they will need to migrate
|
||||
SingleLang("West Manga", "https://westmanga.info", "id"),
|
||||
SingleLang("Komik GO", "https://komikgo.com", "id"),
|
||||
SingleLang("MangaSwat", "https://mangaswat.com", "ar"),
|
||||
|
|
Loading…
Reference in New Issue