[WPMangaReader, WPMangaStream] Prevent pages that don't have abs:src from being added to the page list (#7940)

In a few cases, 'src' would be a literal SVG rather than a URL to the page's image, which would work fine with 'src' but show up as an empty string for 'abs:src'
This commit is contained in:
FlaminSarge 2021-07-02 05:16:21 -07:00 committed by GitHub
parent 774b0a3de4
commit bc1bd6e09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ class KomikStation : WPMangaStream("Komik Station", "https://komikstation.com",
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
document.select(pageSelector)
.filterNot { it.attr("src").isNullOrEmpty() }
.filterNot { it.attr("abs:src").isNullOrEmpty() }
.mapIndexed { i, img -> pages.add(Page(i, "", img.attr("abs:src"))) }
// Some sites like mangakita now load pages via javascript

View File

@ -240,7 +240,7 @@ abstract class WPMangaReader(
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
document.select(pageSelector)
.filterNot { it.attr("src").isNullOrEmpty() }
.filterNot { it.attr("abs:src").isNullOrEmpty() }
.mapIndexed { i, img -> pages.add(Page(i, "", img.attr("abs:src"))) }
// Some sites like mangakita now load pages via javascript

View File

@ -9,7 +9,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
override val themeClass = "WPMangaReader"
override val baseVersionCode: Int = 7
override val baseVersionCode: Int = 8
override val sources = listOf(
SingleLang("Kiryuu", "https://kiryuu.id", "id", overrideVersionCode = 1),

View File

@ -275,7 +275,7 @@ abstract class WPMangaStream(
override fun pageListParse(document: Document): List<Page> {
val htmlPages = document.select(pageSelector)
.filterNot { it.attr("src").isNullOrEmpty() }
.filterNot { it.attr("abs:src").isNullOrEmpty() }
.mapIndexed { i, img -> Page(i, "", img.attr("abs:src")) }
.toMutableList()

View File

@ -9,7 +9,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
override val themeClass = "WPMangaStream"
override val baseVersionCode: Int = 6
override val baseVersionCode: Int = 7
override val sources = listOf(
SingleLang("Asura Scans", "https://www.asurascans.com", "en", overrideVersionCode = 1),