XOXO Comics: escape search, add headers (#8651)

This commit is contained in:
Vetle Ledaal 2025-04-27 04:08:59 +02:00 committed by Draff
parent 0bf5c08f50
commit 19543c9bba
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 8 additions and 3 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.XoxoComics'
themePkg = 'wpcomics'
baseUrl = 'https://xoxocomic.com'
overrideVersionCode = 4
overrideVersionCode = 5
isNsfw = false
}

View File

@ -61,7 +61,12 @@ class XoxoComics : WPComics(
val filterList = filters.let { if (it.isEmpty()) getFilterList() else it }
return if (query.isNotEmpty() || filterList.isEmpty()) {
// Search won't work together with filter
return GET("$baseUrl/$searchPath?keyword=$query&page=$page", headers)
val url = baseUrl.toHttpUrl().newBuilder()
.addPathSegment(searchPath)
.addQueryParameter("keyword", query)
.addQueryParameter("page", page.toString())
.build()
return GET(url, headers)
} else {
val url = baseUrl.toHttpUrl().newBuilder()
@ -109,7 +114,7 @@ class XoxoComics : WPComics(
}
}
override fun pageListRequest(chapter: SChapter): Request = GET(baseUrl + "${chapter.url}/all")
override fun pageListRequest(chapter: SChapter): Request = GET(baseUrl + "${chapter.url}/all", headers)
override fun genresRequest() = GET("$baseUrl/comic-list", headers)