WP MangaStream add source & change url (#5596)

change flame scans to their new site
add MangaIndonesia source
This commit is contained in:
Riztard Lanthorn 2021-02-02 05:47:40 +07:00 committed by GitHub
parent de13abf701
commit 6fb7cea1ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'WP MangaStream (multiple sources)' extName = 'WP MangaStream (multiple sources)'
pkgNameSuffix = 'all.wpmangastream' pkgNameSuffix = 'all.wpmangastream'
extClass = '.WPMangaStreamFactory' extClass = '.WPMangaStreamFactory'
extVersionCode = 49 extVersionCode = 50
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -59,10 +59,44 @@ class WPMangaStreamFactory : SourceFactory {
KomikRu(), KomikRu(),
MangaShiro(), MangaShiro(),
ChiOtaku(), ChiOtaku(),
KlanKomik() KlanKomik(),
MangaIndonesia()
) )
} }
class MangaIndonesia : WPMangaStream("MangaIndonesia", "https://mangaindonesia.net", "id") {
override fun popularMangaRequest(page: Int): Request {
// return GET("$baseUrl/popular" + if (page > 1) "/${(page - 1) * 30}" else "", headers)
// return GET("$baseUrl/$popularPath" + if (page > 1) "?page=$page" else "", headers)
return GET("$baseUrl/update/" + if (page > 1) "?page=$page" else "", headers)
}
override fun latestUpdatesRequest(page: Int): Request {
return GET(baseUrl, headers)
}
override fun latestUpdatesSelector() = ".listupd:not(.project) .uta .imgu"
override fun latestUpdatesFromElement(element: Element): SManga {
val manga = SManga.create()
manga.thumbnail_url = element.select("a img").imgAttr()
element.select("a").first().let {
manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.attr("title")
}
return manga
}
override fun latestUpdatesNextPageSelector(): String? = null
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
return GET("$baseUrl/page/$page/$query", headers)
}
override fun chapterListSelector() = "div.bxcl ul li:has(span)"
override fun chapterFromElement(element: Element): SChapter {
val chapter = SChapter.create()
chapter.setUrlWithoutDomain(element.select("a").attr("href"))
chapter.name = element.select("a").text()
chapter.date_upload = element.select("span.dt").firstOrNull()?.text()?.let { parseChapterDate(it) } ?: 0
return chapter
}
}
class KlanKomik : WPMangaStream("KlanKomik", "https://klankomik.com", "id") class KlanKomik : WPMangaStream("KlanKomik", "https://klankomik.com", "id")
class ChiOtaku : WPMangaStream("ChiOtaku", "https://chiotaku.com", "id") class ChiOtaku : WPMangaStream("ChiOtaku", "https://chiotaku.com", "id")
@ -86,7 +120,7 @@ class Rawkuma : WPMangaStream("Rawkuma", "https://rawkuma.com/", "ja")
class GURUKomik : WPMangaStream("GURU Komik", "https://gurukomik.com", "id", SimpleDateFormat("MMMM dd, yyyy", Locale.forLanguageTag("id"))) class GURUKomik : WPMangaStream("GURU Komik", "https://gurukomik.com", "id", SimpleDateFormat("MMMM dd, yyyy", Locale.forLanguageTag("id")))
class FlameScans : WPMangaStream("Flame Scans", "https://www.flame-scans.com", "en") class FlameScans : WPMangaStream("Flame Scans", "http://flamescans.org", "en")
class SheaManga : WPMangaStream( class SheaManga : WPMangaStream(
"Shea Manga", "Shea Manga",