Foolslide - cleaner details (#3030)

This commit is contained in:
Mike 2020-05-05 22:28:24 -04:00 committed by GitHub
parent 2f57009d3d
commit ee89cf8594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: FoolSlide (multiple sources)'
pkgNameSuffix = 'all.foolslide'
extClass = '.FoolSlideFactory'
extVersionCode = 45
extVersionCode = 46
libVersion = '1.2'
}

View File

@ -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</b>:\s?([^\n<]*)[\n<]""").find(infoHtml)?.groupValues?.get(1)
artist = Regex("""Artist</b>:\s?([^\n<]*)[\n<]""").find(infoHtml)?.groupValues?.get(1)
description = Regex("""(Synopsis|Description)</b>:\s?([^\n<]*)[\n<]""").find(infoHtml)?.groupValues?.get(2)
}
thumbnail_url = getDetailsThumbnail(document)
}