[ExHentai] Fix tags parsing

master
Koitharu 2 years ago
parent a9fc534ea7
commit 853c21e49f
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -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')

@ -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",

Loading…
Cancel
Save