parent
ff75221350
commit
7bc1218b95
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: Rawkuma'
|
||||
pkgNameSuffix = 'ja.rawkuma'
|
||||
extClass = '.Rawkuma'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -156,22 +156,20 @@ class Rawkuma: ParsedHttpSource() {
|
|||
val chapters = mutableListOf<SChapter>()
|
||||
document.select(chapterListSelector()).map { chapters.add(chapterFromElement(it)) }
|
||||
// Add date for latest chapter only
|
||||
document.select("time[itemprop=dateModified]").attr("datetime")
|
||||
.let { chapters[0].date_upload = parseDate(it) }
|
||||
document.select("time[itemprop=dateModified]").text()
|
||||
.let {
|
||||
chapters[0].date_upload = parseDate(it)
|
||||
}
|
||||
return chapters
|
||||
}
|
||||
|
||||
private fun parseDate(date: String): Long {
|
||||
return try {
|
||||
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.US).parse(date).time
|
||||
} catch (e: ParseException) {
|
||||
try {
|
||||
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US).parse(date.substringBefore("+")).time
|
||||
SimpleDateFormat("MMM dd, yyyy", Locale.US).parse(date).time
|
||||
} catch (e: ParseException) {
|
||||
0L
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = ".lchx"
|
||||
|
||||
|
|
Loading…
Reference in New Issue