Fix BlackoutComics selectors (#1547)

* Fix CSS selectors

* Remove optional manga title

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>

* Remove optional manga datails title

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>

---------

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
Chopper 2024-02-26 11:15:49 -03:00 committed by Draff
parent 79d24a894a
commit 76bd3bb892
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Blackout Comics'
extClass = '.BlackoutComics'
extVersionCode = 1
extVersionCode = 2
isNsfw = true
}

View File

@ -48,8 +48,8 @@ class BlackoutComics : ParsedHttpSource() {
override fun popularMangaFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.attr("href"))
thumbnail_url = element.selectFirst("img")?.absUrl("src")
title = element.selectFirst("p, span.text-comic")?.text() ?: "Manga"
thumbnail_url = element.selectFirst("img:not(.hidden)")?.absUrl("src")
title = element.selectFirst("p:not(.hidden), span.text-comic")!!.text()
}
override fun popularMangaNextPageSelector() = null
@ -97,8 +97,8 @@ class BlackoutComics : ParsedHttpSource() {
// =========================== Manga Details ============================
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
val row = document.selectFirst("section > div.container > div.row")!!
thumbnail_url = row.selectFirst("img")?.absUrl("src")
title = row.selectFirst("div.trailer-content > h2")?.text() ?: "Manga"
thumbnail_url = row.selectFirst("img:not(.hidden)")?.absUrl("src")
title = row.selectFirst("div.trailer-content > h2:not(.hidden)")!!.text()
with(row.selectFirst("div.trailer-content:has(h3:containsOwn(Detalhes))")!!) {
println(outerHtml())
@ -153,7 +153,7 @@ class BlackoutComics : ParsedHttpSource() {
// =============================== Pages ================================
override fun pageListParse(document: Document): List<Page> {
return document.select("div.chapter-image canvas").mapIndexed { index, item ->
return document.select("div.chapter-image-ofc canvas").mapIndexed { index, item ->
Page(index, "", item.absUrl("data-src"))
}
}