Fixed VCP selectors (#7241)

This commit is contained in:
Luis Andrés Bajaña F 2021-05-27 05:16:37 -05:00 committed by GitHub
parent 1c12e1801c
commit 69f6c632ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'VCPVMP'
pkgNameSuffix = "es.vcpvmp"
extClass = '.VCPVMPFactory'
extVersionCode = 4
extVersionCode = 5
libVersion = '1.2'
containsNsfw = true
}

View File

@ -4,6 +4,8 @@ import eu.kanade.tachiyomi.annotations.Nsfw
import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.SourceFactory
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.SManga
import org.jsoup.nodes.Element
@Nsfw
class VCPVMPFactory : SourceFactory {
@ -13,7 +15,24 @@ class VCPVMPFactory : SourceFactory {
)
}
class VCP : VCPVMP("VCP", "https://vercomicsporno.com")
class VCP : VCPVMP("VCP", "https://vercomicsporno.com") {
override fun popularMangaSelector() = "div.blog-list-items header ~ div.entry"
override val pageListSelector = "div.wp-content img"
override fun popularMangaNextPageSelector() = "span.current + a"
override fun popularMangaFromElement(element: Element) = SManga.create().apply {
element.select("a.popimg").first().let {
setUrlWithoutDomain(it.attr("href"))
it.select("figure img").first().let { img ->
title = img.attr("alt")
thumbnail_url = img.attr("abs:src")
}
}
}
}
class VMP : VCPVMP("VMP", "https://vermangasporno.com") {
override val pageListSelector = "div.comicimg img[src^=$baseUrl]"