NineManga: Fix wrong pages (#2545)

* Fix images

* Stop changing the url
This commit is contained in:
bapeey 2024-04-25 10:47:37 -05:00 committed by Draff
parent dc3135aede
commit 88783a5221
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,11 @@
ext {
extName = 'NineManga'
extClass = '.NineMangaFactory'
extVersionCode = 19
extVersionCode = 20
}
apply from: "$rootDir/common.gradle"
dependencies {
implementation(project(":lib:cookieinterceptor"))
}

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.extension.all.ninemanga
import eu.kanade.tachiyomi.lib.cookieinterceptor.CookieInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
@ -26,6 +27,8 @@ open class NineManga(
override val supportsLatest: Boolean = true
private val cookieInterceptor = CookieInterceptor(baseUrl.substringAfter("://"), "ninemanga_list_num" to "1")
override val client: OkHttpClient = network.client.newBuilder()
.addInterceptor { chain ->
val request = chain.request()
@ -37,7 +40,9 @@ open class NineManga(
return@addInterceptor chain.proceed(newRequest)
}
chain.proceed(request)
}.build()
}
.addNetworkInterceptor(cookieInterceptor)
.build()
override fun headersBuilder(): Headers.Builder = Headers.Builder()
.add("Accept-Language", "es-ES,es;q=0.9,en;q=0.8,gl;q=0.7")
@ -97,7 +102,6 @@ open class NineManga(
element.select("a.chapter_list_a").let {
name = it.text().replace(mangaTitleForCleaning, "", true)
url = it.attr("href").substringAfter(baseUrl).replace("%20", " ")
.substringBeforeLast(".html") + "-1-1.html"
}
date_upload = parseChapterDate(element.select("span").text())
}