parent
93d6a9b328
commit
4ede181f9d
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Mangago'
|
||||
extClass = '.Mangago'
|
||||
extVersionCode = 14
|
||||
extVersionCode = 15
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,10 @@ class Mangago : ParsedHttpSource() {
|
|||
override val client = network.cloudflareClient.newBuilder()
|
||||
.rateLimit(1, 2)
|
||||
.addInterceptor { chain ->
|
||||
val response = chain.proceed(chain.request())
|
||||
val request = chain.request()
|
||||
val response = chain.proceed(request)
|
||||
|
||||
val fragment = response.request.url.fragment ?: return@addInterceptor response
|
||||
val fragment = request.url.fragment ?: return@addInterceptor response
|
||||
|
||||
// desckey=...&cols=...
|
||||
val key = fragment.substringAfter("desckey=").substringBefore("&")
|
||||
|
@ -226,9 +227,7 @@ class Mangago : ParsedHttpSource() {
|
|||
// This usually means that the list is already unscrambled.
|
||||
}
|
||||
|
||||
val cols = deobfChapterJs
|
||||
.substringAfter("var widthnum=heightnum=")
|
||||
.substringBefore(";")
|
||||
val cols = colsRegex.find(deobfChapterJs)?.groupValues?.get(1) ?: ""
|
||||
|
||||
return imageList
|
||||
.split(",")
|
||||
|
@ -458,6 +457,9 @@ class Mangago : ParsedHttpSource() {
|
|||
Regex("""var imgsrcs\s*=\s*['"]([a-zA-Z0-9+=/]+)['"]""")
|
||||
}
|
||||
|
||||
private val colsRegex =
|
||||
Regex("""var\s*widthnum\s*=\s*heightnum\s*=\s*(\d+);""")
|
||||
|
||||
private val replacePosBytecode by lazy {
|
||||
QuickJs.create().use {
|
||||
it.compile(
|
||||
|
|
Loading…
Reference in New Issue