Update chapterFromElement (#2348)

ExistentialComics = Fix Chapter list
This commit is contained in:
happywillow0 2020-03-03 07:16:45 -05:00 committed by GitHub
parent 7eb8bc2179
commit b6ae4d6c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Existential Comics'
pkgNameSuffix = 'en.existentialcomics'
extClass = '.ExistentialComics'
extVersionCode = 2
extVersionCode = 3
libVersion = '1.2'
}

View File

@ -43,15 +43,10 @@ class ExistentialComics : ParsedHttpSource() {
override fun chapterListSelector() = "div#date-comics ul li a:eq(0)"
override fun chapterFromElement(element: Element): SChapter {
val urlregex = "https://existentialcomics.com/comic/(.*)".toRegex()
val chapterUrl = element.attr("href")
val number = urlregex.find(chapterUrl)!!.groupValues[1]
val chapter = SChapter.create()
chapter.url = "/comic/$number"
chapter.setUrlWithoutDomain(element.attr("href"))
chapter.name = element.text()
chapter.chapter_number = number.toFloat()
chapter.chapter_number = chapter.url.substringAfterLast("/").toFloat()
return chapter
}