Keyoapp: filter dummy pages (#3081)
This commit is contained in:
parent
b1c691394c
commit
6c5462309d
|
@ -2,4 +2,4 @@ plugins {
|
|||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 3
|
||||
baseVersionCode = 4
|
||||
|
|
|
@ -223,11 +223,16 @@ abstract class Keyoapp(
|
|||
// Image list
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return document.select("#pages > img:not(.hidden)").mapIndexed { index, img ->
|
||||
Page(index, document.location(), img.imgAttr())
|
||||
}
|
||||
return document.select("#pages > img")
|
||||
.map { it.imgAttr() }
|
||||
.filter { it.contains(imgCdnRegex) }
|
||||
.mapIndexed { index, img ->
|
||||
Page(index, document.location(), img)
|
||||
}
|
||||
}
|
||||
|
||||
private val imgCdnRegex = Regex("""^(https?:)?//cdn\d*\.keyoapp\.com""")
|
||||
|
||||
override fun imageUrlParse(document: Document) = ""
|
||||
|
||||
// Utilities
|
||||
|
|
Loading…
Reference in New Issue