HiveComic: Use API to fix content not found in getListPage

This commit is contained in:
dragonx943
2025-09-21 17:27:06 +07:00
parent de2289eb75
commit d85bb64b1c
3 changed files with 6 additions and 4 deletions

View File

@@ -192,8 +192,8 @@ internal abstract class IkenParser(
val key = it.attrOrNull("value") ?: return@mapNotNullToSet null
MangaTag(
key = key,
title = (it.text() ?: key).toTitleCase(sourceLocale),
source = source,
title = it.text().ifBlank { key }.toTitleCase(sourceLocale),
source = source,
)
}
}
@@ -201,7 +201,7 @@ internal abstract class IkenParser(
protected fun Document.getNextJson(key: String): String {
val scripts = select("script")
val scriptData = scripts.find { script ->
script.data()?.contains(key) == true
script.data().contains(key)
}?.data() ?: throw Exception("Unable to retrieve NEXT data")
val keyIndex = scriptData.indexOf(key)

View File

@@ -9,4 +9,4 @@ import org.koitharu.kotatsu.parsers.Broken
@Broken("Need to fix getPages")
@MangaSourceParser("HIVECOMIC", "HiveComic", "en")
internal class HiveComic(context: MangaLoaderContext) :
IkenParser(context, MangaParserSource.HIVECOMIC, "hivecomic.com", 18)
IkenParser(context, MangaParserSource.HIVECOMIC, "hivetoons.org", 18, true)

View File

@@ -1,10 +1,12 @@
package org.koitharu.kotatsu.parsers.site.mangareader.en
import org.koitharu.kotatsu.parsers.Broken
import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser
@Broken("Moved to HiveComic")
@MangaSourceParser("VOIDSCANS", "HiveToon", "en")
internal class VoidScans(context: MangaLoaderContext) :
MangaReaderParser(context, MangaParserSource.VOIDSCANS, "hivetoon.com", pageSize = 15, searchPageSize = 10)