weebcentral: add extra info, format manga details (#7586)
* weebcentral: format * apply suggestions * f * Update WeebCentral.kt * Update WeebCentral.kt --------- Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
parent
0f4d62d622
commit
2a44209a2f
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Weeb Central'
|
extName = 'Weeb Central'
|
||||||
extClass = '.WeebCentral'
|
extClass = '.WeebCentral'
|
||||||
extVersionCode = 10
|
extVersionCode = 11
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,27 +107,29 @@ class WeebCentral : ParsedHttpSource() {
|
||||||
author = select("ul > li:has(strong:contains(Author)) > span > a").joinToString { it.text() }
|
author = select("ul > li:has(strong:contains(Author)) > span > a").joinToString { it.text() }
|
||||||
genre = select("ul > li:has(strong:contains(Tag),strong:contains(Type)) a").joinToString { it.text() }
|
genre = select("ul > li:has(strong:contains(Tag),strong:contains(Type)) a").joinToString { it.text() }
|
||||||
status = selectFirst("ul > li:has(strong:contains(Status)) > a").parseStatus()
|
status = selectFirst("ul > li:has(strong:contains(Status)) > a").parseStatus()
|
||||||
|
|
||||||
if (selectFirst("ul > li > strong:contains(Official Translation) + a:contains(Yes)") != null) {
|
|
||||||
descBuilder.appendLine("Official Translation")
|
|
||||||
descBuilder.appendLine()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
with(document.select("section[x-data] > section")[1]) {
|
with(document.select("section[x-data] > section")[1]) {
|
||||||
title = selectFirst("h1")!!.text()
|
title = selectFirst("h1")!!.text()
|
||||||
|
|
||||||
val alternateTitles = select("li:has(strong:contains(Associated Name)) li")
|
|
||||||
if (alternateTitles.size > 0) {
|
|
||||||
descBuilder.appendLine("Associated Name(s):")
|
|
||||||
alternateTitles.forEach { descBuilder.appendLine(it.text()) }
|
|
||||||
descBuilder.appendLine()
|
|
||||||
}
|
|
||||||
|
|
||||||
descBuilder.append(
|
descBuilder.append(
|
||||||
selectFirst("li:has(strong:contains(Description)) > p")?.text()
|
selectFirst("li:has(strong:contains(Description)) > p")?.text()
|
||||||
?.replace("NOTE: ", "\n\nNOTE: "),
|
?.replace("NOTE: ", "\n\nNOTE: "),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val relatedSeries = select("li:has(strong:contains(Related Series)) li")
|
||||||
|
if (relatedSeries.size > 0) {
|
||||||
|
descBuilder.append("\n\nRelated Series(s):")
|
||||||
|
relatedSeries.forEach { series ->
|
||||||
|
descBuilder.append("\n").append("• ${series.text()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val alternateTitles = select("li:has(strong:contains(Associated Name)) li")
|
||||||
|
if (alternateTitles.size > 0) {
|
||||||
|
descBuilder.append("\n\nAssociated Name(s):")
|
||||||
|
alternateTitles.forEach { descBuilder.append("\n").append("• ${it.text()}") }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
description = descBuilder.toString()
|
description = descBuilder.toString()
|
||||||
|
@ -163,7 +165,7 @@ class WeebCentral : ParsedHttpSource() {
|
||||||
element.selectFirst("svg")?.attr("stroke")?.also { stroke ->
|
element.selectFirst("svg")?.attr("stroke")?.also { stroke ->
|
||||||
scanlator = when (stroke) {
|
scanlator = when (stroke) {
|
||||||
"#d8b4fe" -> "Official"
|
"#d8b4fe" -> "Official"
|
||||||
"#4C4D54" -> "Unofficial"
|
"#4C4D54" -> "Unknown"
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue