KomikCast, SekteKomik: fix thumbnail issue (#7276)
* KomikCast: fix thumbnail issue Closes #6955 * SekteKomik: fix thumbnail issue
This commit is contained in:
parent
b15d718ebb
commit
5adc6f44cc
|
@ -29,9 +29,18 @@ class KomikCast : WPMangaStream("Komik Cast", "https://komikcast.com", "id") {
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
||||||
.add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/90.0.818.62")
|
.add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
|
||||||
.add("Referer", "https://www.google.com")
|
.add("Accept-language", "en-US,en;q=0.9")
|
||||||
|
.add("Referer", baseUrl)
|
||||||
|
|
||||||
|
override fun imageRequest(page: Page): Request {
|
||||||
|
val newHeaders = headersBuilder()
|
||||||
|
.set("Accept", "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8")
|
||||||
|
.set("Referer", page.url)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
return GET(page.imageUrl!!, newHeaders)
|
||||||
|
}
|
||||||
override fun popularMangaSelector() = "div.list-update_item"
|
override fun popularMangaSelector() = "div.list-update_item"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
|
@ -112,7 +121,7 @@ class KomikCast : WPMangaStream("Komik Cast", "https://komikcast.com", "id") {
|
||||||
|
|
||||||
// add alternative name to manga description
|
// add alternative name to manga description
|
||||||
document.select(altNameSelector).firstOrNull()?.ownText()?.let {
|
document.select(altNameSelector).firstOrNull()?.ownText()?.let {
|
||||||
if (it.isEmpty().not() && it !="N/A" && it != "-") {
|
if (it.isEmpty().not() && it != "N/A" && it != "-") {
|
||||||
description += when {
|
description += when {
|
||||||
description!!.isEmpty() -> altName + it
|
description!!.isEmpty() -> altName + it
|
||||||
else -> "\n\n$altName" + it
|
else -> "\n\n$altName" + it
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.sektekomik
|
package eu.kanade.tachiyomi.extension.id.sektekomik
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
import java.util.concurrent.TimeUnit
|
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
||||||
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
import okhttp3.Headers
|
||||||
|
import okhttp3.Request
|
||||||
|
|
||||||
class SekteKomik : WPMangaStream("Sekte Komik", "https://sektekomik.com", "id") {
|
class SekteKomik : WPMangaStream("Sekte Komik", "https://sektekomik.com", "id") {
|
||||||
// Formerly "Sekte Komik (WP Manga Stream)"
|
// Formerly "Sekte Komik (WP Manga Stream)"
|
||||||
|
@ -17,4 +21,17 @@ class SekteKomik : WPMangaStream("Sekte Komik", "https://sektekomik.com", "id")
|
||||||
.addNetworkInterceptor(rateLimitInterceptor)
|
.addNetworkInterceptor(rateLimitInterceptor)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
||||||
|
.add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
|
||||||
|
.add("Accept-language", "en-US,en;q=0.9")
|
||||||
|
.add("Referer", baseUrl)
|
||||||
|
|
||||||
|
override fun imageRequest(page: Page): Request {
|
||||||
|
val newHeaders = headersBuilder()
|
||||||
|
.set("Accept", "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8")
|
||||||
|
.set("Referer", page.url)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
return GET(page.imageUrl!!, newHeaders)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("MangaP", "https://mangap.me", "ar"),
|
SingleLang("MangaP", "https://mangap.me", "ar"),
|
||||||
SingleLang("Boosei", "https://boosei.com", "id"),
|
SingleLang("Boosei", "https://boosei.com", "id"),
|
||||||
SingleLang("Mangakyo", "https://www.mangakyo.me", "id"),
|
SingleLang("Mangakyo", "https://www.mangakyo.me", "id"),
|
||||||
SingleLang("Sekte Komik", "https://sektekomik.com", "id"),
|
SingleLang("Sekte Komik", "https://sektekomik.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Komik Station", "https://komikstation.com", "id"),
|
SingleLang("Komik Station", "https://komikstation.com", "id"),
|
||||||
SingleLang("Komik Indo", "https://www.komikindo.web.id", "id", className = "KomikIndoWPMS"),
|
SingleLang("Komik Indo", "https://www.komikindo.web.id", "id", className = "KomikIndoWPMS"),
|
||||||
SingleLang("Non-Stop Scans", "https://www.nonstopscans.com", "en", className = "NonStopScans"),
|
SingleLang("Non-Stop Scans", "https://www.nonstopscans.com", "en", className = "NonStopScans"),
|
||||||
|
@ -34,7 +34,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("GURU Komik", "https://gurukomik.com", "id"),
|
SingleLang("GURU Komik", "https://gurukomik.com", "id"),
|
||||||
SingleLang("Shea Manga", "https://sheamanga.my.id", "id"),
|
SingleLang("Shea Manga", "https://sheamanga.my.id", "id"),
|
||||||
SingleLang("Komik AV", "https://komikav.com", "id"),
|
SingleLang("Komik AV", "https://komikav.com", "id"),
|
||||||
SingleLang("Komik Cast", "https://komikcast.com", "id", overrideVersionCode = 4),
|
SingleLang("Komik Cast", "https://komikcast.com", "id", overrideVersionCode = 5),
|
||||||
SingleLang("West Manga", "https://westmanga.info", "id"),
|
SingleLang("West Manga", "https://westmanga.info", "id"),
|
||||||
SingleLang("Komik GO", "https://komikgo.com", "id", overrideVersionCode = 1),
|
SingleLang("Komik GO", "https://komikgo.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("MangaSwat", "https://mangaswat.com", "ar"),
|
SingleLang("MangaSwat", "https://mangaswat.com", "ar"),
|
||||||
|
|
Loading…
Reference in New Issue