Add new sources to Madara. (#8840)
This commit is contained in:
parent
4e30fc57d9
commit
2368c5affe
|
@ -0,0 +1,26 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.finalscans
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
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
|
||||
|
||||
@Nsfw
|
||||
class FinalScans : Madara(
|
||||
"Final Scans",
|
||||
"https://finalscans.com",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.irisscanlator
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
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
|
||||
|
||||
@Nsfw
|
||||
class IrisScanlator : Madara(
|
||||
"Iris Scanlator",
|
||||
"https://irisscanlator.com",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.otksscanlator
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
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
|
||||
|
||||
@Nsfw
|
||||
class OtksScanlator : Madara(
|
||||
"OTksScanlator",
|
||||
"https://otkscanlator.xyz",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.reaperscansbr
|
||||
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import okhttp3.OkHttpClient
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class ReaperScansBr : Madara(
|
||||
"Reaper Scans (BR)",
|
||||
"https://reaperscans.com.br",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
|
||||
override fun chapterFromElement(element: Element): SChapter {
|
||||
val chapter = SChapter.create()
|
||||
|
||||
with(element) {
|
||||
select(chapterUrlSelector).first()?.let { urlElement ->
|
||||
chapter.url = urlElement.attr("abs:href").let {
|
||||
it.substringBefore("?style=paged") + if (!it.endsWith(chapterUrlSuffix)) chapterUrlSuffix else ""
|
||||
}
|
||||
chapter.name = urlElement.ownText()
|
||||
}
|
||||
// Dates can be part of a "new" graphic or plain text
|
||||
// Added "title" alternative
|
||||
chapter.date_upload = select("img").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
|
||||
?: select("span a").firstOrNull()?.attr("title")?.let { parseRelativeDate(it) }
|
||||
?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text())
|
||||
}
|
||||
|
||||
return chapter
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.seikouscans
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
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
|
||||
|
||||
@Nsfw
|
||||
class SeikouScans : Madara(
|
||||
"Seikou Scans",
|
||||
"https://seikouscans.com",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("dd 'de' MMMMM 'de' yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.vaposcan
|
||||
package eu.kanade.tachiyomi.extension.pt.sindriascanlator
|
||||
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
|
@ -7,9 +7,9 @@ import java.text.SimpleDateFormat
|
|||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class VapoScan : Madara(
|
||||
"Vapo Scan",
|
||||
"https://vaposcan.net",
|
||||
class SindriaScanlator : Madara(
|
||||
"Sindria Scanlator",
|
||||
"https://sindriascanlator.com",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("dd 'de' MMMMM 'de' yyyy", Locale("pt", "BR"))
|
||||
) {
|
|
@ -0,0 +1,26 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.sodascan
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
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
|
||||
|
||||
@Nsfw
|
||||
class SodaScan : Madara(
|
||||
"SodaScan",
|
||||
"https://sodascan.xyz",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("dd 'de' MMMMM 'de' yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
}
|
|
@ -542,7 +542,7 @@ abstract class Madara(
|
|||
|
||||
// Parses dates in this form:
|
||||
// 21 horas ago
|
||||
fun parseRelativeDate(date: String): Long {
|
||||
protected open fun parseRelativeDate(date: String): Long {
|
||||
val number = Regex("""(\d+)""").find(date)?.value?.toIntOrNull() ?: return 0
|
||||
val cal = Calendar.getInstance()
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Eternal Scans", "https://eternalscans.com", "en"),
|
||||
SingleLang("FastManhwa", "https://fastmanhwa.net", "en", isNsfw = true, overrideVersionCode = 1),
|
||||
SingleLang("FDM Scan", "https://fdmscan.com", "pt-BR", overrideVersionCode = 3),
|
||||
SingleLang("Final Scans", "https://finalscans.com", "pt-BR", isNsfw = true),
|
||||
SingleLang("Fiz Manga", "https://fizmanga.com", "en"),
|
||||
SingleLang("Fleur Blanche", "https://fleurscan.com", "pt-BR", isNsfw = true),
|
||||
SingleLang("Free Manga", "https://freemanga.me", "en", isNsfw = true, overrideVersionCode = 2),
|
||||
|
@ -121,6 +122,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("InfraFandub", "https://infrafandub.xyz", "es"),
|
||||
SingleLang("Inmortal Scan", "https://manga.mundodrama.site", "es"),
|
||||
SingleLang("InstaManhwa", "https://www.instamanhwa.com", "en", isNsfw = true),
|
||||
SingleLang("Iris Scanlator", "https://irisscanlator.com", "pt-BR", isNsfw = true),
|
||||
SingleLang("IsekaiScan.com", "https://isekaiscan.com", "en", className = "IsekaiScanCom", overrideVersionCode = 4),
|
||||
SingleLang("IsekaiScanManga (unoriginal)", "https://isekaiscanmanga.com", "en", className = "IsekaiScanManga", overrideVersionCode = 1),
|
||||
SingleLang("Its Your Right Manhua", "https://itsyourightmanhua.com/", "en", overrideVersionCode = 1),
|
||||
|
@ -308,6 +310,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Off Scan", "https://offscan.top", "pt-BR", overrideVersionCode = 3),
|
||||
SingleLang("Olho da Lua", "https://olhodalua.xyz", "pt-BR", className = "OlhoDaLua"),
|
||||
SingleLang("Origami Orpheans", "https://origami-orpheans.com.br", "pt-BR", overrideVersionCode = 3),
|
||||
SingleLang("OTksScanlator", "https://otkscanlator.xyz", "pt-BR", isNsfw = true, className = "OtksScanlator"),
|
||||
SingleLang("Paean Scans", "https://paeanscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Painful Nightz Scan", "https://painfulnightzscan.com", "en"),
|
||||
SingleLang("Platinum Crown", "https://platinumscans.com", "en", overrideVersionCode = 1),
|
||||
|
@ -326,6 +329,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("ReadAdult", "https://readadult.net", "en", isNsfw = true),
|
||||
SingleLang("ReadManhua", "https://readmanhua.net", "en", overrideVersionCode = 2),
|
||||
SingleLang("Reaper Scans", "https://reaperscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Reaper Scans (BR)", "https://reaperscans.com.br", "pt-BR", className = "ReaperScansBr"),
|
||||
SingleLang("Red Ribbon Scanlator", "https://redribbon.site", "pt-BR", overrideVersionCode = 1),
|
||||
SingleLang("Renascence Scans (Renascans)", "https://new.renascans.com", "en", className = "RenaScans", overrideVersionCode = 1),
|
||||
SingleLang("Reset Scans", "https://reset-scans.com", "en", overrideVersionCode = 3),
|
||||
|
@ -337,18 +341,21 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Sawamics", "https://sawamics.com", "en"),
|
||||
SingleLang("Scans Raw", "https://scansraw.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Seafoam Scans", "https://seafoamscans.com", "en", overrideVersionCode = 2),
|
||||
SingleLang("Seikou Scans", "https://seikouscans.com", "pt-BR", isNsfw = true),
|
||||
SingleLang("Setsu Scans", "https://setsuscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Shield Manga", "https://shieldmanga.club", "en", overrideVersionCode = 2),
|
||||
SingleLang("ShinobiScans", "https://shinobiscans.com", "it"),
|
||||
SingleLang("Shooting Star Scans", "https://shootingstarscans.com", "en", overrideVersionCode = 2),
|
||||
SingleLang("ShoujoHearts", "https://shoujohearts.com", "en", overrideVersionCode = 2),
|
||||
SingleLang("SiXiang Scans", "http://www.sixiangscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Sindria Scanlator", "https://sindriascanlator.com", "pt-BR"),
|
||||
SingleLang("Sinensis", "https://sinensisscan.com", "pt-BR", overrideVersionCode = 1),
|
||||
SingleLang("Siyahmelek", "https://siyahmelek.net", "tr", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Skymanga", "https://skymanga.co", "en", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("SkyRaws", "https://skyraws.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Sleeping Knight Scans", "https://skscans.com", "en", overrideVersionCode = 2),
|
||||
SingleLang("Sleepy Translations", "https://sleepytranslations.com/", "en", overrideVersionCode = 1),
|
||||
SingleLang("SodaScan", "https://sodascan.xyz", "pt-BR", isNsfw = true),
|
||||
SingleLang("Solo Leveling", "https://readsololeveling.online", "en"),
|
||||
SingleLang("StageComics", "https://stagecomics.com", "pt-BR", overrideVersionCode = 3),
|
||||
SingleLang("Sugar Babies", "https://sugarbscan.com", "en", overrideVersionCode = 1),
|
||||
|
@ -375,7 +382,6 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Unemployed Scans", "https://unemployedscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Uyuyan Balik", "https://uyuyanbalik.com/", "tr", overrideVersionCode = 1),
|
||||
SingleLang("Vanguard Bun", "https://vanguardbun.com/", "en", overrideVersionCode = 1),
|
||||
SingleLang("Vapo Scan", "https://vaposcan.net", "pt-BR", overrideVersionCode = 1),
|
||||
SingleLang("Visbellum", "https://visbellum.com", "pt-BR", overrideVersionCode = 2),
|
||||
SingleLang("Volkan Scans", "https://volkanscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Wakamics", "https://wakamics.net", "en"),
|
||||
|
|
Loading…
Reference in New Issue