From cf7d70ba9e36882b56ed6a937d2d585b28124072 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+ttony2chopper@users.noreply.github.com> Date: Tue, 4 Jun 2024 02:28:27 -0300 Subject: [PATCH] ArgosComics: bugfix (#3396) * Update mangaSubString * Add rateLimit and refactoring latestUpdate * Remove unused import * Remove isNsfw --- src/pt/argoscomics/build.gradle | 3 +-- .../tachiyomi/extension/pt/argoscomics/ArgosComics.kt | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/pt/argoscomics/build.gradle b/src/pt/argoscomics/build.gradle index ab2d8a87e..8ea5dc4e6 100644 --- a/src/pt/argoscomics/build.gradle +++ b/src/pt/argoscomics/build.gradle @@ -3,8 +3,7 @@ ext { extClass = '.ArgosComics' themePkg = 'madara' baseUrl = 'https://argoscomics.com' - overrideVersionCode = 1 - isNsfw = true + overrideVersionCode = 2 } apply from: "$rootDir/common.gradle" diff --git a/src/pt/argoscomics/src/eu/kanade/tachiyomi/extension/pt/argoscomics/ArgosComics.kt b/src/pt/argoscomics/src/eu/kanade/tachiyomi/extension/pt/argoscomics/ArgosComics.kt index d27edc7d0..34d4464f0 100644 --- a/src/pt/argoscomics/src/eu/kanade/tachiyomi/extension/pt/argoscomics/ArgosComics.kt +++ b/src/pt/argoscomics/src/eu/kanade/tachiyomi/extension/pt/argoscomics/ArgosComics.kt @@ -1,8 +1,7 @@ package eu.kanade.tachiyomi.extension.pt.argoscomics import eu.kanade.tachiyomi.multisrc.madara.Madara -import eu.kanade.tachiyomi.network.GET -import okhttp3.Request +import eu.kanade.tachiyomi.network.interceptor.rateLimit import java.text.SimpleDateFormat import java.util.Locale @@ -12,9 +11,9 @@ class ArgosComics : Madara( "pt-BR", SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")), ) { - override fun latestUpdatesSelector() = "div.wp-block-wp-manga-gutenberg-manga-sliders-block:nth-child(2)" + override val mangaSubString = "comics" - override fun latestUpdatesRequest(page: Int): Request = GET(baseUrl, headers) - - override fun latestUpdatesNextPageSelector() = null + override val client = super.client.newBuilder() + .rateLimit(3) + .build() }