Add a new source to MangaSar. (#13998)
This commit is contained in:
parent
a51c32b907
commit
55e62035c0
|
@ -0,0 +1,28 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.firemangas
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangasar.MangaSar
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
class FireMangas : MangaSar("Fire Mangás", "https://firemangas.com", "pt-BR") {
|
||||
|
||||
override fun chapterListPaginatedRequest(mangaUrl: String, page: Int): Request {
|
||||
return GET(baseUrl + mangaUrl, headers)
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
return response.asJsoup()
|
||||
.select("ul.full-chapters-list > li > a")
|
||||
.map(::chapterFromElement)
|
||||
}
|
||||
|
||||
private fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||
name = element.selectFirst("span.cap-text")!!.text()
|
||||
date_upload = element.selectFirst("span.chapter-date")?.text()?.toDate() ?: 0L
|
||||
setUrlWithoutDomain(element.attr("href"))
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ class MangaSarGenerator : ThemeSourceGenerator {
|
|||
override val baseVersionCode: Int = 7
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("Fire Mangás", "https://firemangas.com", "pt-BR", className = "FireMangas"),
|
||||
SingleLang("Mangazim", "https://mangazim.com", "pt-BR"),
|
||||
SingleLang("Meus Mangás", "https://meusmangas.net", "pt-BR", isNsfw = true, className = "MeusMangas", overrideVersionCode = 2)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue