diff --git a/multisrc/overrides/madara/sectscans/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/sectscans/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..6e665a369 Binary files /dev/null and b/multisrc/overrides/madara/sectscans/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/sectscans/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/sectscans/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..c9871fd3f Binary files /dev/null and b/multisrc/overrides/madara/sectscans/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/sectscans/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/sectscans/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..9c23a5911 Binary files /dev/null and b/multisrc/overrides/madara/sectscans/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/sectscans/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/sectscans/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..70f6d0ccc Binary files /dev/null and b/multisrc/overrides/madara/sectscans/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/sectscans/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/sectscans/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..f7750569a Binary files /dev/null and b/multisrc/overrides/madara/sectscans/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/madara/sectscans/src/SectScans.kt b/multisrc/overrides/madara/sectscans/src/SectScans.kt new file mode 100644 index 000000000..1f7f7cbdf --- /dev/null +++ b/multisrc/overrides/madara/sectscans/src/SectScans.kt @@ -0,0 +1,63 @@ +package eu.kanade.tachiyomi.extension.en.sectscans + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.POST +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import eu.kanade.tachiyomi.source.model.SManga +import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrl +import org.jsoup.nodes.Document + +class SectScans : Madara("SectScans", "https://sectscans.com", "en") { + + override val client = super.client.newBuilder() + .rateLimit(2) + .build() + + override val mangaSubString = "comics" + + override val useNewChapterEndpoint = true + + override fun searchPage(page: Int): String = if (page == 1) "" else "page/$page/" + + // =========================== Manga Details ============================ + + override val mangaDetailsSelectorTitle = ".post-title" + override val mangaDetailsSelectorAuthor = ".item_authors .summary-content" + override val mangaDetailsSelectorArtist = ".item_artists .summary-content" + override val mangaDetailsSelectorThumbnail = "img" + override val mangaDetailsSelectorGenre = ".genres-content a" + + override fun mangaDetailsParse(document: Document): SManga { + val postId = document.selectFirst("script:containsData(manga_id)") + ?.data() + ?.substringAfter("manga_id\":\"") + ?.substringBefore("\"") + ?: return super.mangaDetailsParse(document) + + val formBody = FormBody.Builder().apply { + add("action", "madara_hover_load_post") + add("postid", postId) + }.build() + + val formHeaders = headersBuilder().apply { + add("Accept", "text/html, */*; q=0.01") + add("Host", baseUrl.toHttpUrl().host) + add("Origin", baseUrl) + add("X-Requested-With", "XMLHttpRequest") + }.build() + + val resp = client.newCall( + POST("$baseUrl/wp-admin/admin-ajax.php", formHeaders, formBody), + ).execute() + + return super.mangaDetailsParse(resp.asJsoup()).apply { + description = buildString { + append(document.selectFirst(".manga-summary")?.text()) + append("\n\n") + append(description) + } + } + } +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index 5e056766e..7f91198c0 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -407,6 +407,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Scan Hentai Menu", "https://scan.hentai.menu", "fr", isNsfw = true, overrideVersionCode = 1), SingleLang("Scantrad-VF", "https://scantrad-vf.co", "fr", className = "ScantradVF"), SingleLang("Sdl scans", "https://sdlscans.com", "es", className = "SdlScans"), + SingleLang("SectScans", "https://sectscans.com", "en"), SingleLang("Setsu Scans", "https://setsuscans.com", "en", overrideVersionCode = 2), SingleLang("Shadowtrad", "https://shadowtrad.net", "fr"), SingleLang("ShavelProiection", "https://www.shavelproiection.com", "it", true),