EarlyManga: fix ghost chapter (#6361)

This commit is contained in:
Riztard Lanthorn 2021-03-31 21:05:03 +07:00 committed by GitHub
parent 73481f1817
commit 152b4ca7d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'EarlyManga'
pkgNameSuffix = 'en.earlymanga'
extClass = '.EarlyManga'
extVersionCode = 15
extVersionCode = 16
libVersion = '1.2'
}

View File

@ -126,7 +126,7 @@ class EarlyManga : ParsedHttpSource() {
private val paginationNextPageSelector = popularMangaNextPageSelector()
override fun chapterListSelector() = ".chapter-container > .row:not(:first-child)"
override fun chapterListSelector() = ".chapter-container > .row:not(:first-child,.d-none)"
override fun chapterFromElement(element: Element) = SChapter.create().apply {
val selectorEncoded1 = "TG1OdmJDro" + "wQWdJQ2NvbEFro" + "wnSUNBZ0lDQWdJQ0FrownSUNj" + "b2xBZ0lDQWdJQ0rowFnSUNBZ0xuSnZkeWN" +
@ -141,7 +141,11 @@ class EarlyManga : ParsedHttpSource() {
}
private fun parseChapterDate(date: String): Long {
return SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault()).parse(date)?.time ?: 0L
return try {
SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.US).parse(date)?.time ?: 0
} catch (_: Exception) {
0L
}
}
// pages