Fix Temple Scan (#10148)
This commit is contained in:
parent
4bafe8c57e
commit
28232ab96a
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Temple Scan'
|
extName = 'Temple Scan'
|
||||||
extClass = '.TempleScan'
|
extClass = '.TempleScan'
|
||||||
extVersionCode = 46
|
extVersionCode = 47
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,9 +209,12 @@ class TempleScan : HttpSource(), ConfigurableSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(response: Response): List<Page> {
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
return response.asJsoup().select("img[alt^=chapter]").mapIndexed { idx, img ->
|
return IMAGES_REGEX.find(response.body.string())!!.groupValues[1]
|
||||||
Page(idx, imageUrl = img.absUrl("src"))
|
.unescape()
|
||||||
}
|
.parseAs<List<String>>()
|
||||||
|
.mapIndexed { index, image ->
|
||||||
|
Page(index, imageUrl = image)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||||
@ -240,3 +243,4 @@ class TempleScan : HttpSource(), ConfigurableSource {
|
|||||||
|
|
||||||
private val UNESCAPE_REGEX = """\\(.)""".toRegex()
|
private val UNESCAPE_REGEX = """\\(.)""".toRegex()
|
||||||
private val DETAILS_REGEX = Regex("""info\\":(\{.*\}).*userIsFollowed""")
|
private val DETAILS_REGEX = Regex("""info\\":(\{.*\}).*userIsFollowed""")
|
||||||
|
private val IMAGES_REGEX = Regex("""images\\":(\[.*?]).*""")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user