Manhastro: Increase the timeout (#3732)

* Increase the timeout

* Bump version

* Update mangaSubString, add useLoadMoreRequest and change rateLimit

* Cleanup
This commit is contained in:
Chopper 2024-06-26 08:30:05 -03:00 committed by Draff
parent be0f6c90fd
commit b6b0803bb8
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.Manhastro'
themePkg = 'madara'
baseUrl = 'https://manhastro.com'
overrideVersionCode = 5
overrideVersionCode = 6
isNsfw = true
}

View File

@ -20,8 +20,12 @@ class Manhastro : Madara(
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR")),
) {
override val mangaSubString = "lermanga"
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.rateLimit(1)
.readTimeout(1, TimeUnit.MINUTES)
.connectTimeout(1, TimeUnit.MINUTES)
.addInterceptor { chain ->
val response = chain.proceed(chain.request())
val mime = response.headers["Content-Type"]
@ -41,6 +45,8 @@ class Manhastro : Madara(
override val useNewChapterEndpoint = true
override val useLoadMoreRequest = LoadMoreStrategy.Always
override val mangaDetailsSelectorTitle = "div.summary_content h2"
override val mangaDetailsSelectorStatus = "div.summary-heading:contains(Status) + div.summary-content"