MangaBox - fix Mangakakalots pages (#3657)

This commit is contained in:
Mike 2020-07-01 03:16:32 -04:00 committed by GitHub
parent 38ea4926c8
commit e64df144a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View File

@ -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'
} }

View File

@ -234,7 +234,10 @@ 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)
// filter out bad elements for mangakakalots
.filterNot { it.attr("src").endsWith("log") }
.mapIndexed { i, element ->
val url = element.attr("abs:src").let { src -> val url = element.attr("abs:src").let { src ->
if (src.startsWith("https://convert_image_digi.mgicdn.com")) { if (src.startsWith("https://convert_image_digi.mgicdn.com")) {
"https://images.weserv.nl/?url=" + src.substringAfter("//") "https://images.weserv.nl/?url=" + src.substringAfter("//")