New Source: SobatManKu (#18463)
* New Source: SobatManKu * Move to ZeistMangaTheme * Change source icon Co-Authored-By: Luqman <16263232+Riztard@users.noreply.github.com> * Add feature: latest update --------- Co-authored-by: Luqman <16263232+Riztard@users.noreply.github.com>
This commit is contained in:
parent
aba668c1bf
commit
ae142c6066
81
multisrc/overrides/zeistmanga/sobatmanku/SobatManKu.kt
Normal file
81
multisrc/overrides/zeistmanga/sobatmanku/SobatManKu.kt
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
package eu.kanade.tachiyomi.extension.id.sobatmanku
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||||
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||||
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import okhttp3.Request
|
||||||
|
import okhttp3.Response
|
||||||
|
|
||||||
|
class SobatManKu : ZeistManga("SobatManKu", "https://www.sobatmanku19.site", "id") {
|
||||||
|
|
||||||
|
override val supportsLatest = true
|
||||||
|
|
||||||
|
override val hasFilters = true
|
||||||
|
|
||||||
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
|
return GET("$baseUrl/search/label/Update", headers)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||||
|
val doc = response.asJsoup()
|
||||||
|
val selector = doc.select(".grid.gtc-f141a > div")
|
||||||
|
val mangas = selector.map { element ->
|
||||||
|
|
||||||
|
SManga.create().apply {
|
||||||
|
element.select("a:nth-child(2)").let {
|
||||||
|
title = it.text()
|
||||||
|
setUrlWithoutDomain(it.attr("href"))
|
||||||
|
}
|
||||||
|
thumbnail_url = element.select("img").first()!!.attr("abs:src")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return MangasPage(mangas, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun mangaDetailsParse(response: Response): SManga {
|
||||||
|
val document = response.asJsoup()
|
||||||
|
val profileManga = document.selectFirst(".grid.gtc-235fr")!!
|
||||||
|
return SManga.create().apply {
|
||||||
|
thumbnail_url = profileManga.selectFirst("img")!!.attr("abs:src")
|
||||||
|
description = profileManga.select("#synopsis").text()
|
||||||
|
genre = profileManga.select("div.mt-15 > a[rel=tag]").joinToString { it.text() }
|
||||||
|
|
||||||
|
val infoElement = profileManga.select(".y6x11p")
|
||||||
|
infoElement.forEach {
|
||||||
|
val descText = it.select("span.dt").text()
|
||||||
|
when (it.ownText().trim()) {
|
||||||
|
"Status" -> {
|
||||||
|
status = parseStatus(descText)
|
||||||
|
}
|
||||||
|
|
||||||
|
"Author" -> {
|
||||||
|
author = descText
|
||||||
|
}
|
||||||
|
|
||||||
|
"Artist" -> {
|
||||||
|
artist = descText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
|
return super.chapterListParse(response).onEach {
|
||||||
|
// fix some chapter name
|
||||||
|
it.name = it.name.run {
|
||||||
|
substring(indexOf("Chapter"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun parseStatus(element: String): Int = when (element.lowercase()) {
|
||||||
|
"ongoing" -> SManga.ONGOING
|
||||||
|
"completed" -> SManga.COMPLETED
|
||||||
|
else -> SManga.UNKNOWN
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
multisrc/overrides/zeistmanga/sobatmanku/res/web_hi_res_512.png
Normal file
BIN
multisrc/overrides/zeistmanga/sobatmanku/res/web_hi_res_512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
@ -59,8 +59,8 @@ abstract class ZeistManga(
|
|||||||
return MangasPage(mangalist, false)
|
return MangasPage(mangalist, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int) = throw UnsupportedOperationException("Not used.")
|
override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException("Not used.")
|
||||||
override fun latestUpdatesParse(response: Response) = throw UnsupportedOperationException("Not used.")
|
override fun latestUpdatesParse(response: Response): MangasPage = throw UnsupportedOperationException("Not used.")
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val startIndex = maxMangaResults * (page - 1) + 1
|
val startIndex = maxMangaResults * (page - 1) + 1
|
||||||
|
@ -21,6 +21,7 @@ class ZeistMangaGenerator : ThemeSourceGenerator {
|
|||||||
SingleLang("Muslos No Sekai", "https://muslosnosekai.blogspot.com", "es"),
|
SingleLang("Muslos No Sekai", "https://muslosnosekai.blogspot.com", "es"),
|
||||||
SingleLang("ShiyuraSub", "https://shiyurasub.blogspot.com", "id"),
|
SingleLang("ShiyuraSub", "https://shiyurasub.blogspot.com", "id"),
|
||||||
SingleLang("Tooncubus", "https://www.tooncubus.top", "id", isNsfw = true),
|
SingleLang("Tooncubus", "https://www.tooncubus.top", "id", isNsfw = true),
|
||||||
|
SingleLang("SobatManKu", "https://www.sobatmanku19.site", "id"),
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user