From 8d66d91299ea6d9fdd71c1bea787a9bb13b2bd67 Mon Sep 17 00:00:00 2001 From: NMBLM Date: Tue, 23 Nov 2021 13:31:15 +0000 Subject: [PATCH] Manga raw club fixed missing pages (#9908) * [EN] manga-raw.club extension implementation * Added nsfw tag * Change to get correct description and if date parse fails returns 0 * update extension version number * Date is now parsed always with English Locale * Fixed Status to show correctly * Fix thumbnail not showing * Update Build Version * Manga raw club fixed missing pages manga-raw.club has been changing its website structure so I made the pages images search to not be as specific to the website. Also made the description search to not be as specific as well so it wont throw null on element.text(). Added R-18 genre to the tag search --- src/en/mangarawclub/build.gradle | 2 +- .../extension/en/mangarawclub/MangaRawClub.kt | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/en/mangarawclub/build.gradle b/src/en/mangarawclub/build.gradle index 766f6a710..6d0fc5d1c 100644 --- a/src/en/mangarawclub/build.gradle +++ b/src/en/mangarawclub/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'manga-raw.club' pkgNameSuffix = 'en.mangarawclub' extClass = '.MangaRawClub' - extVersionCode = 4 + extVersionCode = 5 isNsfw = true } diff --git a/src/en/mangarawclub/src/eu/kanade/tachiyomi/extension/en/mangarawclub/MangaRawClub.kt b/src/en/mangarawclub/src/eu/kanade/tachiyomi/extension/en/mangarawclub/MangaRawClub.kt index 5c07233c7..0f1f57afd 100644 --- a/src/en/mangarawclub/src/eu/kanade/tachiyomi/extension/en/mangarawclub/MangaRawClub.kt +++ b/src/en/mangarawclub/src/eu/kanade/tachiyomi/extension/en/mangarawclub/MangaRawClub.kt @@ -75,10 +75,11 @@ class MangaRawClub : ParsedHttpSource() { val manga = SManga.create() val authorElement = document.getElementsByClass("author").first() manga.author = authorElement.select("a").attr("title") + // manga.author = document.select("a[class=\"property-item\"]").first().attr("title") manga.artist = "" val genres = mutableListOf() document.select("a[href*=genre]").forEach { element -> - val genre = element.text() + val genre = element.attr("title") genres.add(genre) } manga.genre = genres.joinToString(", ") @@ -89,7 +90,6 @@ class MangaRawClub : ParsedHttpSource() { } manga.status = status manga.description = document.getElementsByClass("description").first().text() - manga.description = document.select("div.summary > div.content").first().text() val coverElement = document.getElementsByClass("cover") manga.thumbnail_url = coverElement.select("img").attr("data-src") @@ -131,9 +131,21 @@ class MangaRawClub : ParsedHttpSource() { override fun pageListParse(document: Document): List { val pages = mutableListOf() - document.select("section.page-in.content-wrap > div > center > img").forEachIndexed { i, it -> + + document.select("img[onerror][style=\"max-width: 100%;max-height: 100%;\"]").forEachIndexed { i, it -> pages.add(Page(i, "", it.attr("src"))) } + if (!pages.any()) { + document.select("img[onerror]").forEachIndexed { i, it -> + pages.add(Page(i, "", it.attr("src"))) + } + } + if (!pages.any()) { + document.select("article > div > center > img, section.page-in.content-wrap > div > center > img, section.page-in.content-wrap > center > div > center > img").forEachIndexed { i, it -> + pages.add(Page(i, "", it.attr("src"))) + } + } + return pages } @@ -238,6 +250,7 @@ class MangaRawClub : ParsedHttpSource() { "Genres", arrayOf( Pair("All", ""), + Pair("R-18", "R-18"), Pair("Action", "Action"), Pair("Adult", "Adult"), Pair("Adventure", "Adventure"),