Fix date parsing error in GS. (#8415)
This commit is contained in:
parent
714c773714
commit
12a03e685b
|
@ -2,7 +2,10 @@ package eu.kanade.tachiyomi.extension.pt.geassscanlator
|
|||
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Response
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
@ -20,6 +23,13 @@ class GeassScanlator : WPMangaStream(
|
|||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val document = response.asJsoup()
|
||||
|
||||
return document.select(chapterListSelector())
|
||||
.map { chapterFromElement(it) }
|
||||
}
|
||||
|
||||
// [...document.querySelectorAll('ul.genrez li')]
|
||||
// .map(x => `Genre("${x.querySelector("label").innerHTML}", "${x.querySelector("input").value}")`)
|
||||
// .join(',\n')
|
||||
|
|
|
@ -227,7 +227,7 @@ abstract class WPMangaStream(
|
|||
}
|
||||
|
||||
fun parseChapterDate(date: String): Long {
|
||||
return if (date.contains("ago")) {
|
||||
return if (date.endsWith("ago")) {
|
||||
val value = date.split(' ')[0].toInt()
|
||||
when {
|
||||
"min" in date -> Calendar.getInstance().apply {
|
||||
|
|
|
@ -46,7 +46,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Sekte Doujin", "https://sektedoujin.xyz", "id", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Lemon Juice Scan", "https://lemonjuicescan.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
||||
SingleLang("Phoenix Fansub", "https://phoenixfansub.com", "es"),
|
||||
SingleLang("Geass Scanlator", "https://geassscan.xyz", "pt-BR", overrideVersionCode = 1)
|
||||
SingleLang("Geass Scanlator", "https://geassscan.xyz", "pt-BR", overrideVersionCode = 2)
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in New Issue