Manhwa18.cc little fixes (#14225)
This commit is contained in:
parent
f8845b1fb9
commit
61b063a7c0
@ -20,34 +20,36 @@ class Manhwa18CcFactory : SourceFactory {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
class Manhwa18CcEN : Manhwa18Cc("Manhwa18.cc", "https://manhwa18.cc", "en") {
|
|
||||||
override fun popularMangaSelector() = "div.manga-item:not(:contains(Raw))"
|
|
||||||
}
|
|
||||||
class Manhwa18CcKO : Manhwa18Cc("Manhwa18.cc", "https://manhwa18.cc", "ko") {
|
|
||||||
override fun popularMangaSelector() = "div.manga-item:contains(Raw)"
|
|
||||||
}
|
|
||||||
class Manhwa18CcALL : Manhwa18Cc("Manhwa18.cc", "https://manhwa18.cc", "all")
|
class Manhwa18CcALL : Manhwa18Cc("Manhwa18.cc", "https://manhwa18.cc", "all")
|
||||||
|
|
||||||
|
class Manhwa18CcEN : Manhwa18Cc("Manhwa18.cc", "https://manhwa18.cc", "en") {
|
||||||
|
override fun popularMangaSelector() = "div.manga-item:not(:has(h3 a[title$='Raw']))"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Manhwa18CcKO : Manhwa18Cc("Manhwa18.cc", "https://manhwa18.cc", "ko") {
|
||||||
|
override fun popularMangaSelector() = "div.manga-item:has(h3 a[title$='Raw'])"
|
||||||
|
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/raw/$page")
|
||||||
|
}
|
||||||
|
|
||||||
abstract class Manhwa18Cc(
|
abstract class Manhwa18Cc(
|
||||||
override val name: String,
|
override val name: String,
|
||||||
override val baseUrl: String,
|
override val baseUrl: String,
|
||||||
lang: String
|
lang: String,
|
||||||
) : Madara(name, baseUrl, lang, SimpleDateFormat("dd MMM yyyy", Locale.US)) {
|
) : Madara(name, baseUrl, lang, SimpleDateFormat("dd MMM yyyy", Locale.US)) {
|
||||||
|
|
||||||
override val useLoadMoreSearch = false
|
override val useLoadMoreSearch = false
|
||||||
|
|
||||||
override val fetchGenres = false
|
override val fetchGenres = false
|
||||||
|
|
||||||
override fun popularMangaSelector() = "div.manga-item"
|
override fun popularMangaSelector() = "div.manga-item"
|
||||||
override val popularMangaUrlSelector = "div.data > h3 > a"
|
|
||||||
override fun popularMangaNextPageSelector() = "ul.pagination > li > a"
|
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override val popularMangaUrlSelector = "div.manga-item div.data a"
|
||||||
return GET("$baseUrl/webtoons/$page?orderby=trending")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun popularMangaNextPageSelector() = "ul.pagination li.next a"
|
||||||
return GET("$baseUrl/webtoons/$page?orderby=latest")
|
|
||||||
}
|
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/webtoons/$page?orderby=trending")
|
||||||
|
|
||||||
|
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/webtoons/$page?orderby=latest")
|
||||||
|
|
||||||
override fun searchMangaSelector() = popularMangaSelector()
|
override fun searchMangaSelector() = popularMangaSelector()
|
||||||
|
|
||||||
@ -58,22 +60,23 @@ abstract class Manhwa18Cc(
|
|||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
// After searching and go back to popular page, it always sent empty query thus display
|
// After searching and go back to popular page, it always sent empty query thus display
|
||||||
// "No results found" message. So this fix redirect to popular page.
|
// "No results found" message. So this fix redirect to popular page.
|
||||||
if (query.isBlank())
|
if (query.isBlank()) return popularMangaRequest(page)
|
||||||
return popularMangaRequest(1)
|
|
||||||
|
|
||||||
return GET("$baseUrl/search?q=$query&page=$page")
|
return GET("$baseUrl/search?q=$query&page=$page")
|
||||||
}
|
}
|
||||||
|
|
||||||
override val mangaSubString = "webtoon"
|
override val mangaSubString = "webtoon"
|
||||||
|
|
||||||
override fun chapterListSelector() = "li.wleft"
|
override val mangaDetailsSelectorDescription = "div.panel-story-description div.dsct"
|
||||||
|
|
||||||
|
override fun chapterListSelector() = "li.a-h"
|
||||||
|
|
||||||
override fun chapterDateSelector() = "span.chapter-time"
|
override fun chapterDateSelector() = "span.chapter-time"
|
||||||
|
|
||||||
override val pageListParseSelector = "div.read-content img"
|
override val pageListParseSelector = "div.read-content img"
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
||||||
return document.select(pageListParseSelector).mapIndexed { index, element ->
|
document.select(pageListParseSelector).mapIndexed { index, element ->
|
||||||
Page(
|
Page(
|
||||||
index,
|
index,
|
||||||
document.location(),
|
document.location(),
|
||||||
|
@ -15,7 +15,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||||||
override val sources = listOf(
|
override val sources = listOf(
|
||||||
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 13),
|
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 13),
|
||||||
MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1),
|
MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1),
|
||||||
MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 2),
|
MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 3),
|
||||||
MultiLang("Olympus Scanlation", "https://olympusscanlation.com", listOf("es", "pt-BR")),
|
MultiLang("Olympus Scanlation", "https://olympusscanlation.com", listOf("es", "pt-BR")),
|
||||||
MultiLang("Reaper Scans", "https://reaperscans.com", listOf("fr", "id", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 11),
|
MultiLang("Reaper Scans", "https://reaperscans.com", listOf("fr", "id", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 11),
|
||||||
MultiLang("Seven King Scanlation", "https://sksubs.net", listOf("es", "en"), isNsfw = true),
|
MultiLang("Seven King Scanlation", "https://sksubs.net", listOf("es", "en"), isNsfw = true),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user