VCPVMP: Fix images don't load (#16470)

* Fix images

* .
This commit is contained in:
Rolando Lecca 2023-05-17 21:51:27 -05:00 committed by GitHub
parent 756875f488
commit 2c0e9ee6a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'VCPVMP' extName = 'VCPVMP'
pkgNameSuffix = "es.vcpvmp" pkgNameSuffix = "es.vcpvmp"
extClass = '.VCPVMPFactory' extClass = '.VCPVMPFactory'
extVersionCode = 7 extVersionCode = 8
isNsfw = true isNsfw = true
} }

View File

@ -36,7 +36,7 @@ open class VCPVMP(override val name: String, override val baseUrl: String) : Par
element.select("a.popimg").first()!!.let { element.select("a.popimg").first()!!.let {
setUrlWithoutDomain(it.attr("href")) setUrlWithoutDomain(it.attr("href"))
title = it.select("img").attr("alt") title = it.select("img").attr("alt")
thumbnail_url = it.select("img").attr("abs:src").substringBefore("?") thumbnail_url = it.select("img:not(noscript img)").attr("abs:data-src")
} }
} }
@ -75,9 +75,9 @@ open class VCPVMP(override val name: String, override val baseUrl: String) : Par
override fun chapterListSelector() = throw UnsupportedOperationException("Not used") override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
override fun chapterFromElement(element: Element) = throw UnsupportedOperationException("Not used") override fun chapterFromElement(element: Element) = throw UnsupportedOperationException("Not used")
protected open val pageListSelector = "div.wp-content p > img" protected open val pageListSelector = "div.wp-content p > img:not(noscript img)"
override fun pageListParse(document: Document): List<Page> = document.select(pageListSelector) override fun pageListParse(document: Document): List<Page> = document.select(pageListSelector)
.mapIndexed { i, img -> Page(i, "", img.attr("abs:src")) } .mapIndexed { i, img -> Page(i, "", img.attr("abs:data-src")) }
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used") override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")