Mangatale: update domain, change selector, tweak rate limit (#5016)

closes #4986

- update domain
- change title selector
- tweak rate limit
This commit is contained in:
Luqman 2024-09-12 18:22:28 +07:00 committed by Draff
parent 78fb4d0fcf
commit 50dd55646c
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 5 additions and 5 deletions

View File

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

View File

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