Fix Temple Scan (#10148)

This commit is contained in:
Bartu Özen 2025-08-16 16:18:43 +03:00 committed by Draff
parent 4bafe8c57e
commit 28232ab96a
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Temple Scan'
extClass = '.TempleScan'
extVersionCode = 46
extVersionCode = 47
isNsfw = true
}

View File

@ -209,9 +209,12 @@ class TempleScan : HttpSource(), ConfigurableSource {
}
override fun pageListParse(response: Response): List<Page> {
return response.asJsoup().select("img[alt^=chapter]").mapIndexed { idx, img ->
Page(idx, imageUrl = img.absUrl("src"))
}
return IMAGES_REGEX.find(response.body.string())!!.groupValues[1]
.unescape()
.parseAs<List<String>>()
.mapIndexed { index, image ->
Page(index, imageUrl = image)
}
}
override fun setupPreferenceScreen(screen: PreferenceScreen) {
@ -240,3 +243,4 @@ class TempleScan : HttpSource(), ConfigurableSource {
private val UNESCAPE_REGEX = """\\(.)""".toRegex()
private val DETAILS_REGEX = Regex("""info\\":(\{.*\}).*userIsFollowed""")
private val IMAGES_REGEX = Regex("""images\\":(\[.*?]).*""")