[RU] MangaClub: Fixing errors again (#10569)
This commit is contained in:
parent
47591d528c
commit
34afcb7f1a
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'MangaClub'
|
extName = 'MangaClub'
|
||||||
pkgNameSuffix = 'ru.mangaclub'
|
pkgNameSuffix = 'ru.mangaclub'
|
||||||
extClass = '.Mangaclub'
|
extClass = '.Mangaclub'
|
||||||
extVersionCode = 6
|
extVersionCode = 7
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
|
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
|
||||||
thumbnail_url = element.select("div.content-block>.image>picture>img").attr("abs:src")
|
thumbnail_url = element.select("div.content-block>.image>picture>img").attr("abs:src")
|
||||||
element.select("div.content-title>.title>a").apply {
|
element.select("div.content-title>.title>a").apply {
|
||||||
title = this.text().replace("\\'", "'").trim()
|
title = this.text().replace("\\'", "'").substringBefore("/").trim()
|
||||||
setUrlWithoutDomain(this.attr("abs:href"))
|
setUrlWithoutDomain(this.attr("abs:href"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,22 +100,24 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
return GET(url, headers)
|
return GET(url, headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaNextPageSelector(): String = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector(): String = popularMangaNextPageSelector()
|
||||||
override fun searchMangaSelector(): String = popularMangaSelector()
|
override fun searchMangaSelector(): String = popularMangaSelector()
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
// Details
|
// Details
|
||||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||||
|
val licensedStatus = document.select("div.fullstory").text().contains("Данное произведение лицензировано на территории РФ. Главы удалены.")
|
||||||
thumbnail_url = document.select("div.content-block>.image>picture>img").attr("abs:src")
|
thumbnail_url = document.select("div.content-block>.image>picture>img").attr("abs:src")
|
||||||
title = document.select("div.info>div>strong").text().replace("\\'", "'").trim()
|
title = document.select("div.info>div>strong").text().replace("\\'", "'").substringBefore("/").trim()
|
||||||
author = document.select("div.info>div>a[href*=author]").text().trim()
|
author = document.select("div.info>div>a[href*=author]").text().trim()
|
||||||
artist = author
|
artist = author
|
||||||
status = when (document.select("div.info>div>a[href*=status_translation]").text().trim()) {
|
status = when (document.select("div.info>div>a[href*=status_translation]").text().trim()) {
|
||||||
"Продолжается" -> SManga.ONGOING
|
"Продолжается" -> if (licensedStatus) SManga.LICENSED else SManga.ONGOING
|
||||||
"Завершен" -> SManga.COMPLETED
|
"Завершен" -> if (licensedStatus) SManga.LICENSED else SManga.COMPLETED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
description = document.select("div.description>p").text().trim()
|
description = document.select("div.description").text().substringBefore("Связанная манга:").trim()
|
||||||
genre = document.select("div.info>div>a[href*=tags]").joinToString(", ") { it.text() }
|
genre = document.select("div.info>div>a[href*=tags]").joinToString(", ") { it.text() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +139,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
add(Page(it.attr("data-p").toInt(), "", "${baseUrl.replace("//", "//img.")}/${it.attr("data-i")}"))
|
add(Page(it.attr("data-p").toInt(), "", "${baseUrl.replace("//", "//img.")}/${it.attr("data-i")}"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = ""
|
override fun imageUrlParse(document: Document): String = ""
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
|
@ -148,6 +151,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
"Статус",
|
"Статус",
|
||||||
arrayOf("Не выбрано", "Завершен", "Продолжается", "Заморожено/Заброшено")
|
arrayOf("Не выбрано", "Завершен", "Продолжается", "Заморожено/Заброшено")
|
||||||
)
|
)
|
||||||
|
|
||||||
private class OrderBy : Filter.Sort(
|
private class OrderBy : Filter.Sort(
|
||||||
"Сортировка",
|
"Сортировка",
|
||||||
arrayOf("По дате добавления", "По дате обновления", "В алфавитном порядке", "По количеству комментариев", "По количеству просмотров", "По рейтингу"),
|
arrayOf("По дате добавления", "По дате обновления", "В алфавитном порядке", "По количеству комментариев", "По количеству просмотров", "По рейтингу"),
|
||||||
|
|
Loading…
Reference in New Issue