mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 02:12:42 +01:00
Add GistamisHouse (#2195)
* Add GistamisHouse * is NSFW * Fix Yokai * I need a linter * amazing * bump
This commit is contained in:
parent
a80db51115
commit
f5d22d8d31
@ -2,4 +2,4 @@ plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 8
|
||||
baseVersionCode = 9
|
||||
|
@ -27,7 +27,7 @@ abstract class ZeistManga(
|
||||
|
||||
override val supportsLatest = true
|
||||
|
||||
private val json: Json by injectLazy()
|
||||
protected val json: Json by injectLazy()
|
||||
|
||||
private val intl by lazy { ZeistMangaIntl(lang) }
|
||||
|
||||
@ -63,23 +63,7 @@ abstract class ZeistManga(
|
||||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||
val jsonString = response.body.string()
|
||||
val result = json.decodeFromString<ZeistMangaDto>(jsonString)
|
||||
|
||||
val mangas = result.feed?.entry.orEmpty()
|
||||
.filter { it.category.orEmpty().any { category -> category.term == "Series" } }
|
||||
.filter { !it.category.orEmpty().any { category -> category.term == "Anime" } }
|
||||
.map { it.toSManga(baseUrl) }
|
||||
|
||||
val mangalist = mangas.toMutableList()
|
||||
if (mangas.size == maxMangaResults + 1) {
|
||||
mangalist.removeLast()
|
||||
return MangasPage(mangalist, true)
|
||||
}
|
||||
|
||||
return MangasPage(mangalist, false)
|
||||
}
|
||||
override fun latestUpdatesParse(response: Response) = searchMangaParse(response)
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val startIndex = maxMangaResults * (page - 1) + 1
|
||||
@ -123,7 +107,25 @@ abstract class ZeistManga(
|
||||
return GET(url.build(), headers)
|
||||
}
|
||||
|
||||
override fun searchMangaParse(response: Response) = latestUpdatesParse(response)
|
||||
protected open val excludedCategories: List<String> = listOf("Anime")
|
||||
|
||||
override fun searchMangaParse(response: Response): MangasPage {
|
||||
val jsonString = response.body.string()
|
||||
val result = json.decodeFromString<ZeistMangaDto>(jsonString)
|
||||
|
||||
val mangas = result.feed?.entry.orEmpty()
|
||||
.filter { it.category.orEmpty().any { category -> category.term == "Series" } } // Default category for all series
|
||||
.filterNot { it.category.orEmpty().any { category -> excludedCategories.contains(category.term) } }
|
||||
.map { it.toSManga(baseUrl) }
|
||||
|
||||
val mangalist = mangas.toMutableList()
|
||||
if (mangas.size == maxMangaResults + 1) {
|
||||
mangalist.removeLast()
|
||||
return MangasPage(mangalist, true)
|
||||
}
|
||||
|
||||
return MangasPage(mangalist, false)
|
||||
}
|
||||
|
||||
protected open val statusSelectorList = listOf(
|
||||
"Status",
|
||||
@ -199,13 +201,9 @@ abstract class ZeistManga(
|
||||
val document = response.asJsoup()
|
||||
|
||||
val url = getChapterFeedUrl(document)
|
||||
val res = client.newCall(GET(url, headers)).execute()
|
||||
|
||||
val req = GET(url, headers)
|
||||
val res = client.newCall(req).execute()
|
||||
|
||||
val jsonString = res.body.string()
|
||||
val result = json.decodeFromString<ZeistMangaDto>(jsonString)
|
||||
|
||||
val result = json.decodeFromString<ZeistMangaDto>(res.body.string())
|
||||
return result.feed?.entry?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } }
|
||||
?.map { it.toSChapter(baseUrl) }
|
||||
?: throw Exception("Failed to parse from chapter API")
|
||||
@ -392,6 +390,7 @@ abstract class ZeistManga(
|
||||
"ongoing",
|
||||
"en curso",
|
||||
"en emisión",
|
||||
"activo",
|
||||
"ativo",
|
||||
"lançando",
|
||||
"مستمر",
|
||||
@ -400,10 +399,12 @@ abstract class ZeistManga(
|
||||
protected open val statusCompletedList = listOf(
|
||||
"completed",
|
||||
"completo",
|
||||
"finalizado",
|
||||
)
|
||||
|
||||
protected open val statusHiatusList = listOf(
|
||||
"hiatus",
|
||||
"pausado",
|
||||
)
|
||||
|
||||
protected open val statusCancelledList = listOf(
|
||||
|
@ -5,13 +5,10 @@ import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaDto
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.decodeFromStream
|
||||
import okhttp3.Response
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class Yokai : ZeistManga("Yokai", "https://yokai-team.blogspot.com", "ar") {
|
||||
private val json: Json by injectLazy()
|
||||
|
||||
// ============================== Chapters ==============================
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
|
10
src/es/gistamishouse/build.gradle
Normal file
10
src/es/gistamishouse/build.gradle
Normal file
@ -0,0 +1,10 @@
|
||||
ext {
|
||||
extName = 'Gistamis House'
|
||||
extClass = '.GistamisHouse'
|
||||
themePkg = 'zeistmanga'
|
||||
baseUrl = 'https://gistamishousefansub.blogspot.com'
|
||||
overrideVersionCode = 0
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
BIN
src/es/gistamishouse/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/es/gistamishouse/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
BIN
src/es/gistamishouse/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/es/gistamishouse/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
src/es/gistamishouse/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/es/gistamishouse/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
src/es/gistamishouse/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/es/gistamishouse/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
src/es/gistamishouse/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/es/gistamishouse/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
@ -0,0 +1,154 @@
|
||||
package eu.kanade.tachiyomi.extension.es.gistamishouse
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Genre
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Status
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.Type
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaDto
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import okhttp3.Response
|
||||
|
||||
class GistamisHouse : ZeistManga(
|
||||
"Gistamis House",
|
||||
"https://gistamishousefansub.blogspot.com",
|
||||
"es",
|
||||
) {
|
||||
override val useNewChapterFeed = true
|
||||
override val hasFilters = true
|
||||
override val hasLanguageFilter = false
|
||||
|
||||
override val client = super.client.newBuilder()
|
||||
.rateLimit(2)
|
||||
.build()
|
||||
|
||||
override val excludedCategories = listOf("Anime", "Novela")
|
||||
|
||||
override val popularMangaSelector = "div.PopularPosts div.grid > figure:not(:has(span[data=Capitulo]))"
|
||||
|
||||
override val authorSelectorList = listOf(
|
||||
"Author",
|
||||
"Autor",
|
||||
"Mangaka",
|
||||
)
|
||||
|
||||
override val mangaDetailsSelectorAltName = "div.y6x11p:contains(Otros Nombres) > span.dt"
|
||||
override val mangaDetailsSelectorInfoTitle = ""
|
||||
|
||||
override fun mangaDetailsParse(response: Response): SManga {
|
||||
val document = response.asJsoup()
|
||||
val profileManga = document.selectFirst(mangaDetailsSelector)!!
|
||||
return SManga.create().apply {
|
||||
thumbnail_url = profileManga.selectFirst("img")!!.attr("abs:src")
|
||||
description = buildString {
|
||||
append(profileManga.select(mangaDetailsSelectorDescription).text())
|
||||
append("\n\n")
|
||||
profileManga.selectFirst(mangaDetailsSelectorAltName)?.text()?.takeIf { it.isNotBlank() }?.let {
|
||||
append("Otros Nombres: ")
|
||||
append(it)
|
||||
}
|
||||
}.trim()
|
||||
genre = profileManga.select(mangaDetailsSelectorGenres)
|
||||
.joinToString { it.text() }
|
||||
|
||||
val infoElement = profileManga.select(mangaDetailsSelectorInfo)
|
||||
var statusFound = false
|
||||
infoElement.forEach { element ->
|
||||
val infoText = element.ownText().trim().ifEmpty { element.selectFirst(mangaDetailsSelectorInfoTitle)?.text()?.trim() ?: "" }
|
||||
val descText = element.select(mangaDetailsSelectorInfoDescription).text().trim()
|
||||
when {
|
||||
statusSelectorList.any { infoText.contains(it) } -> {
|
||||
if (!statusFound) status = parseStatus(descText)
|
||||
statusFound = true
|
||||
}
|
||||
|
||||
authorSelectorList.any { infoText.contains(it) } -> {
|
||||
author = descText
|
||||
}
|
||||
|
||||
artisSelectorList.any { infoText.contains(it) } -> {
|
||||
artist = descText
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override val chapterCategory = ""
|
||||
private val chapterCategories = listOf("Capitulo", "Cap")
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val document = response.asJsoup()
|
||||
|
||||
val url = getChapterFeedUrl(document)
|
||||
val res = client.newCall(GET(url, headers)).execute()
|
||||
|
||||
val result = json.decodeFromString<ZeistMangaDto>(res.body.string())
|
||||
return result.feed?.entry?.filter { it.category.orEmpty().any { category -> chapterCategories.contains(category.term) } }
|
||||
?.map { it.toSChapter(baseUrl) }
|
||||
?: throw Exception("Failed to parse from chapter API")
|
||||
}
|
||||
|
||||
override val pageListSelector = "article.oh div.post p"
|
||||
|
||||
override fun getGenreList(): List<Genre> = listOf(
|
||||
Genre("Acción", "Acción"),
|
||||
Genre("Aventura", "Aventura"),
|
||||
Genre("Comedia", "Comedia"),
|
||||
Genre("Dementia", "Dementia"),
|
||||
Genre("Demonios", "Demonios"),
|
||||
Genre("Drama", "Drama"),
|
||||
Genre("Ecchi", "Ecchi"),
|
||||
Genre("Fantasía", "Fantasía"),
|
||||
Genre("Videojuegos", "Videojuegos"),
|
||||
Genre("Harem", "Harem"),
|
||||
Genre("Histórico", "Histórico"),
|
||||
Genre("Horror", "Horror"),
|
||||
Genre("Josei", "Josei"),
|
||||
Genre("Magia", "Magia"),
|
||||
Genre("Arte marcial", "Arte marcial"),
|
||||
Genre("Mecha", "Mecha"),
|
||||
Genre("Militar", "Militar"),
|
||||
Genre("Música", "Música"),
|
||||
Genre("Misterio", "Misterio"),
|
||||
Genre("Parody", "Parody"),
|
||||
Genre("Policia", "Policia"),
|
||||
Genre("Filosófico", "Filosófico"),
|
||||
Genre("Romance", "Romance"),
|
||||
Genre("Samurai", "Samurai"),
|
||||
Genre("Escolar", "Escolar"),
|
||||
Genre("Sci-Fi", "Sci-Fi"),
|
||||
Genre("Seinen", "Seinen"),
|
||||
Genre("Shoujo", "Shoujo"),
|
||||
Genre("GL", "GL"),
|
||||
Genre("BL", "BL"),
|
||||
Genre("HET", "HET"),
|
||||
Genre("Shounen", "Shounen"),
|
||||
Genre("Vida cotidiana", "Vida cotidiana"),
|
||||
Genre("Espacio", "Espacio"),
|
||||
Genre("Deportes", "Deportes"),
|
||||
Genre("Super poderes", "Super poderes"),
|
||||
Genre("Sobrenatural", "Sobrenatural"),
|
||||
Genre("Thriller", "Thriller"),
|
||||
Genre("Vampiro", "Vampiro"),
|
||||
Genre("Vida laboral", "Vida laboral"),
|
||||
)
|
||||
|
||||
override fun getStatusList(): List<Status> = listOf(
|
||||
Status("Activo", "Activo"),
|
||||
Status("Completo", "Completo"),
|
||||
Status("Cancelado", "Cancelado"),
|
||||
Status("Futuro", "Futuro"),
|
||||
Status("Pausado", "Pausado"),
|
||||
)
|
||||
|
||||
override fun getTypeList(): List<Type> = listOf(
|
||||
Type("Manga", "Manga"),
|
||||
Type("Manhua", "Manhua"),
|
||||
Type("Manhwa", "Manhwa"),
|
||||
)
|
||||
}
|
@ -13,19 +13,15 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.json.Json
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class KomikRealm : ZeistManga(
|
||||
"KomikRealm",
|
||||
"https://www.komikrealm.my.id",
|
||||
"id",
|
||||
) {
|
||||
private val json: Json by injectLazy()
|
||||
|
||||
override val hasFilters = true
|
||||
|
||||
override val hasLanguageFilter = false
|
||||
|
Loading…
Reference in New Issue
Block a user