diff --git a/multisrc/overrides/mangathemesia/aresnov/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..763077d64 Binary files /dev/null and b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/aresnov/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..2d2563f42 Binary files /dev/null and b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..0330518fa Binary files /dev/null and b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..679406772 Binary files /dev/null and b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..9535578ac Binary files /dev/null and b/multisrc/overrides/mangathemesia/aresnov/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/aresnov/src/ARESNOV.kt b/multisrc/overrides/mangathemesia/aresnov/src/ARESNOV.kt new file mode 100644 index 000000000..509c3d16e --- /dev/null +++ b/multisrc/overrides/mangathemesia/aresnov/src/ARESNOV.kt @@ -0,0 +1,41 @@ +package eu.kanade.tachiyomi.extension.ar.aresnov + +import android.util.Base64 +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.source.model.Page +import kotlinx.serialization.json.jsonArray +import kotlinx.serialization.json.jsonPrimitive +import org.jsoup.nodes.Document +import java.lang.IllegalArgumentException +import java.text.SimpleDateFormat +import java.util.Locale + +class ARESNOV : MangaThemesia( + "ARESNOV", + "https://aresnov.org", + "ar", + mangaUrlDirectory = "/series", + dateFormat = SimpleDateFormat("MMMMM dd, yyyy", Locale("ar")), +) { + override val seriesAuthorSelector = ".imptdt:contains(المؤلف) i" + override val seriesArtistSelector = ".imptdt:contains(الرسام) i" + override val seriesTypeSelector = ".imptdt:contains(النوع) i" + override val seriesStatusSelector = ".imptdt:contains(الحالة) i" + + override fun pageListParse(document: Document): List { + // "ts_reader.run({" in base64 + val script = document.selectFirst("script[src^=data:text/javascript;base64,dHNfcmVhZGVyLnJ1bih7]") + ?: return super.pageListParse(document) + val data = Base64.decode(script.attr("src").substringAfter("base64,"), Base64.DEFAULT).toString(Charsets.UTF_8) + val imageListJson = JSON_IMAGE_LIST_REGEX.find(data)?.destructured?.toList()?.get(0).orEmpty() + val imageList = try { + json.parseToJsonElement(imageListJson).jsonArray + } catch (_: IllegalArgumentException) { + emptyList() + } + + return imageList.mapIndexed { i, jsonEl -> + Page(i, imageUrl = jsonEl.jsonPrimitive.content) + } + } +} diff --git a/multisrc/overrides/mangathemesia/iimanga/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..763077d64 Binary files /dev/null and b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/iimanga/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..2d2563f42 Binary files /dev/null and b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..0330518fa Binary files /dev/null and b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..679406772 Binary files /dev/null and b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..9535578ac Binary files /dev/null and b/multisrc/overrides/mangathemesia/iimanga/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/iimanga/src/ARESManga.kt b/multisrc/overrides/mangathemesia/iimanga/src/ARESManga.kt new file mode 100644 index 000000000..a63eb6d66 --- /dev/null +++ b/multisrc/overrides/mangathemesia/iimanga/src/ARESManga.kt @@ -0,0 +1,44 @@ +package eu.kanade.tachiyomi.extension.ar.iimanga + +import android.util.Base64 +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.source.model.Page +import kotlinx.serialization.json.jsonArray +import kotlinx.serialization.json.jsonPrimitive +import org.jsoup.nodes.Document +import java.lang.IllegalArgumentException +import java.text.SimpleDateFormat +import java.util.Locale + +class ARESManga : MangaThemesia( + "ARESManga", + "https://en-aresmanga.com", + "ar", + mangaUrlDirectory = "/series", + dateFormat = SimpleDateFormat("MMMMM dd, yyyy", Locale("ar")), +) { + // Source renamed a while back + override val id = 230017529540228175 + + override val seriesAuthorSelector = ".imptdt:contains(المؤلف) i" + override val seriesArtistSelector = ".imptdt:contains(الرسام) i" + override val seriesTypeSelector = ".imptdt:contains(النوع) i" + override val seriesStatusSelector = ".imptdt:contains(الحالة) i" + + override fun pageListParse(document: Document): List { + // "ts_reader.run({" in base64 + val script = document.selectFirst("script[src^=data:text/javascript;base64,dHNfcmVhZGVyLnJ1bih7]") + ?: return super.pageListParse(document) + val data = Base64.decode(script.attr("src").substringAfter("base64,"), Base64.DEFAULT).toString(Charsets.UTF_8) + val imageListJson = JSON_IMAGE_LIST_REGEX.find(data)?.destructured?.toList()?.get(0).orEmpty() + val imageList = try { + json.parseToJsonElement(imageListJson).jsonArray + } catch (_: IllegalArgumentException) { + emptyList() + } + + return imageList.mapIndexed { i, jsonEl -> + Page(i, imageUrl = jsonEl.jsonPrimitive.content) + } + } +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index aec36f0f9..e07d679ea 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -19,6 +19,8 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("Alceascan", "https://alceascan.my.id", "id"), SingleLang("Animated Glitched Comics", "https://agscomics.com", "en"), SingleLang("Animated Glitched Scans", "https://anigliscans.xyz", "en", overrideVersionCode = 1), + SingleLang("ARESManga", "https://en-aresmanga.com", "ar", pkgName = "iimanga", className = "ARESManga", overrideVersionCode = 2), + SingleLang("ARESNOV", "https://aresnov.org", "ar"), SingleLang("Arven Scans", "https://arvenscans.com", "en"), SingleLang("AscalonScans", "https://ascalonscans.com", "en", overrideVersionCode = 1), SingleLang("Asura Scans", "https://asuratoon.com", "en", overrideVersionCode = 1),