|
|
|
@ -1,17 +1,18 @@
|
|
|
|
package org.koitharu.kotatsu.parsers.site.es
|
|
|
|
package org.koitharu.kotatsu.parsers.site.es
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.koitharu.kotatsu.parsers.Broken
|
|
|
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
|
|
|
import org.koitharu.kotatsu.parsers.MangaLoaderContext
|
|
|
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
|
|
|
import org.koitharu.kotatsu.parsers.MangaSourceParser
|
|
|
|
import org.koitharu.kotatsu.parsers.config.ConfigKey
|
|
|
|
import org.koitharu.kotatsu.parsers.config.ConfigKey
|
|
|
|
import org.koitharu.kotatsu.parsers.core.PagedMangaParser
|
|
|
|
import org.koitharu.kotatsu.parsers.core.PagedMangaParser
|
|
|
|
import org.koitharu.kotatsu.parsers.model.*
|
|
|
|
import org.koitharu.kotatsu.parsers.model.*
|
|
|
|
import org.koitharu.kotatsu.parsers.util.*
|
|
|
|
import org.koitharu.kotatsu.parsers.util.*
|
|
|
|
import org.koitharu.kotatsu.parsers.Broken
|
|
|
|
|
|
|
|
import java.util.*
|
|
|
|
import java.util.*
|
|
|
|
|
|
|
|
|
|
|
|
@Broken // Website closed
|
|
|
|
@Broken // Website closed
|
|
|
|
@MangaSourceParser("DRAGONTRANSLATION", "Dragon Translation", "es")
|
|
|
|
@MangaSourceParser("DRAGONTRANSLATION", "Dragon Translation", "es")
|
|
|
|
internal class DragonTranslationParser(context: MangaLoaderContext) : PagedMangaParser(context, MangaParserSource.DRAGONTRANSLATION, 30) {
|
|
|
|
internal class DragonTranslationParser(context: MangaLoaderContext) :
|
|
|
|
|
|
|
|
PagedMangaParser(context, MangaParserSource.DRAGONTRANSLATION, 30) {
|
|
|
|
|
|
|
|
|
|
|
|
override val configKeyDomain = ConfigKey.Domain("dragontranslation.net")
|
|
|
|
override val configKeyDomain = ConfigKey.Domain("dragontranslation.net")
|
|
|
|
|
|
|
|
|
|
|
|
@ -60,12 +61,14 @@ internal class DragonTranslationParser(context: MangaLoaderContext) : PagedManga
|
|
|
|
|
|
|
|
|
|
|
|
if (filter.types.isNotEmpty()) {
|
|
|
|
if (filter.types.isNotEmpty()) {
|
|
|
|
append("&type=")
|
|
|
|
append("&type=")
|
|
|
|
|
|
|
|
append(
|
|
|
|
when (filter.types.oneOrThrowIfMany()) {
|
|
|
|
when (filter.types.oneOrThrowIfMany()) {
|
|
|
|
ContentType.MANGA -> "manga"
|
|
|
|
ContentType.MANGA -> "manga"
|
|
|
|
ContentType.MANHWA -> "manhwa"
|
|
|
|
ContentType.MANHWA -> "manhwa"
|
|
|
|
ContentType.MANHUA -> "manhua"
|
|
|
|
ContentType.MANHUA -> "manhua"
|
|
|
|
else -> ""
|
|
|
|
else -> ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -81,7 +84,7 @@ internal class DragonTranslationParser(context: MangaLoaderContext) : PagedManga
|
|
|
|
url = href,
|
|
|
|
url = href,
|
|
|
|
publicUrl = href,
|
|
|
|
publicUrl = href,
|
|
|
|
coverUrl = coverUrl,
|
|
|
|
coverUrl = coverUrl,
|
|
|
|
title = div.selectFirst("h2.card-title.fs-6.entry-title").text(),
|
|
|
|
title = div.selectFirst("h2.card-title.fs-6.entry-title")?.text().orEmpty(),
|
|
|
|
altTitles = emptySet(),
|
|
|
|
altTitles = emptySet(),
|
|
|
|
rating = RATING_UNKNOWN,
|
|
|
|
rating = RATING_UNKNOWN,
|
|
|
|
tags = emptySet(),
|
|
|
|
tags = emptySet(),
|
|
|
|
@ -150,24 +153,31 @@ internal class DragonTranslationParser(context: MangaLoaderContext) : PagedManga
|
|
|
|
dateText.contains("minutos") -> {
|
|
|
|
dateText.contains("minutos") -> {
|
|
|
|
now - (number * 60 * 1000L)
|
|
|
|
now - (number * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dateText.contains("horas") -> {
|
|
|
|
dateText.contains("horas") -> {
|
|
|
|
now - (number * 60 * 60 * 1000L)
|
|
|
|
now - (number * 60 * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dateText.contains("días") -> {
|
|
|
|
dateText.contains("días") -> {
|
|
|
|
now - (number * 24 * 60 * 60 * 1000L)
|
|
|
|
now - (number * 24 * 60 * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dateText.contains("día") -> {
|
|
|
|
dateText.contains("día") -> {
|
|
|
|
now - (number * 24 * 60 * 60 * 1000L)
|
|
|
|
now - (number * 24 * 60 * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dateText.contains("semanas") -> {
|
|
|
|
dateText.contains("semanas") -> {
|
|
|
|
now - (number * 7 * 24 * 60 * 60 * 1000L)
|
|
|
|
now - (number * 7 * 24 * 60 * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dateText.contains("meses") -> {
|
|
|
|
dateText.contains("meses") -> {
|
|
|
|
now - (number * 30 * 24 * 60 * 60 * 1000L)
|
|
|
|
now - (number * 30 * 24 * 60 * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dateText.contains("años") -> {
|
|
|
|
dateText.contains("años") -> {
|
|
|
|
now - (number * 365 * 24 * 60 * 60 * 1000L)
|
|
|
|
now - (number * 365 * 24 * 60 * 60 * 1000L)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else -> 0L
|
|
|
|
else -> 0L
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|