From b6ae4d6c8d8aceaf5d3ae388ad94755ef1daf826 Mon Sep 17 00:00:00 2001 From: happywillow0 <45346080+happywillow0@users.noreply.github.com> Date: Tue, 3 Mar 2020 07:16:45 -0500 Subject: [PATCH] Update chapterFromElement (#2348) ExistentialComics = Fix Chapter list --- src/en/existentialcomics/build.gradle | 2 +- .../extension/en/existentialcomics/ExistentialComics.kt | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/en/existentialcomics/build.gradle b/src/en/existentialcomics/build.gradle index 4396aec6c..8bc682d9a 100644 --- a/src/en/existentialcomics/build.gradle +++ b/src/en/existentialcomics/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: Existential Comics' pkgNameSuffix = 'en.existentialcomics' extClass = '.ExistentialComics' - extVersionCode = 2 + extVersionCode = 3 libVersion = '1.2' } diff --git a/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt b/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt index 99ad6137e..1fba9cf2e 100644 --- a/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt +++ b/src/en/existentialcomics/src/eu/kanade/tachiyomi/extension/en/existentialcomics/ExistentialComics.kt @@ -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 }