6Manhua: Update mirrors url and fix image not loading (#19114)

This commit is contained in:
anenasa 2023-12-02 23:42:43 +08:00 committed by GitHub
parent 558828b750
commit 71f716526e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = '6Manhua / Qixi Manhua'
pkgNameSuffix = 'zh.sixmh'
extClass = '.SixMH'
extVersionCode = 8
extVersionCode = 9
}
apply from: "$rootDir/common.gradle"

View File

@ -182,6 +182,7 @@ class SixMH : HttpSource(), ConfigurableSource {
override fun pageListParse(response: Response): List<Page> {
val result = Unpacker.unpack(response.body.string(), "[", "]")
.ifEmpty { return emptyList() }
.replace("\\u0026", "&")
.replace("\\", "")
.removeSurrounding("\"").split("\",\"")
return result.mapIndexed { i, url -> Page(i, imageUrl = url) }
@ -213,7 +214,7 @@ class SixMH : HttpSource(), ConfigurableSource {
const val MIRROR_PREF = "MIRROR"
/** Note: mirror index affects [chapterListParse] */
val MIRRORS get() = arrayOf("6mh67.com", "qiximh3.com")
val MIRRORS get() = arrayOf("sixmanhua.com", "qiximh3.com")
val MIRROR_NAMES get() = arrayOf("6漫画", "七夕漫画")
private val dateFormat by lazy { SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH) }