Fixes LynxScans (#7767)

This commit is contained in:
Narin 2021-06-20 05:40:41 -07:00 committed by GitHub
parent 8585b5cd81
commit f6832d402e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View File

@ -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
}
}

View File

@ -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 {