diff --git a/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt b/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt new file mode 100644 index 000000000..1ebf48aca --- /dev/null +++ b/multisrc/overrides/genkan/lynxscans/src/LynxScans.kt @@ -0,0 +1,23 @@ +package eu.kanade.tachiyomi.extension.en.lynxscans + +import eu.kanade.tachiyomi.multisrc.genkan.Genkan +import org.jsoup.nodes.Document +import eu.kanade.tachiyomi.source.model.Page + +class LynxScans : Genkan("Lynx Scans", "https://lynxscans.com", "en") { + override fun pageListParse(document: Document): List<Page> { + val pages = mutableListOf<Page>() + + + val allImages = document.select("div#pages-container + script").first().data() + .substringAfter("[").substringBefore("];") + .replace(Regex("""["\\]"""), "") + .split(",/") + + for (i in allImages.indices) { + pages.add(Page(i, "", if (i == 0) allImages[i] else "/" + allImages[i])) + } + + return pages + } +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/genkan/GenkanGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/genkan/GenkanGenerator.kt index 6339a6c17..719506e23 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/genkan/GenkanGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/genkan/GenkanGenerator.kt @@ -17,7 +17,7 @@ class GenkanGenerator : ThemeSourceGenerator { SingleLang("ZeroScans", "https://zeroscans.com", "en"), SingleLang("The Nonames Scans", "https://the-nonames.com", "en"), SingleLang("Edelgarde Scans", "https://edelgardescans.com", "en"), - SingleLang("LynxScans", "https://lynxscans.com", "en", overrideVersionCode = 1), + SingleLang("LynxScans", "https://lynxscans.com", "en", overrideVersionCode = 2), ) companion object {