parent
982c464dc4
commit
89693c4209
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'FoolSlide (multiple sources)'
|
||||
pkgNameSuffix = 'all.foolslide'
|
||||
extClass = '.FoolSlideFactory'
|
||||
extVersionCode = 53
|
||||
extVersionCode = 54
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import uy.kohesive.injekt.api.get
|
|||
|
||||
class FoolSlideFactory : SourceFactory {
|
||||
override fun createSources(): List<Source> = listOf(
|
||||
JaiminisBox(),
|
||||
SenseScans(),
|
||||
KireiCake(),
|
||||
SilentSky(),
|
||||
|
@ -67,26 +66,6 @@ class FoolSlideFactory : SourceFactory {
|
|||
)
|
||||
}
|
||||
|
||||
class JaiminisBox : FoolSlide("Jaimini's Box", "https://jaiminisbox.com", "en", "/reader") {
|
||||
private val slugRegex = "(?:/read/)([\\w\\d-]+?)(?:/)".toRegex()
|
||||
override fun pageListRequest(chapter: SChapter): Request {
|
||||
val (slug) = slugRegex.find(chapter.url)!!.destructured
|
||||
var (major, minor) = chapter.chapter_number.toString().split(".")
|
||||
if (major == "-1") major = "0" // Some oneshots don't have a chapter
|
||||
return GET("$baseUrl$urlModifier/api/reader/chapter?comic_stub=$slug&chapter=$major&subchapter=$minor")
|
||||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
val pagesJson = JSONObject(document.body().ownText())
|
||||
val json = JsonParser().parse(pagesJson.getString("pages")).asJsonArray
|
||||
val pages = ArrayList<Page>()
|
||||
json.forEach {
|
||||
pages.add(Page(pages.size, "", JsonParser().parse(it.toString())["url"].asString))
|
||||
}
|
||||
return pages
|
||||
}
|
||||
}
|
||||
|
||||
class TheCatScans : FoolSlide("The Cat Scans", "https://reader2.thecatscans.com/", "en")
|
||||
|
||||
class SenseScans : FoolSlide("Sense-Scans", "http://sensescans.com", "en", "/reader")
|
||||
|
|
Loading…
Reference in New Issue