From ab89a1c6831657bf3deca954000440d655bd232d Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Sun, 19 Jan 2020 21:48:06 -0500 Subject: [PATCH] Foolside - add Baixar Hentai (#2099) Foolside - add Baixar Hentai --- src/all/foolslide/build.gradle | 2 +- .../extension/all/foolslide/FoolSlideFactory.kt | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/all/foolslide/build.gradle b/src/all/foolslide/build.gradle index 9bc7f94fb..b45e95006 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 = 33 + extVersionCode = 34 libVersion = '1.2' } 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 692c83121..c7030d237 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,6 +8,7 @@ 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 @@ -39,7 +40,8 @@ class FoolSlideFactory : SourceFactory { ZandynoFansub(), HelveticaScans(), KirishimaFansub(), - PowerMangaIT() + PowerMangaIT(), + BaixarHentai() ) } @@ -137,4 +139,13 @@ class KirishimaFansub : FoolSlide("Kirishima Fansub", "https://kirishimafansub.n class PowerMangaIT : FoolSlide("PowerManga", "http://reader.powermanga.org", "it", "") - +class BaixarHentai : FoolSlide("Baixar Hentai", "https://leitura.baixarhentai.net", "pt") { + 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 } + } + } +}