From 738e2649d646aba94e962f9abf9cf3ac0ed4f5eb Mon Sep 17 00:00:00 2001 From: Draken <131387159+dragonx943@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:20:50 +0700 Subject: [PATCH] [DocTruyen5s] Small fixes --- .../koitharu/kotatsu/parsers/site/liliana/vi/DocTruyen5s.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/liliana/vi/DocTruyen5s.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/liliana/vi/DocTruyen5s.kt index a5843bfa..61102a34 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/liliana/vi/DocTruyen5s.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/liliana/vi/DocTruyen5s.kt @@ -7,6 +7,7 @@ import org.koitharu.kotatsu.parsers.MangaSourceParser import org.koitharu.kotatsu.parsers.model.MangaChapter import org.koitharu.kotatsu.parsers.model.MangaPage import org.koitharu.kotatsu.parsers.model.MangaParserSource +import org.koitharu.kotatsu.parsers.exception.ParseException import org.koitharu.kotatsu.parsers.site.liliana.LilianaParser import org.koitharu.kotatsu.parsers.util.json.getBooleanOrDefault import org.koitharu.kotatsu.parsers.util.* @@ -26,7 +27,7 @@ internal class DocTruyen5s(context: MangaLoaderContext) : val doc = webClient.httpGet(fullUrl).parseHtml() val script = doc.selectFirstOrThrow("script:containsData(const CHAPTER_ID)").data() val chapterId = script.substringAfter("const CHAPTER_ID = ", "").substringBefore(';', "") - check(chapterId.isNotEmpty()) { "Không thể tìm thấy CHAPTER_ID, hãy kiểm tra nguồn" } + check(chapterId.isNotEmpty()) { ParseException("Không thể tìm thấy CHAPTER_ID, hãy kiểm tra nguồn!", fullUrl) } val ajaxUrl = buildString { append("https://")