Fix some Madara sources (#18729)
* Fix some sources * Change Taurus domain * Update SamuraiScan domain
This commit is contained in:
parent
11da36eb70
commit
13f41aaaeb
|
@ -11,4 +11,8 @@ class ManhwaDashRaw : Madara(
|
||||||
dateFormat = SimpleDateFormat("dd/MM/yyy", Locale.ROOT),
|
dateFormat = SimpleDateFormat("dd/MM/yyy", Locale.ROOT),
|
||||||
) {
|
) {
|
||||||
override val useNewChapterEndpoint = true
|
override val useNewChapterEndpoint = true
|
||||||
|
|
||||||
|
override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Status) > div.summary-content"
|
||||||
|
override val mangaDetailsSelectorDescription = "div.post-content_item:contains(Summary) div.summary-container"
|
||||||
|
override val pageListParseSelector = "div.page-break img.wp-manga-chapter-img"
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ class ManhwaLatino : Madara(
|
||||||
override val chapterUrlSelector = "div.mini-letters > a"
|
override val chapterUrlSelector = "div.mini-letters > a"
|
||||||
|
|
||||||
override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Estado del comic) > div.summary-content"
|
override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Estado del comic) > div.summary-content"
|
||||||
override val mangaDetailsSelectorDescription = "div.post-content_item:contains(Resumen) > h3 > div.summary-container"
|
override val mangaDetailsSelectorDescription = "div.post-content_item:contains(Resumen) div.summary-container"
|
||||||
override val pageListParseSelector = "div.page-break img.wp-manga-chapter-img"
|
override val pageListParseSelector = "div.page-break img.wp-manga-chapter-img"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
|
|
@ -4,4 +4,14 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
class SamuraiScan : Madara("SamuraiScan", "https://samuraiscan.org", "es", SimpleDateFormat("MMMM d, yyyy", Locale("es")))
|
class SamuraiScan : Madara(
|
||||||
|
"SamuraiScan",
|
||||||
|
"https://samuraiscan.com",
|
||||||
|
"es",
|
||||||
|
SimpleDateFormat("MMMM d, yyyy", Locale("es")),
|
||||||
|
) {
|
||||||
|
override val useNewChapterEndpoint = true
|
||||||
|
|
||||||
|
override val mangaDetailsSelectorDescription = "div.summary_content div.manga-summary"
|
||||||
|
override val mangaDetailsSelectorStatus = "div.summary_content div.manga-authors"
|
||||||
|
}
|
||||||
|
|
|
@ -1,14 +1,60 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.taurusfansub
|
package eu.kanade.tachiyomi.extension.es.taurusfansub
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.network.POST
|
||||||
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import okhttp3.FormBody
|
||||||
|
import okhttp3.Request
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class TaurusFansub : Madara(
|
class TaurusFansub : Madara(
|
||||||
"Taurus Fansub",
|
"Taurus Fansub",
|
||||||
"https://taurusfansub.com",
|
"https://taurusmanga.com",
|
||||||
"es",
|
"es",
|
||||||
dateFormat = SimpleDateFormat("dd/MM/yyy", Locale.ROOT),
|
dateFormat = SimpleDateFormat("dd/MM/yyy", Locale.ROOT),
|
||||||
) {
|
) {
|
||||||
|
override val client = super.client.newBuilder()
|
||||||
|
.rateLimit(2, 1, TimeUnit.SECONDS)
|
||||||
|
.build()
|
||||||
|
|
||||||
override val useNewChapterEndpoint = true
|
override val useNewChapterEndpoint = true
|
||||||
|
|
||||||
|
override fun popularMangaNextPageSelector() = "body:not(:has(.no-posts))"
|
||||||
|
override val mangaDetailsSelectorDescription = "div.tab-summary > div.tab-content > div#tab-reducir > div.contenedor"
|
||||||
|
|
||||||
|
private fun loadMoreRequest(page: Int, metaKey: String): Request {
|
||||||
|
val formBody = FormBody.Builder().apply {
|
||||||
|
add("action", "madara_load_more")
|
||||||
|
add("page", page.toString())
|
||||||
|
add("template", "madara-core/content/content-archive")
|
||||||
|
add("vars[paged]", "1")
|
||||||
|
add("vars[orderby]", "meta_value_num")
|
||||||
|
add("vars[template]", "archive")
|
||||||
|
add("vars[sidebar]", "right")
|
||||||
|
add("vars[post_type]", "wp-manga")
|
||||||
|
add("vars[post_status]", "publish")
|
||||||
|
add("vars[meta_key]", metaKey)
|
||||||
|
add("vars[order]", "desc")
|
||||||
|
add("vars[meta_query][relation]", "OR")
|
||||||
|
add("vars[manga_archives_item_layout]", "big_thumbnail")
|
||||||
|
}.build()
|
||||||
|
|
||||||
|
val xhrHeaders = headersBuilder()
|
||||||
|
.add("Content-Length", formBody.contentLength().toString())
|
||||||
|
.add("Content-Type", formBody.contentType().toString())
|
||||||
|
.add("X-Requested-With", "XMLHttpRequest")
|
||||||
|
.build()
|
||||||
|
|
||||||
|
return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, formBody)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
|
return loadMoreRequest(page - 1, "_wp_manga_views")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
|
return loadMoreRequest(page - 1, "_latest_update")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,8 +336,8 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("ManhuaUS", "https://manhuaus.com", "en", overrideVersionCode = 5),
|
SingleLang("ManhuaUS", "https://manhuaus.com", "en", overrideVersionCode = 5),
|
||||||
SingleLang("ManhuaZone", "https://manhuazone.org", "en", overrideVersionCode = 1),
|
SingleLang("ManhuaZone", "https://manhuazone.org", "en", overrideVersionCode = 1),
|
||||||
SingleLang("Manhwa Raw", "https://manhwaraw.com", "ko", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Manhwa Raw", "https://manhwaraw.com", "ko", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("Manhwa-Latino", "https://manhwa-latino.com", "es", isNsfw = true, className = "ManhwaLatino", overrideVersionCode = 5),
|
SingleLang("Manhwa-Latino", "https://manhwa-latino.com", "es", isNsfw = true, className = "ManhwaLatino", overrideVersionCode = 6),
|
||||||
SingleLang("Manhwa-raw", "https://manhwa-raw.com", "all", isNsfw = true, className = "ManhwaDashRaw"),
|
SingleLang("Manhwa-raw", "https://manhwa-raw.com", "all", isNsfw = true, className = "ManhwaDashRaw", overrideVersionCode = 1),
|
||||||
SingleLang("Manhwa18.app", "https://manhwa18.app", "en", isNsfw = true, className = "Manhwa18app"),
|
SingleLang("Manhwa18.app", "https://manhwa18.app", "en", isNsfw = true, className = "Manhwa18app"),
|
||||||
SingleLang("Manhwa18.org", "https://manhwa18.org", "en", isNsfw = true, className = "Manhwa18Org", overrideVersionCode = 2),
|
SingleLang("Manhwa18.org", "https://manhwa18.org", "en", isNsfw = true, className = "Manhwa18Org", overrideVersionCode = 2),
|
||||||
SingleLang("Manhwa2Read", "https://manhwa2read.com", "en", isNsfw = false),
|
SingleLang("Manhwa2Read", "https://manhwa2read.com", "en", isNsfw = false),
|
||||||
|
@ -432,7 +432,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Rüya Manga", "https://www.ruyamanga.com", "tr", className = "RuyaManga", overrideVersionCode = 1),
|
SingleLang("Rüya Manga", "https://www.ruyamanga.com", "tr", className = "RuyaManga", overrideVersionCode = 1),
|
||||||
SingleLang("S2Manga", "https://www.s2manga.com", "en", overrideVersionCode = 2),
|
SingleLang("S2Manga", "https://www.s2manga.com", "en", overrideVersionCode = 2),
|
||||||
SingleLang("Sagrado Império da Britannia", "https://imperiodabritannia.com", "pt-BR", className = "ImperioDaBritannia"),
|
SingleLang("Sagrado Império da Britannia", "https://imperiodabritannia.com", "pt-BR", className = "ImperioDaBritannia"),
|
||||||
SingleLang("SamuraiScan", "https://samuraiscan.org", "es", overrideVersionCode = 2),
|
SingleLang("SamuraiScan", "https://samuraiscan.com", "es", overrideVersionCode = 3),
|
||||||
SingleLang("Sawamics", "https://sawamics.com", "en"),
|
SingleLang("Sawamics", "https://sawamics.com", "en"),
|
||||||
SingleLang("ScamberTraslator", "https://scambertraslator.com", "es", overrideVersionCode = 3),
|
SingleLang("ScamberTraslator", "https://scambertraslator.com", "es", overrideVersionCode = 3),
|
||||||
SingleLang("Scan Hentai Menu", "https://scan.hentai.menu", "fr", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Scan Hentai Menu", "https://scan.hentai.menu", "fr", isNsfw = true, overrideVersionCode = 1),
|
||||||
|
@ -463,7 +463,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Tankou Hentai", "https://tankouhentai.com", "pt-BR", isNsfw = true),
|
SingleLang("Tankou Hentai", "https://tankouhentai.com", "pt-BR", isNsfw = true),
|
||||||
SingleLang("TappyToon.Net", "https://tappytoon.net", "en", className = "Tappytoonnet"),
|
SingleLang("TappyToon.Net", "https://tappytoon.net", "en", className = "Tappytoonnet"),
|
||||||
SingleLang("Tatakae Scan", "https://tatakaescan.com", "pt-BR", isNsfw = true, overrideVersionCode = 2),
|
SingleLang("Tatakae Scan", "https://tatakaescan.com", "pt-BR", isNsfw = true, overrideVersionCode = 2),
|
||||||
SingleLang("Taurus Fansub", "https://taurusfansub.com", "es"),
|
SingleLang("Taurus Fansub", "https://taurusmanga.com", "es", overrideVersionCode = 1),
|
||||||
SingleLang("TeenManhua", "https://teenmanhua.com", "en", overrideVersionCode = 1),
|
SingleLang("TeenManhua", "https://teenmanhua.com", "en", overrideVersionCode = 1),
|
||||||
SingleLang("TempleScan", "https://templescanesp.com", "es", isNsfw = true, className = "TempleScanEsp", overrideVersionCode = 1),
|
SingleLang("TempleScan", "https://templescanesp.com", "es", isNsfw = true, className = "TempleScanEsp", overrideVersionCode = 1),
|
||||||
SingleLang("The Beginning After The End", "https://www.thebeginningaftertheend.fr", "fr", overrideVersionCode = 1),
|
SingleLang("The Beginning After The End", "https://www.thebeginningaftertheend.fr", "fr", overrideVersionCode = 1),
|
||||||
|
|
Loading…
Reference in New Issue