Update src/main/kotlin/org/koitharu/kotatsu/parsers/site/fr/LugnicaScans.kt

Co-authored-by: Koitharu <nvasya95@gmail.com>
This commit is contained in:
devi
2023-07-24 08:50:33 +02:00
committed by GitHub
parent 18adc66f53
commit 24f7d8b5bd

View File

@@ -166,7 +166,7 @@ internal class LugnicaScans(context: MangaLoaderContext) : PagedMangaParser(cont
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
val fullUrl = chapter.url.toAbsoluteUrl(domain)
val doc = webClient.httpGet(fullUrl).parseHtml()
val root = doc.body().selectFirst("#forgen_reader")
val root = doc.body().requireElementById("forgen_reader")
?: throw ParseException("Root not found", fullUrl)
return root.select("img").map { img ->
val url = img.attrAsRelativeUrlOrNull("data-src") ?: img.attrAsRelativeUrlOrNull("src")