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

Co-authored-by: Koitharu <nvasya95@gmail.com>
pull/220/head
devi 3 years ago committed by GitHub
parent 18adc66f53
commit 24f7d8b5bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save