Fix mangakatana chapters only having 1 page (#13109)
Mangakatana updated their javascript and the chapter images are now in the htnc variable. Fixes #13062
This commit is contained in:
parent
1ad891e202
commit
13880ccdf0
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'MangaKatana'
|
||||
pkgNameSuffix = 'en.mangakatana'
|
||||
extClass = '.MangaKatana'
|
||||
extVersionCode = 6
|
||||
extVersionCode = 7
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -179,7 +179,7 @@ class MangaKatana : ConfigurableSource, ParsedHttpSource() {
|
|||
date_upload = dateFormat.parse(element.select(".update_time").text())?.time ?: 0
|
||||
}
|
||||
|
||||
private val imageArrayRegex = Regex("""var ytaw=\[([^\[]*)]""")
|
||||
private val imageArrayRegex = Regex("""var htnc=\[([^\[]*)]""")
|
||||
private val imageUrlRegex = Regex("""'([^']*)'""")
|
||||
|
||||
// Page List
|
||||
|
@ -190,7 +190,7 @@ class MangaKatana : ConfigurableSource, ParsedHttpSource() {
|
|||
}
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
val imageArray = document.select("script:containsData(var ytaw)").firstOrNull()?.data()
|
||||
val imageArray = document.select("script:containsData(var htnc)").firstOrNull()?.data()
|
||||
?.let { imageArrayRegex.find(it)?.groupValues?.get(1) }
|
||||
?: throw Exception("Image array not found")
|
||||
return imageUrlRegex.findAll(imageArray).asIterable().mapIndexed { i, mr ->
|
||||
|
|
Loading…
Reference in New Issue