WestManga: fix error 404 (#10214)

This commit is contained in:
Luqman 2025-08-22 02:21:03 +07:00 committed by Draff
parent 89beec2f78
commit d62b06989b
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'West Manga' extName = 'West Manga'
extClass = '.WestManga' extClass = '.WestManga'
extVersionCode = 37 extVersionCode = 38
isNsfw = true isNsfw = true
} }

View File

@ -19,6 +19,7 @@ import javax.crypto.spec.SecretKeySpec
class WestManga : HttpSource() { class WestManga : HttpSource() {
override val name = "West Manga" override val name = "West Manga"
override val baseUrl = "https://westmanga.me" override val baseUrl = "https://westmanga.me"
private val apiUrl = "https://data.westmanga.me"
override val lang = "id" override val lang = "id"
override val id = 8883916630998758688 override val id = 8883916630998758688
override val supportsLatest = true override val supportsLatest = true
@ -41,7 +42,7 @@ class WestManga : HttpSource() {
searchMangaParse(response) searchMangaParse(response)
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val url = baseUrl.toHttpUrl().newBuilder().apply { val url = apiUrl.toHttpUrl().newBuilder().apply {
addPathSegment("api") addPathSegment("api")
addPathSegment("contents") addPathSegment("contents")
if (query.isNotBlank()) { if (query.isNotBlank()) {
@ -94,7 +95,7 @@ class WestManga : HttpSource() {
assert(path.size == 3) { "Migrate from $name to $name" } assert(path.size == 3) { "Migrate from $name to $name" }
val slug = path[1] val slug = path[1]
val url = baseUrl.toHttpUrl().newBuilder() val url = apiUrl.toHttpUrl().newBuilder()
.addPathSegment("api") .addPathSegment("api")
.addPathSegment("comic") .addPathSegment("comic")
.addPathSegment(slug) .addPathSegment(slug)
@ -185,7 +186,7 @@ class WestManga : HttpSource() {
assert(path.size == 2) { "Refresh Chapter List" } assert(path.size == 2) { "Refresh Chapter List" }
val slug = path[0] val slug = path[0]
val url = baseUrl.toHttpUrl().newBuilder() val url = apiUrl.toHttpUrl().newBuilder()
.addPathSegment("api") .addPathSegment("api")
.addPathSegment("v") .addPathSegment("v")
.addPathSegment(slug) .addPathSegment(slug)