BlackoutComics: Fix selectors (#2283)
* Fix selectors * Get element that contains no hidden element * Fix latestUpdate and remove selector inversion for hidden elements
This commit is contained in:
parent
8a2a65ac53
commit
c088f3fabb
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Blackout Comics'
|
extName = 'Blackout Comics'
|
||||||
extClass = '.BlackoutComics'
|
extClass = '.BlackoutComics'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@ class BlackoutComics : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element) = SManga.create().apply {
|
override fun popularMangaFromElement(element: Element) = SManga.create().apply {
|
||||||
setUrlWithoutDomain(element.attr("href"))
|
setUrlWithoutDomain(element.attr("href"))
|
||||||
thumbnail_url = element.selectFirst("img:not(.hidden)")?.absUrl("src")
|
thumbnail_url = element.selectFirst("img.custom-image:not(.hidden), img.img-comics")?.absUrl("src")
|
||||||
title = element.selectFirst("p:not(.hidden), span.text-comic")!!.text()
|
title = element.selectFirst("p.image-name:not(.hidden), span.text-comic")!!.text()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = null
|
override fun popularMangaNextPageSelector() = null
|
||||||
|
@ -96,9 +96,11 @@ class BlackoutComics : ParsedHttpSource() {
|
||||||
|
|
||||||
// =========================== Manga Details ============================
|
// =========================== Manga Details ============================
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
val row = document.selectFirst("section > div.container > div.row")!!
|
val row = document.selectFirst("div.special-edition")!!
|
||||||
thumbnail_url = row.selectFirst("img:not(.hidden)")?.absUrl("src")
|
thumbnail_url = row.selectFirst("img:last-child")?.absUrl("src")
|
||||||
title = row.selectFirst("div.trailer-content > h2:not(.hidden)")!!.text()
|
title = row.select("h2")
|
||||||
|
.first { it.classNames().isEmpty() }!!
|
||||||
|
.text()
|
||||||
|
|
||||||
with(row.selectFirst("div.trailer-content:has(h3:containsOwn(Detalhes))")!!) {
|
with(row.selectFirst("div.trailer-content:has(h3:containsOwn(Detalhes))")!!) {
|
||||||
println(outerHtml())
|
println(outerHtml())
|
||||||
|
@ -153,7 +155,7 @@ class BlackoutComics : ParsedHttpSource() {
|
||||||
|
|
||||||
// =============================== Pages ================================
|
// =============================== Pages ================================
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("div.chapter-image-ofc canvas").mapIndexed { index, item ->
|
return document.select("div.chapter-image canvas").mapIndexed { index, item ->
|
||||||
Page(index, "", item.absUrl("data-src"))
|
Page(index, "", item.absUrl("data-src"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue