diff --git a/src/all/foolslide/build.gradle b/src/all/foolslide/build.gradle index 110b3a4df..d1129fdb1 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 = 36 + extVersionCode = 37 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 8db91448c..bcded0970 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 @@ -110,7 +110,14 @@ abstract class FoolSlide( override fun mangaDetailsRequest(manga: SManga) = allowAdult(super.mangaDetailsRequest(manga)) open val mangaDetailsInfoSelector = "div.info" - open val mangaDetailsThumbnailSelector = "div.thumbnail img" + + // if there's no image on the details page, get the first page of the first chapter + fun getDetailsThumbnail(document: Document, urlSelector: String = chapterUrlSelector): String? { + return document.select("div.thumbnail img").firstOrNull()?.attr("abs:src") ?: + document.select(chapterListSelector()).last().select(urlSelector).attr("abs:href") + .let { url -> client.newCall(allowAdult(GET(url, headers))).execute() } + .let { response -> pageListParse(response).first().imageUrl } + } override fun mangaDetailsParse(document: Document): SManga { val infoElement = document.select(mangaDetailsInfoSelector).first().text() @@ -119,7 +126,7 @@ abstract class FoolSlide( manga.author = infoElement.substringAfter("Author:").substringBefore("Artist:") manga.artist = infoElement.substringAfter("Artist:").substringBefore("Synopsis:") manga.description = infoElement.substringAfter("Synopsis:") - manga.thumbnail_url = document.select(mangaDetailsThumbnailSelector).first()?.absUrl("src") + manga.thumbnail_url = getDetailsThumbnail(document) return manga } diff --git a/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt b/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt index 01ca7490b..633617746 100644 --- a/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt +++ b/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt @@ -8,7 +8,6 @@ import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.util.asJsoup import okhttp3.Request import org.jsoup.nodes.Document @@ -22,8 +21,6 @@ class FoolSlideFactory : SourceFactory { IskultripScans(), AnataNoMotokare(), DeathTollScans(), - DKThias(), - WorldThree(), DokiFansubs(), YuriIsm(), AjiaNoScantrad(), @@ -33,7 +30,6 @@ class FoolSlideFactory : SourceFactory { Lilyreader(), Russification(), EvilFlowers(), - AkaiYuhiMunTeam(), LupiTeam(), HentaiCafe(), TheCatScans(), @@ -66,7 +62,15 @@ class TheCatScans : FoolSlide("The Cat Scans", "https://reader2.thecatscans.com/ class SenseScans : FoolSlide("Sense-Scans", "http://sensescans.com", "en", "/reader") -class KireiCake : FoolSlide("Kirei Cake", "https://reader.kireicake.com", "en") +class KireiCake : FoolSlide("Kirei Cake", "https://reader.kireicake.com", "en") { + override fun mangaDetailsParse(document: Document): SManga { + return SManga.create().apply { + description = document.select("$mangaDetailsInfoSelector li:has(b:contains(description))") + .first()?.ownText()?.substringAfter(":") + thumbnail_url = getDetailsThumbnail(document) + } + } +} class SilentSky : FoolSlide("Silent Sky", "https://reader.silentsky-scans.net", "en") @@ -82,14 +86,6 @@ class AnataNoMotokare : FoolSlide("Anata no Motokare", "https://motokare.xyz", " class DeathTollScans : FoolSlide("Death Toll Scans", "https://reader.deathtollscans.net", "en") -class DKThias : FoolSlide("DKThias Scanlations", "http://reader.dkthias.com", "en", "/reader") { - override fun popularMangaRequest(page: Int): Request { - return GET("$baseUrl$urlModifier/list/$page/", headers) - } -} - -class WorldThree : FoolSlide("World Three", "http://www.slide.world-three.org", "en") - class DokiFansubs : FoolSlide("Doki Fansubs", "https://kobato.hologfx.com", "en", "/reader") class YuriIsm : FoolSlide("Yuri-ism", "https://www.yuri-ism.net", "en", "/slide") @@ -108,8 +104,6 @@ class Russification : FoolSlide("Русификация", "https://rusmanga.ru", class EvilFlowers : FoolSlide("Evil Flowers", "http://reader.evilflowers.com", "en") -class AkaiYuhiMunTeam : FoolSlide("AkaiYuhiMun team", "https://akaiyuhimun.ru", "ru", "/manga") - class LupiTeam : FoolSlide("LupiTeam", "https://lupiteam.net", "it", "/reader") { override fun mangaDetailsParse(document: Document): SManga { val infoElement = document.select(mangaDetailsInfoSelector).first().text() @@ -125,7 +119,7 @@ class LupiTeam : FoolSlide("LupiTeam", "https://lupiteam.net", "it", "/reader") else -> SManga.UNKNOWN } manga.description = infoElement.substringAfter("Trama: ") - manga.thumbnail_url = document.select(mangaDetailsThumbnailSelector).first()?.absUrl("src") + manga.thumbnail_url = getDetailsThumbnail(document) return manga } @@ -143,9 +137,7 @@ class BaixarHentai : FoolSlide("Baixar Hentai", "https://leitura.baixarhentai.ne override fun mangaDetailsParse(document: Document): SManga { return SManga.create().apply { title = document.select("h1.title").text() - thumbnail_url = document.select("div.thumbnail img").firstOrNull()?.attr("abs:src") ?: - client.newCall(GET(document.select("div.title a").last().attr("abs:href"), headers)).execute().asJsoup() - .let { pageListParse(it).firstOrNull()?.imageUrl } + thumbnail_url = getDetailsThumbnail(document, "div.title a") } } }