MangaBox - fix Mangakakalots pages (#3657)
This commit is contained in:
parent
38ea4926c8
commit
e64df144a5
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'MangaBox (Mangakakalot and others)'
|
extName = 'MangaBox (Mangakakalot and others)'
|
||||||
pkgNameSuffix = 'all.mangabox'
|
pkgNameSuffix = 'all.mangabox'
|
||||||
extClass = '.MangaBoxFactory'
|
extClass = '.MangaBoxFactory'
|
||||||
extVersionCode = 23
|
extVersionCode = 24
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,16 +234,19 @@ abstract class MangaBox(
|
||||||
open val pageListSelector = "div#vungdoc img, div.container-chapter-reader img"
|
open val pageListSelector = "div#vungdoc img, div.container-chapter-reader img"
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select(pageListSelector).mapIndexed { i, element ->
|
return document.select(pageListSelector)
|
||||||
val url = element.attr("abs:src").let { src ->
|
// filter out bad elements for mangakakalots
|
||||||
if (src.startsWith("https://convert_image_digi.mgicdn.com")) {
|
.filterNot { it.attr("src").endsWith("log") }
|
||||||
"https://images.weserv.nl/?url=" + src.substringAfter("//")
|
.mapIndexed { i, element ->
|
||||||
} else {
|
val url = element.attr("abs:src").let { src ->
|
||||||
src
|
if (src.startsWith("https://convert_image_digi.mgicdn.com")) {
|
||||||
|
"https://images.weserv.nl/?url=" + src.substringAfter("//")
|
||||||
|
} else {
|
||||||
|
src
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Page(i, document.location(), url)
|
||||||
}
|
}
|
||||||
Page(i, document.location(), url)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageRequest(page: Page): Request {
|
override fun imageRequest(page: Page): Request {
|
||||||
|
|
Loading…
Reference in New Issue