WP Comics add mangasum RAW (#5411)

This commit is contained in:
Riztard Lanthorn 2021-01-14 18:04:15 +07:00 committed by GitHub
parent 36011b3c51
commit 24159ea8f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'WP-Comics'
pkgNameSuffix = 'all.wpcomics'
extClass = '.WPComicsFactory'
extVersionCode = 18
extVersionCode = 19
libVersion = '1.2'
}

View File

@ -20,6 +20,7 @@ class WPComicsFactory : SourceFactory {
override fun createSources(): List<Source> = listOf(
ManhuaES(),
MangaSum(),
MangaSumRAW(),
XoxoComics(),
NhatTruyen(),
NetTruyen(),
@ -44,6 +45,16 @@ private class ManhuaES : WPComics("Manhua ES", "https://manhuaes.com", "en", Sim
override val pageListSelector = "div.chapter-detail ul img, div.chapter-detail div:not(.container) > img, div.chapter-detail p > img"
}
private class MangaSumRAW : WPComics("MangaSum RAW", "https://mangasum.com", "ja", SimpleDateFormat("MM/dd/yy", Locale.US), null) {
override fun popularMangaRequest(page: Int): Request {
return GET("$baseUrl/raw" + if (page > 1) "?page=$page" else "", headers)
}
override fun popularMangaSelector() = "div.items div.item"
override fun latestUpdatesRequest(page: Int) = popularMangaRequest(page)
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/genres?keyword=$query&page=$page", headers)
override fun searchMangaSelector() = "div.items div.item div.image a[title*=' - Raw']"
}
private class MangaSum : WPComics("MangaSum", "https://mangasum.com", "en", SimpleDateFormat("MM/dd/yy", Locale.US), null) {
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/genres?keyword=$query&page=$page", headers)
override fun searchMangaSelector() = "div.items div.item div.image a:not([title*=' - Raw'])"