parent
5966f9699b
commit
f7b2ff60ac
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'SlimeRead'
|
extName = 'SlimeRead'
|
||||||
extClass = '.SlimeRead'
|
extClass = '.SlimeRead'
|
||||||
extVersionCode = 9
|
extVersionCode = 10
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class SlimeRead : HttpSource() {
|
|||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
override val client by lazy {
|
override val client by lazy {
|
||||||
network.client.newBuilder()
|
network.cloudflareClient.newBuilder()
|
||||||
.rateLimitHost(baseUrl.toHttpUrl(), 2)
|
.rateLimitHost(baseUrl.toHttpUrl(), 2)
|
||||||
.rateLimitHost(apiUrl.toHttpUrl(), 1)
|
.rateLimitHost(apiUrl.toHttpUrl(), 1)
|
||||||
.build()
|
.build()
|
||||||
@ -51,7 +51,7 @@ class SlimeRead : HttpSource() {
|
|||||||
private val json: Json by injectLazy()
|
private val json: Json by injectLazy()
|
||||||
|
|
||||||
private fun getApiUrlFromPage(): String {
|
private fun getApiUrlFromPage(): String {
|
||||||
val initClient = network.client
|
val initClient = network.cloudflareClient
|
||||||
val document = initClient.newCall(GET(baseUrl, headers)).execute().asJsoup()
|
val document = initClient.newCall(GET(baseUrl, headers)).execute().asJsoup()
|
||||||
val scriptUrl = document.selectFirst("script[src*=pages/_app]")?.attr("abs:src")
|
val scriptUrl = document.selectFirst("script[src*=pages/_app]")?.attr("abs:src")
|
||||||
?: throw Exception("Could not find script URL")
|
?: throw Exception("Could not find script URL")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user