From ee89cf859446f9838997d6f8a85ebc43ada1e10a Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Tue, 5 May 2020 22:28:24 -0400 Subject: [PATCH] Foolslide - cleaner details (#3030) --- src/all/foolslide/build.gradle | 2 +- .../kanade/tachiyomi/extension/all/foolslide/FoolSlide.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/all/foolslide/build.gradle b/src/all/foolslide/build.gradle index 3f4b460d0..7b6b746fb 100644 --- a/src/all/foolslide/build.gradle +++ b/src/all/foolslide/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: FoolSlide (multiple sources)' pkgNameSuffix = 'all.foolslide' extClass = '.FoolSlideFactory' - extVersionCode = 45 + extVersionCode = 46 libVersion = '1.2' } diff --git a/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlide.kt b/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlide.kt index a053cffb6..be751d0dc 100644 --- a/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlide.kt +++ b/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlide.kt @@ -123,10 +123,10 @@ abstract class FoolSlide( override fun mangaDetailsParse(document: Document): SManga { return SManga.create().apply { - document.select(mangaDetailsInfoSelector).firstOrNull()?.text()?.let { infoElement -> - author = infoElement.substringAfter("Author:").substringBefore("Artist:") - artist = infoElement.substringAfter("Artist:").substringBefore("Synopsis:") - description = infoElement.substringAfter("Synopsis:") + document.select(mangaDetailsInfoSelector).firstOrNull()?.html()?.let { infoHtml -> + author = Regex("""Author:\s?([^\n<]*)[\n<]""").find(infoHtml)?.groupValues?.get(1) + artist = Regex("""Artist:\s?([^\n<]*)[\n<]""").find(infoHtml)?.groupValues?.get(1) + description = Regex("""(Synopsis|Description):\s?([^\n<]*)[\n<]""").find(infoHtml)?.groupValues?.get(2) } thumbnail_url = getDetailsThumbnail(document) }