Remove Jaimini's Box (#4440)

Remove Jaimini's Box
This commit is contained in:
kiriya-aoi 2020-09-26 23:41:46 -04:00 committed by GitHub
parent 982c464dc4
commit 89693c4209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 22 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'FoolSlide (multiple sources)'
pkgNameSuffix = 'all.foolslide'
extClass = '.FoolSlideFactory'
extVersionCode = 53
extVersionCode = 54
libVersion = '1.2'
containsNsfw = true
}

View File

@ -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")