Scantrad - better chapter lists (#3990)
This commit is contained in:
parent
895477e88e
commit
e508cfddc5
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Scantrad'
|
extName = 'Scantrad'
|
||||||
pkgNameSuffix = 'fr.scantrad'
|
pkgNameSuffix = 'fr.scantrad'
|
||||||
extClass = '.Scantrad'
|
extClass = '.Scantrad'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,8 @@ class Scantrad : ParsedHttpSource() {
|
||||||
|
|
||||||
// Chapters
|
// 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 {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
|
@ -178,7 +179,7 @@ class Scantrad : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
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) {
|
} catch (_: Exception) {
|
||||||
0L
|
0L
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue