Merge pull request #853 from NagaYZ/fix-mangaworld

master
Koitharu 2 years ago committed by GitHub
commit e8733f15e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -132,7 +132,10 @@ internal class MangaWorld(
override suspend fun getPages(chapter: MangaChapter): List<MangaPage> { override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
val doc = webClient.httpGet(chapter.url.toAbsoluteUrl(domain)).parseHtml() 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") val urlPage = img.src()?.toRelativeUrl(domain) ?: img.parseFailed("Image src not found")
MangaPage( MangaPage(
id = generateUid(urlPage), id = generateUid(urlPage),

Loading…
Cancel
Save