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