move ManhuaES to madara (#6041)

* move ManhuaES to madara

* remove import
This commit is contained in:
Riztard Lanthorn 2021-03-02 22:37:40 +07:00 committed by GitHub
parent fead080a07
commit 50689b24b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 58 deletions

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -0,0 +1,9 @@
package eu.kanade.tachiyomi.extension.en.manhuaes
import eu.kanade.tachiyomi.multisrc.madara.Madara
import java.text.SimpleDateFormat
import java.util.Locale
class ManhuaES : Madara("Manhua ES", "https://manhuaes.com", "en", SimpleDateFormat("dd MMMM, yyyy", Locale("vi"))) {
override val pageListParseSelector = "div.text-left li"
}

View File

@ -1,57 +0,0 @@
package eu.kanade.tachiyomi.extension.en.manhuaes
import eu.kanade.tachiyomi.multisrc.wpcomics.WPComics
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class ManhuaES : WPComics("Manhua ES", "https://manhuaes.com", "en", SimpleDateFormat("HH:mm - dd/MM/yyyy Z", Locale.US), "+0700") {
override val popularPath = "category-comics/manga"
override fun popularMangaRequest(page: Int): Request {
return GET("$baseUrl/$popularPath" + if (page > 1) "/page/$page" else "", headers)
}
override fun latestUpdatesRequest(page: Int): Request {
return GET(baseUrl + if (page > 1) "/page/$page" else "", headers)
}
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
return GET("$baseUrl/page/$page/?s=$query&post_type=comics")
}
override fun popularMangaNextPageSelector() = ".pagination li:last-child:not(.active)"
override fun popularMangaFromElement(element: Element): SManga {
return SManga.create().apply {
element.select("div.overlay a:has(h2)").let {
title = it.text()
setUrlWithoutDomain(it.attr("href"))
}
thumbnail_url = element.select("img").firstOrNull()?.attr("abs:src")
}
}
override fun mangaDetailsParse(document: Document): SManga {
return SManga.create().apply {
document.select("article#item-detail").let { info ->
author = info.select("li.author p.col-xs-8").text()
status = info.select("li.status p.col-xs-8").text().toStatus()
genre = info.select(".tags-genre a").joinToString { it.text() }
thumbnail_url = imageOrNull(info.select("div.col-image img").first())
val h3 = info.select(".detail-content h3").text()
val strong = info.select(".detail-content strong").text()
val showMoreFake = info.select(".detail-content .content-readmore").text()
val showMore = info.select(".detail-content .morelink").text()
val rawDesc = info.select("div.detail-content").text()
if (showMoreFake == null || showMoreFake == "") {
description = rawDesc.substringAfter(h3).substringAfter(strong).substringBefore(showMore)
} else {
description = rawDesc.substringAfter(h3).substringAfter(strong).substringBefore(showMoreFake)
}
}
}
}
override val pageListSelector = "div.chapter-detail ul img, div.chapter-detail div:not(.container) > img, div.chapter-detail p > img"
}

View File

@ -139,6 +139,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Mangazuki.online", "http://mangazukinew.online", "en", className = "MangazukiOnline"),
SingleLang("Mangceh", "https://mangceh.com", "id", isNsfw = true),
SingleLang("ManhuaBox", "https://manhuabox.net", "en"),
SingleLang("Manhua ES", "https://manhuaes.com", "en", overrideVersionCode = 1),
SingleLang("ManhuaFast", "https://manhuafast.com", "en"),
SingleLang("Manhuaga", "https://manhuaga.com", "en", overrideVersionCode = 1),
SingleLang("Manhua Plus", "https://manhuaplus.com", "en", overrideVersionCode = 1),

View File

@ -15,7 +15,6 @@ class WPComicsGenerator : ThemeSourceGenerator {
override val sources = listOf(
SingleLang("ComicLatest", "https://comiclatest.com", "en"),
MultiLang("MangaSum", "https://mangasum.com", listOf("en", "ja")),
SingleLang("Manhua ES", "https://manhuaes.com", "en"),
SingleLang("NetTruyen", "http://www.nettruyen.com", "vi"),
SingleLang("NhatTruyen", "http://nhattruyen.com", "vi"),
SingleLang("TruyenChon", "http://truyenchon.com", "vi"),