CelestialMoon: Update domain and change theme (#3298)
update domain and theme
This commit is contained in:
parent
08ad68a631
commit
3310e274d5
|
@ -1,10 +1,14 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Celestial Moon'
|
extName = 'Celestial Moon'
|
||||||
extClass = '.CelestialMoon'
|
extClass = '.CelestialMoon'
|
||||||
themePkg = 'zeistmanga'
|
themePkg = 'mangathemesia'
|
||||||
baseUrl = 'https://www.celestialmoonscan.com'
|
baseUrl = 'https://celestialmoonscan.es'
|
||||||
overrideVersionCode = 1
|
overrideVersionCode = 0
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(":lib:cookieinterceptor"))
|
||||||
|
}
|
||||||
|
|
|
@ -1,54 +1,26 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.celestialmoon
|
package eu.kanade.tachiyomi.extension.es.celestialmoon
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
import eu.kanade.tachiyomi.lib.cookieinterceptor.CookieInterceptor
|
||||||
|
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||||
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
||||||
import eu.kanade.tachiyomi.source.model.Page
|
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
import okhttp3.Response
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class CelestialMoon : ZeistManga(
|
class CelestialMoon : MangaThemesia(
|
||||||
"Celestial Moon",
|
"Celestial Moon",
|
||||||
"https://www.celestialmoonscan.com",
|
"https://celestialmoonscan.es",
|
||||||
"es",
|
"es",
|
||||||
|
dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
|
||||||
) {
|
) {
|
||||||
|
// ZeistManga -> MangaThemesia
|
||||||
|
override val versionId = 2
|
||||||
|
|
||||||
|
private val cookieInterceptor = CookieInterceptor(baseUrl.substringAfter("://"), "age_gate" to "18")
|
||||||
|
|
||||||
override val client = super.client.newBuilder()
|
override val client = super.client.newBuilder()
|
||||||
.rateLimitHost(baseUrl.toHttpUrl(), 3, 1, TimeUnit.SECONDS)
|
.rateLimitHost(baseUrl.toHttpUrl(), 3, 1, TimeUnit.SECONDS)
|
||||||
|
.addNetworkInterceptor(cookieInterceptor)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
override val popularMangaSelector = "div.PopularPosts > div.grid > article"
|
|
||||||
override val popularMangaSelectorUrl = ".post-title > a"
|
|
||||||
override val popularMangaSelectorTitle = ".post-title"
|
|
||||||
|
|
||||||
override val mangaDetailsSelector = "div.Blog > main"
|
|
||||||
override val mangaDetailsSelectorGenres = "dl:has(dt:contains(Genre)) dd a[rel=tag]"
|
|
||||||
override val mangaDetailsSelectorAuthor = "div#extra-info > dl:has(dt:contains(Author)) dd"
|
|
||||||
override val mangaDetailsSelectorArtist = "div#extra-info > dl:has(dt:contains(Artist)) dd"
|
|
||||||
|
|
||||||
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 = profileManga.select(mangaDetailsSelectorDescription).text()
|
|
||||||
genre = profileManga.select(mangaDetailsSelectorGenres)
|
|
||||||
.joinToString { it.text() }
|
|
||||||
author = profileManga.selectFirst(mangaDetailsSelectorAuthor)?.text()
|
|
||||||
artist = profileManga.selectFirst(mangaDetailsSelectorArtist)?.text()
|
|
||||||
status = parseStatus(document.selectFirst("main > header > div.grid span[data-status]")!!.text())
|
|
||||||
title = profileManga.selectFirst("main > header > div.grid h1[itemprop=name]")!!.text()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override val pageListSelector = "article.chapter > div.separator"
|
|
||||||
|
|
||||||
override fun pageListParse(response: Response): List<Page> {
|
|
||||||
val document = response.asJsoup()
|
|
||||||
val images = document.select(pageListSelector)
|
|
||||||
return images.select("> a").mapIndexed { i, img ->
|
|
||||||
Page(i, imageUrl = img.attr("abs:href"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue