add fr GS Nation (#6720)
This commit is contained in:
parent
262a5d69c5
commit
cfea7668b7
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
|
@ -0,0 +1,64 @@
|
|||
package eu.kanade.tachiyomi.extension.fr.gsnation
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class GSNation : WPMangaReader("GS Nation", "http://gs-nation.fr", "fr", dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.FRANCE)) {
|
||||
|
||||
// remove the novels from the response
|
||||
override fun popularMangaParse(response: Response): MangasPage {
|
||||
val mangasPage = super.popularMangaParse(response)
|
||||
|
||||
return MangasPage(
|
||||
mangasPage.mangas
|
||||
.filterNot { it.title.startsWith("novel", true) }
|
||||
.distinctBy { it.url },
|
||||
mangasPage.hasNextPage
|
||||
)
|
||||
}
|
||||
|
||||
override fun latestUpdatesParse(response: Response): MangasPage = popularMangaParse(response)
|
||||
|
||||
override fun searchMangaParse(response: Response): MangasPage = popularMangaParse(response)
|
||||
|
||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||
author = document.select(".imptdt:contains(auteur) i").text()
|
||||
|
||||
artist = document.select(".tsinfo .imptdt:contains(artiste) i").text()
|
||||
|
||||
genre = document.select(".mgen a").joinToString { it.text() }
|
||||
status = parseStatus(document.select(".tsinfo .imptdt:contains(statut) i").text())
|
||||
|
||||
thumbnail_url = document.select("div.thumb img").attr("abs:src")
|
||||
description = document.select(".entry-content[itemprop=description]").joinToString("\n") { it.text() }
|
||||
|
||||
// add series type(manga/manhwa/manhua/other) thinggy to genre
|
||||
document.select(seriesTypeSelector).firstOrNull()?.ownText()?.let {
|
||||
if (it.isEmpty().not() && genre!!.contains(it, true).not()) {
|
||||
genre += if (genre!!.isEmpty()) it else ", $it"
|
||||
}
|
||||
}
|
||||
|
||||
// add alternative name to manga description
|
||||
document.select(altNameSelector).firstOrNull()?.ownText()?.let {
|
||||
if (it.isEmpty().not()) {
|
||||
description += when {
|
||||
description!!.isEmpty() -> altName + it
|
||||
else -> "\n\n$altName" + it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun parseStatus(status: String) = when {
|
||||
status.contains("En cours") -> SManga.ONGOING
|
||||
status.contains("Terminée") -> SManga.COMPLETED
|
||||
status.contains("Licenciée") -> SManga.LICENSED
|
||||
else -> SManga.UNKNOWN
|
||||
}
|
||||
}
|
|
@ -109,7 +109,7 @@ abstract class WPMangaReader(
|
|||
open val altNameSelector = ".alternative, .seriestualt"
|
||||
open val altName = "Alternative Name" + ": "
|
||||
|
||||
private fun parseStatus(status: String) = when {
|
||||
open fun parseStatus(status: String) = when {
|
||||
status.contains("Ongoing") -> SManga.ONGOING
|
||||
status.contains("Completed") -> SManga.COMPLETED
|
||||
else -> SManga.UNKNOWN
|
||||
|
@ -188,7 +188,7 @@ abstract class WPMangaReader(
|
|||
Pair("", "<select>"),
|
||||
Pair("title", "A-Z"),
|
||||
Pair("update", "Latest Update"),
|
||||
Pair("create", "Latest Added")
|
||||
Pair("latest", "Latest Added")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
|
|||
override val baseVersionCode: Int = 4
|
||||
|
||||
override val sources = listOf(
|
||||
|
||||
|
||||
SingleLang("KomikMama", "https://komikmama.net", "id"),
|
||||
SingleLang("MangaKita", "https://mangakita.net", "id"),
|
||||
SingleLang("Ngomik", "https://ngomik.net", "id"),
|
||||
|
@ -21,6 +21,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
|
||||
SingleLang("Flame Scans", "http://flamescans.org", "en", overrideVersionCode = 1),
|
||||
SingleLang("PMScans", "https://reader.pmscans.com", "en"),
|
||||
SingleLang("GS Nation", "https://gs-nation.fr", "fr")
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in New Issue