Update DR URL and fix the wrong name. (#7106)

This commit is contained in:
Alessandro Jean 2021-05-20 07:40:32 -03:00 committed by GitHub
parent 4bd39822a7
commit c114d399f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 21 deletions

View File

@ -0,0 +1,56 @@
package eu.kanade.tachiyomi.extension.pt.darkyurealm
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.OkHttpClient
import okhttp3.Request
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class DarkYueRealm : Madara(
"DarkYue Realm",
"https://darkyuerealm.site/web",
"pt-BR",
SimpleDateFormat("dd 'de' MMMMM, yyyy", Locale("pt", "BR"))
) {
// Override the id because the name was wrong.
override val id: Long = 593455310609863709
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS))
.build()
override fun mangaDetailsRequest(manga: SManga): Request {
return GET(baseUrl + manga.url.removePrefix("/web"), headers)
}
override fun chapterListRequest(manga: SManga): Request {
return GET(baseUrl + manga.url.removePrefix("/web"), headers)
}
// [...document.querySelectorAll('input[name="genre[]"]')]
// .map(x => `Genre("${document.querySelector('label[for=' + x.id + ']').innerHTML.trim()}", "${x.value}")`)
// .join(',\n')
override fun getGenreList(): List<Genre> = listOf(
Genre("Ação", "acao"),
Genre("Aventura", "aventura"),
Genre("Comédia", "comedia"),
Genre("Drama", "drama"),
Genre("Ecchi", "ecchi"),
Genre("Escolar", "escolar"),
Genre("Fantasia", "fantasia"),
Genre("Harém", "harem"),
Genre("Isekai", "isekai"),
Genre("Romance", "romance"),
Genre("School Life", "school-life"),
Genre("Seinen", "seinen"),
Genre("Shounen", "shounen"),
Genre("Slice of Life", "slice-of-life"),
Genre("Sobrenatural", "sobrenatural"),
Genre("Vida Escolar", "vida-escolar")
)
}

View File

@ -1,20 +0,0 @@
package eu.kanade.tachiyomi.extension.pt.darkyurealm
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 DarkyuRealm : Madara(
"Darkyu Realm",
"https://darkyuerealm.site",
"pt-BR",
SimpleDateFormat("dd 'de' MMMMM, yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS))
.build()
}

View File

@ -48,7 +48,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Comics Valley", "https://comicsvalley.com", "hi", isNsfw = true),
SingleLang("CopyPasteScan", "https://copypastescan.xyz", "es"),
SingleLang("Cutie Pie", "https://cutiepie.ga", "tr"),
SingleLang("Darkyu Realm", "https://darkyuerealm.site", "pt-BR", overrideVersionCode = 1),
SingleLang("DarkYue Realm", "https://darkyuerealm.site/web", "pt-BR", pkgName = "darkyurealm", overrideVersionCode = 2),
SingleLang("Decadence Scans", "https://reader.decadencescans.com", "en", overrideVersionCode = 1),
SingleLang("شبكة كونان العربية", "https://www.manga.detectiveconanar.com", "ar", className = "DetectiveConanAr", overrideVersionCode = 1),
SingleLang("DiamondFansub", "https://diamondfansub.com", "tr"),