fix(en/hstream): Fix search (#3229)

This commit is contained in:
kaoru2 2024-05-12 16:48:25 +08:00 committed by GitHub
parent 7dc9a5a6e3
commit a1b00449bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Hstream'
extClass = '.Hstream'
extVersionCode = 7
extVersionCode = 8
isNsfw = true
}

View File

@ -101,7 +101,7 @@ class Hstream : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
if (query.isNotBlank()) addQueryParameter("s", query)
addQueryParameter("page", page.toString())
addQueryParameter("order", params.order)
params.genres.forEach { addQueryParameter("tags[]", it) }
params.genres.forEachIndexed { index, genre -> addQueryParameter("tags[$index]", genre) }
params.blacklisted.forEach { addQueryParameter("blacklist[]", it) }
params.studios.forEach { addQueryParameter("studios[]", it) }
}.build()
@ -119,9 +119,9 @@ class Hstream : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override fun animeDetailsParse(document: Document) = SAnime.create().apply {
status = SAnime.COMPLETED
val floatleft = document.selectFirst("div.relative > div.float-left > div")!!
title = floatleft.selectFirst("h1")!!.text()
artist = floatleft.selectFirst("h2 > a")?.text()
val floatleft = document.selectFirst("div.relative > div.justify-between > div")!!
title = floatleft.selectFirst("div > h1")!!.text()
artist = floatleft.select("div > a:nth-of-type(3)").text()
thumbnail_url = document.selectFirst("div.float-left > img.object-cover")?.absUrl("src")
genre = document.select("ul.list-none > li > a").eachText().joinToString()