[ExHentai] Fix tags parsing

This commit is contained in:
2024-08-01 21:18:55 +03:00
parent a9fc534ea7
commit 853c21e49f
2 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ dependencies {
implementation 'com.squareup.okio:okio:3.9.0'
api 'org.jsoup:jsoup:1.18.1'
implementation 'org.json:json:20240303'
implementation 'androidx.collection:collection:1.4.1'
implementation 'androidx.collection:collection:1.4.2'
ksp project(':kotatsu-parsers-ksp')

View File

@@ -279,8 +279,8 @@ internal class ExHentaiParser(
val doc = webClient.httpGet("https://${domain}").parseHtml()
val root = doc.body().requireElementById("searchbox").selectFirstOrThrow("table")
root.select("div.cs").mapNotNullToSet { div ->
val id = div.id().substringAfterLast('_').toIntOrNull() ?: return@mapNotNullToSet null
root.select("div.cs").forEach { div ->
val id = div.id().substringAfterLast('_').toIntOrNull() ?: return@forEach
val name = div.text().toTitleCase(Locale.ENGLISH)
tagMap[name] = MangaTag(
title = "Kind: $name",