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
This commit is contained in:
NMBLM 2021-11-23 13:31:15 +00:00 committed by GitHub
parent f4d7d47f4b
commit 8d66d91299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'manga-raw.club'
pkgNameSuffix = 'en.mangarawclub'
extClass = '.MangaRawClub'
extVersionCode = 4
extVersionCode = 5
isNsfw = true
}

View File

@ -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<String>()
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<Page> {
val pages = mutableListOf<Page>()
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"),