Fix MangaRead parse #87
This commit is contained in:
@@ -13,8 +13,8 @@ android {
|
|||||||
applicationId 'org.koitharu.kotatsu'
|
applicationId 'org.koitharu.kotatsu'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 31
|
targetSdkVersion 31
|
||||||
versionCode 378
|
versionCode 379
|
||||||
versionName '2.1.2'
|
versionName '2.1.3'
|
||||||
generatedDensities = []
|
generatedDensities = []
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -151,8 +151,10 @@ class MangareadRepository(
|
|||||||
?.selectFirst("div.reading-content")
|
?.selectFirst("div.reading-content")
|
||||||
?: throw ParseException("Root not found")
|
?: throw ParseException("Root not found")
|
||||||
return root.select("div.page-break").map { div ->
|
return root.select("div.page-break").map { div ->
|
||||||
val img = div.selectFirst("img")
|
val img = div.selectFirst("img") ?: parseFailed("Page image not found")
|
||||||
val url = img?.relUrl("src") ?: parseFailed("Page image not found")
|
val url = img.relUrl("data-src").ifEmpty {
|
||||||
|
img.relUrl("src")
|
||||||
|
}
|
||||||
MangaPage(
|
MangaPage(
|
||||||
id = generateUid(url),
|
id = generateUid(url),
|
||||||
url = url,
|
url = url,
|
||||||
|
|||||||
Reference in New Issue
Block a user