Add a new source to Madara (closes #11382). (#11393)

This commit is contained in:
Alessandro Jean 2022-04-09 10:44:01 -03:00 committed by GitHub
parent 3bf4b091d7
commit 62beac1bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,20 @@
package eu.kanade.tachiyomi.extension.pt.rwbyscan
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.madara.Madara
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class RwbyScan : Madara(
"RWBY Scan",
"https://rwbyscan.site",
"pt-BR",
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
.build()
}

View File

@ -810,7 +810,7 @@ abstract class Madara(
// Added "title" alternative
chapter.date_upload = select("img:not(.thumb)").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
?: select("span a").firstOrNull()?.attr("title")?.let { parseRelativeDate(it) }
?: parseChapterDate(select("span.chapter-release-date").firstOrNull()?.text())
?: parseChapterDate(select("span.chapter-release-date").firstOrNull()?.text())
}
return chapter

View File

@ -371,6 +371,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Reset Scans", "https://reset-scans.com", "en", overrideVersionCode = 5),
SingleLang("Rh2PlusManga", "https://www.rh2plusmanga.com", "th", overrideVersionCode = 3),
SingleLang("Rüya Manga", "https://www.ruyamanga.com", "tr", className = "RuyaManga", overrideVersionCode = 1),
SingleLang("RWBY Scan", "https://rwbyscan.site", "pt-BR", isNsfw = true, className = "RwbyScan"),
SingleLang("S2Manga", "https://s2manga.com", "en", overrideVersionCode = 1),
SingleLang("SISI GELAP", "https://sigel.xyz", "id", overrideVersionCode = 3),
SingleLang("SamuraiScan", "https://samuraiscan.com", "es", overrideVersionCode = 1),