From 26519c71a63b7d3706b870c8216665a628539287 Mon Sep 17 00:00:00 2001 From: Naga <94557604+NagaYZ@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:44:40 +0200 Subject: [PATCH] fix #852 --- .../org/koitharu/kotatsu/parsers/site/it/MangaWorld.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/it/MangaWorld.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/it/MangaWorld.kt index 4af96e61..12fe02b9 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/it/MangaWorld.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/it/MangaWorld.kt @@ -132,7 +132,10 @@ internal class MangaWorld( override suspend fun getPages(chapter: MangaChapter): List { val doc = webClient.httpGet(chapter.url.toAbsoluteUrl(domain)).parseHtml() - return doc.select("img.page-image").map { img -> + val selectWebtoonPages = "img.page-image" + val selectMangaPages = "#page .img-fluid" + val imgSelector = if (doc.select(selectWebtoonPages).isNotEmpty()) selectWebtoonPages else selectMangaPages + return doc.select(imgSelector).map { img -> val urlPage = img.src()?.toRelativeUrl(domain) ?: img.parseFailed("Image src not found") MangaPage( id = generateUid(urlPage),