2021-02-16 11:36:04 +00:00
|
|
|
package eu.kanade.tachiyomi.extension.en.xcalibrscans
|
|
|
|
|
|
|
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
|
|
|
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
2021-03-28 11:11:51 +00:00
|
|
|
import eu.kanade.tachiyomi.source.model.Page
|
2021-02-16 11:36:04 +00:00
|
|
|
import okhttp3.OkHttpClient
|
2021-03-28 11:11:51 +00:00
|
|
|
import org.jsoup.nodes.Document
|
2021-02-16 11:36:04 +00:00
|
|
|
import java.util.concurrent.TimeUnit
|
|
|
|
|
2021-03-28 11:11:51 +00:00
|
|
|
class xCaliBRScans : WPMangaStream("xCaliBR Scans", "https://xcalibrscans.com", "en") {
|
2021-02-16 11:36:04 +00:00
|
|
|
private val rateLimitInterceptor = RateLimitInterceptor(2)
|
|
|
|
|
|
|
|
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
|
|
|
.connectTimeout(10, TimeUnit.SECONDS)
|
|
|
|
.readTimeout(30, TimeUnit.SECONDS)
|
|
|
|
.addNetworkInterceptor(rateLimitInterceptor)
|
|
|
|
.build()
|
|
|
|
|
2021-03-28 11:11:51 +00:00
|
|
|
override fun pageListParse(document: Document): List<Page> {
|
|
|
|
return document.select(pageSelector)
|
|
|
|
.mapIndexed { i, img -> Page(i, "", img.attr("data-src")) }
|
|
|
|
}
|
|
|
|
|
2021-02-16 11:36:04 +00:00
|
|
|
}
|