[DocTruyen5s] Small fixes

Draken 1 year ago committed by GitHub
parent 8e9da4e39f
commit 738e2649d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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://")

Loading…
Cancel
Save