AsuraScans: Fix selectors (#5199)

wa
This commit is contained in:
bapeey 2024-09-25 08:52:19 -05:00 committed by Draff
parent cddbfcfc1a
commit 5a827719cf
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Asura Scans'
extClass = '.AsuraScans'
extVersionCode = 39
extVersionCode = 40
}
apply from: "$rootDir/common.gradle"

View File

@ -238,9 +238,9 @@ class AsuraScans : ParsedHttpSource(), ConfigurableSource {
override fun chapterFromElement(element: Element) = SChapter.create().apply {
setUrlWithoutDomain(element.selectFirst("a")!!.attr("abs:href").toPermSlugIfNeeded())
name = element.selectFirst("h3:eq(0)")!!.text()
name = element.selectFirst("h3")!!.text()
date_upload = try {
val text = element.selectFirst("h3:eq(1)")!!.ownText()
val text = element.selectFirst("h3 + h3")!!.ownText()
val cleanText = text.replace(CLEAN_DATE_REGEX, "$1")
dateFormat.parse(cleanText)?.time ?: 0
} catch (_: Exception) {