Merge pull request #883 from NagaYZ/fix-mangaworld

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

@ -142,7 +142,7 @@ abstract class MangaWorldParser(
name = a.selectFirstOrThrow("span.d-inline-block").text(), name = a.selectFirstOrThrow("span.d-inline-block").text(),
number = i + 1f, number = i + 1f,
volume = 0, volume = 0,
url = url, url = "$url?style=list",
scanlator = null, scanlator = null,
uploadDate = uploadDate =
SimpleDateFormat("dd MMMM yyyy", Locale.ITALIAN).tryParse( SimpleDateFormat("dd MMMM yyyy", Locale.ITALIAN).tryParse(
@ -158,7 +158,7 @@ abstract class MangaWorldParser(
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()
val selectWebtoonPages = "img.page-image" val selectWebtoonPages = "img.page-image"
val selectMangaPages = "#page .img-fluid" val selectMangaPages = "img.img-fluid"
val imgSelector = if (doc.select(selectWebtoonPages).isNotEmpty()) selectWebtoonPages else selectMangaPages val imgSelector = if (doc.select(selectWebtoonPages).isNotEmpty()) selectWebtoonPages else selectMangaPages
return doc.select(imgSelector).map { img -> 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")

Loading…
Cancel
Save