Keyoapp: filter dummy pages (#3081)
This commit is contained in:
parent
b1c691394c
commit
6c5462309d
|
@ -2,4 +2,4 @@ plugins {
|
||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 3
|
baseVersionCode = 4
|
||||||
|
|
|
@ -223,11 +223,16 @@ abstract class Keyoapp(
|
||||||
// Image list
|
// Image list
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("#pages > img:not(.hidden)").mapIndexed { index, img ->
|
return document.select("#pages > img")
|
||||||
Page(index, document.location(), img.imgAttr())
|
.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) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
|
|
Loading…
Reference in New Issue