Scantrad - better chapter lists (#3990)

This commit is contained in:
Mike 2020-08-03 00:03:04 -04:00 committed by GitHub
parent 895477e88e
commit e508cfddc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Scantrad'
pkgNameSuffix = 'fr.scantrad'
extClass = '.Scantrad'
extVersionCode = 5
extVersionCode = 6
libVersion = '1.2'
}

View File

@ -125,7 +125,8 @@ class Scantrad : ParsedHttpSource() {
// Chapters
override fun chapterListSelector() = "div.chapitre"
// ignore links from Amazon that get mixed in
override fun chapterListSelector() = "div.chapitre:has(span:contains(lire))"
override fun chapterFromElement(element: Element): SChapter {
val chapter = SChapter.create()
@ -178,7 +179,7 @@ class Scantrad : ParsedHttpSource() {
}
} else {
try {
SimpleDateFormat("dd MMM yyyy", Locale.FRENCH).parse(date.substringAfter("le ")).time
SimpleDateFormat("dd MMM yyyy", Locale.FRENCH).parse(date.substringAfter("le "))?.time ?: 0
} catch (_: Exception) {
0L
}