[Madara] Fix multiple pages handling

Koitharu 2 years ago
parent 5c55d65eb3
commit ce9404da84
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -678,8 +678,8 @@ internal abstract class MadaraParser(
"No image found, try to log in",
fullUrl,
)
return root.select(selectPage).map { div ->
val img = div.selectFirstOrThrow("img")
return root.select(selectPage).flatMap { div ->
div.selectOrThrow("img").map { img ->
val url = img.src()?.toRelativeUrl(domain) ?: div.parseFailed("Image src not found")
MangaPage(
id = generateUid(url),
@ -689,6 +689,7 @@ internal abstract class MadaraParser(
)
}
}
}
} else {
val chapterProtectorHtml = chapterProtector.attr("src")

Loading…
Cancel
Save