|
@ -2,9 +2,9 @@ apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
appName = 'Tachiyomi: Jaiminis Box'
|
appName = 'Tachiyomi: FoolSlide'
|
||||||
pkgNameSuffix = "en.jaiminisbox"
|
pkgNameSuffix = "all.foolslide"
|
||||||
extClass = '.JaiminisBox'
|
extClass = '.FoolSlideFactory'
|
||||||
extVersionCode = 1
|
extVersionCode = 1
|
||||||
extVersionSuffix = 0
|
extVersionSuffix = 0
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 38 KiB |
|
@ -1,6 +1,5 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.jaiminisbox
|
package eu.kanade.tachiyomi.extension.all.foolslide
|
||||||
|
|
||||||
import android.util.Base64
|
|
||||||
import com.github.salomonbrys.kotson.get
|
import com.github.salomonbrys.kotson.get
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
@ -17,26 +16,23 @@ import org.jsoup.nodes.Element
|
||||||
import java.text.ParseException
|
import java.text.ParseException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
|
|
||||||
class JaiminisBox : ParsedHttpSource() {
|
/**
|
||||||
|
* Created by Carlos on 3/14/2018.
|
||||||
override val name = "Jaimini's Box"
|
*/
|
||||||
|
open class FoolSlide(override val name: String, override val baseUrl: String, override val lang: String, private val urlModifier: String = "") : ParsedHttpSource() {
|
||||||
override val baseUrl = "https://jaiminisbox.com"
|
|
||||||
|
|
||||||
override val lang = "en"
|
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
override fun popularMangaSelector() = "div.group"
|
override fun popularMangaSelector() = "div.group"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/reader/directory/$page/", headers)
|
return GET("$baseUrl$urlModifier/directory/$page/", headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = "div.group"
|
override fun latestUpdatesSelector() = "div.group"
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/reader/latest/$page/")
|
return GET("$baseUrl$urlModifier/latest/$page/")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
|
@ -72,7 +68,7 @@ class JaiminisBox : ParsedHttpSource() {
|
||||||
add("search", query)
|
add("search", query)
|
||||||
}
|
}
|
||||||
|
|
||||||
return POST("$baseUrl/reader/search/", headers, form.build())
|
return POST("$baseUrl$urlModifier/search/", headers, form.build())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaSelector() = "div.group"
|
override fun searchMangaSelector() = "div.group"
|
||||||
|
@ -122,10 +118,8 @@ class JaiminisBox : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
|
||||||
val doc = document.toString()
|
val doc = document.toString()
|
||||||
|
val jsonstr = doc.substringAfter("var pages = ").substringBefore(";")
|
||||||
val base64Json = doc.substringAfter("JSON.parse(atob(\"").substringBefore("\"));")
|
val json = JsonParser().parse(jsonstr).asJsonArray
|
||||||
val decodeJson = String(Base64.decode(base64Json, Base64.DEFAULT))
|
|
||||||
val json = JsonParser().parse(decodeJson).asJsonArray
|
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
json.forEach {
|
json.forEach {
|
||||||
pages.add(Page(pages.size, "", it.get("url").asString))
|
pages.add(Page(pages.size, "", it.get("url").asString))
|
|
@ -0,0 +1,38 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.all.foolslide
|
||||||
|
|
||||||
|
import android.util.Base64
|
||||||
|
import com.github.salomonbrys.kotson.get
|
||||||
|
import com.google.gson.JsonParser
|
||||||
|
import eu.kanade.tachiyomi.source.Source
|
||||||
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Carlos on 3/14/2018.
|
||||||
|
*/
|
||||||
|
class FoolSlideFactory : SourceFactory {
|
||||||
|
override fun createSources(): List<Source> = getAllFoolSlide()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun getAllFoolSlide(): List<Source> {
|
||||||
|
return listOf(JaminisBox(), ChampionScans())
|
||||||
|
}
|
||||||
|
|
||||||
|
class JaminisBox : FoolSlide("Jaimini's Box", "https://jaiminisbox.com", "en", "/reader") {
|
||||||
|
|
||||||
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
val doc = document.toString()
|
||||||
|
val base64Json = doc.substringAfter("JSON.parse(atob(\"").substringBefore("\"));")
|
||||||
|
val decodeJson = String(Base64.decode(base64Json, Base64.DEFAULT))
|
||||||
|
val json = JsonParser().parse(decodeJson).asJsonArray
|
||||||
|
val pages = mutableListOf<Page>()
|
||||||
|
json.forEach {
|
||||||
|
pages.add(Page(pages.size, "", it.get("url").asString))
|
||||||
|
}
|
||||||
|
return pages
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChampionScans : FoolSlide("Champion Scans", "http://reader.championscans.com", "en")
|
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 63 KiB |