Add 2 sources to madara (#19424)
* Add newmanhua * Add topreadmanhwa * Actually apply update * Add run blocks & fix some edge-cases
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,21 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.en.newmanhua
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
|
class NewManhua : Madara(
|
||||||
|
"NewManhua",
|
||||||
|
"https://newmanhua.com",
|
||||||
|
"en",
|
||||||
|
) {
|
||||||
|
|
||||||
|
override val client: OkHttpClient = super.client.newBuilder()
|
||||||
|
.rateLimit(1)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
override val useNewChapterEndpoint = true
|
||||||
|
|
||||||
|
override val mangaDetailsSelectorDescription: String =
|
||||||
|
"div.description-summary div.summary__content h3 + p, div.description-summary div.summary__content:not(:has(h3)), div.summary_content div.post-content_item > h5 + div, div.summary_content div.manga-excerpt"
|
||||||
|
}
|
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 101 KiB |
|
@ -0,0 +1,56 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.en.topreadmanhwa
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
class TopReadManhwa : Madara(
|
||||||
|
"TopReadManhwa",
|
||||||
|
"https://topreadmanhwa.com",
|
||||||
|
"en",
|
||||||
|
SimpleDateFormat("MM/dd/yyyy", Locale.ENGLISH),
|
||||||
|
) {
|
||||||
|
|
||||||
|
override val client: OkHttpClient = super.client.newBuilder()
|
||||||
|
.rateLimit(1)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
override val useNewChapterEndpoint = true
|
||||||
|
|
||||||
|
// Popular
|
||||||
|
|
||||||
|
override val mangaEntrySelector = ""
|
||||||
|
|
||||||
|
override val popularMangaUrlSelector = "div.post-title a:not([target])"
|
||||||
|
|
||||||
|
// Details
|
||||||
|
|
||||||
|
private val descriptionSelector = "div.description-summary div.summary__content h3:contains(description) + *"
|
||||||
|
|
||||||
|
override val mangaDetailsSelectorDescription = "$descriptionSelector, ${super.mangaDetailsSelectorDescription}"
|
||||||
|
|
||||||
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
|
return super.mangaDetailsParse(document).apply {
|
||||||
|
document.selectFirst(descriptionSelector)?.run {
|
||||||
|
description = "${text().trim()}\n\n$description"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attempt to filter out things that aren't part of the series description
|
||||||
|
description = description?.run {
|
||||||
|
split("\n\n").filterNot { block ->
|
||||||
|
block.contains("topreadmanhwa", true) ||
|
||||||
|
block.contains("topreadmanwha", true) ||
|
||||||
|
block.contains("Please share your thoughts", true) ||
|
||||||
|
block.contains("If you're a fan of", true) ||
|
||||||
|
block.contains("Happy reading", true)
|
||||||
|
}
|
||||||
|
.distinct() // Edge case where the element in `descriptionSelector` can contain <p> tags
|
||||||
|
.joinToString("\n\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -373,6 +373,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("NeatManga", "https://neatmanga.com", "en", overrideVersionCode = 2),
|
SingleLang("NeatManga", "https://neatmanga.com", "en", overrideVersionCode = 2),
|
||||||
SingleLang("NekoPost.co (unoriginal)", "https://www.nekopost.co", "th", isNsfw = false, className = "NekoPostCo"),
|
SingleLang("NekoPost.co (unoriginal)", "https://www.nekopost.co", "th", isNsfw = false, className = "NekoPostCo"),
|
||||||
SingleLang("NekoScan", "https://nekoscan.com", "en", overrideVersionCode = 2),
|
SingleLang("NekoScan", "https://nekoscan.com", "en", overrideVersionCode = 2),
|
||||||
|
SingleLang("NewManhua", "https://newmanhua.com", "en", isNsfw = true),
|
||||||
SingleLang("Night Comic", "https://www.nightcomic.com", "en", overrideVersionCode = 1),
|
SingleLang("Night Comic", "https://www.nightcomic.com", "en", overrideVersionCode = 1),
|
||||||
SingleLang("Niji Translations", "https://niji-translations.com", "ar", overrideVersionCode = 1),
|
SingleLang("Niji Translations", "https://niji-translations.com", "ar", overrideVersionCode = 1),
|
||||||
SingleLang("Nitro Manga", "https://nitromanga.com", "en", className = "NitroScans", overrideVersionCode = 1),
|
SingleLang("Nitro Manga", "https://nitromanga.com", "en", className = "NitroScans", overrideVersionCode = 1),
|
||||||
|
@ -466,6 +467,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Toonizy", "https://toonizy.com", "en", isNsfw = true),
|
SingleLang("Toonizy", "https://toonizy.com", "en", isNsfw = true),
|
||||||
SingleLang("ToonMany", "https://toonmany.com", "en", isNsfw = true),
|
SingleLang("ToonMany", "https://toonmany.com", "en", isNsfw = true),
|
||||||
SingleLang("Top Manhua", "https://topmanhua.com", "en", overrideVersionCode = 2),
|
SingleLang("Top Manhua", "https://topmanhua.com", "en", overrideVersionCode = 2),
|
||||||
|
SingleLang("TopReadManhwa", "https://topreadmanhwa.com", "en", isNsfw = true),
|
||||||
SingleLang("Tortuga Ceviri", "https://tortuga-ceviri.com", "tr"),
|
SingleLang("Tortuga Ceviri", "https://tortuga-ceviri.com", "tr"),
|
||||||
SingleLang("Traducciones Moonlight", "https://traduccionesmoonlight.com", "es"),
|
SingleLang("Traducciones Moonlight", "https://traduccionesmoonlight.com", "es"),
|
||||||
SingleLang("TreeManga", "https://treemanga.com", "en", overrideVersionCode = 1),
|
SingleLang("TreeManga", "https://treemanga.com", "en", overrideVersionCode = 1),
|
||||||
|
|