|
|
|
|
@ -3,15 +3,9 @@ package org.koitharu.kotatsu.parsers.site.madara.es
|
|
|
|
|
import org.jsoup.nodes.Document
|
|
|
|
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
|
|
|
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
|
|
|
|
import org.koitharu.kotatsu.parsers.model.Manga
|
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaChapter
|
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
|
|
|
|
import org.koitharu.kotatsu.parsers.model.*
|
|
|
|
|
import org.koitharu.kotatsu.parsers.site.madara.MadaraParser
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.attrAsRelativeUrlOrNull
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.generateUid
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.mapChapters
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.parseFailed
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.selectFirstOrThrow
|
|
|
|
|
import org.koitharu.kotatsu.parsers.util.*
|
|
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
|
|
|
|
|
@MangaSourceParser("MANHWA_ES", "Manhwa Es", "es")
|
|
|
|
|
@ -24,8 +18,8 @@ internal class ManhwaEs(context: MangaLoaderContext) :
|
|
|
|
|
override suspend fun getChapters(manga: Manga, doc: Document): List<MangaChapter> {
|
|
|
|
|
val dateFormat = SimpleDateFormat(datePattern, sourceLocale)
|
|
|
|
|
return doc.body().select(selectChapter).mapChapters(reversed = true) { i, li ->
|
|
|
|
|
val a = li.selectFirst("a")
|
|
|
|
|
val href = a?.attrAsRelativeUrlOrNull("href") ?: li.parseFailed("Link is missing")
|
|
|
|
|
val a = li.selectFirstOrThrow("a")
|
|
|
|
|
val href = a.attrAsRelativeUrl("href")
|
|
|
|
|
val link = href + stylepage
|
|
|
|
|
val dateText = li.selectFirst("a.c-new-tag")?.attr("title") ?: li.selectFirst(selectDate)?.text()
|
|
|
|
|
|
|
|
|
|
|