Mangatale: update domain, change selector, tweak rate limit (#5016)
closes #4986 - update domain - change title selector - tweak rate limit
This commit is contained in:
parent
78fb4d0fcf
commit
50dd55646c
|
@ -2,8 +2,8 @@ ext {
|
||||||
extName = 'MangaTale'
|
extName = 'MangaTale'
|
||||||
extClass = '.MangaTale'
|
extClass = '.MangaTale'
|
||||||
themePkg = 'mangathemesia'
|
themePkg = 'mangathemesia'
|
||||||
baseUrl = 'https://mangatale.co'
|
baseUrl = 'https://mangatale.id'
|
||||||
overrideVersionCode = 3
|
overrideVersionCode = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -7,10 +7,10 @@ import okhttp3.OkHttpClient
|
||||||
import okhttp3.ResponseBody.Companion.toResponseBody
|
import okhttp3.ResponseBody.Companion.toResponseBody
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
class MangaTale : MangaThemesia("MangaTale", "https://mangatale.co", "id") {
|
class MangaTale : MangaThemesia("MangaTale", "https://mangatale.id", "id") {
|
||||||
|
|
||||||
override val client: OkHttpClient = super.client.newBuilder()
|
override val client: OkHttpClient = super.client.newBuilder()
|
||||||
.rateLimit(20, 5)
|
.rateLimit(12, 3)
|
||||||
.addInterceptor { chain ->
|
.addInterceptor { chain ->
|
||||||
val response = chain.proceed(chain.request())
|
val response = chain.proceed(chain.request())
|
||||||
val mime = response.headers["Content-Type"]
|
val mime = response.headers["Content-Type"]
|
||||||
|
@ -28,7 +28,7 @@ class MangaTale : MangaThemesia("MangaTale", "https://mangatale.co", "id") {
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
override val seriesTitleSelector = ".ts-breadcrumb li:last-child span"
|
override val seriesTitleSelector = ".ts-breadcrumb span:last-child span"
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = super.mangaDetailsParse(document).apply {
|
override fun mangaDetailsParse(document: Document) = super.mangaDetailsParse(document).apply {
|
||||||
thumbnail_url = document.selectFirst(seriesThumbnailSelector)?.imgAttr()
|
thumbnail_url = document.selectFirst(seriesThumbnailSelector)?.imgAttr()
|
||||||
|
|
Loading…
Reference in New Issue