Fix chapter images not loading at OPEX. (#7652)
This commit is contained in:
parent
b49b58613f
commit
69d6b63496
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'One Piece Ex'
|
extName = 'One Piece Ex'
|
||||||
pkgNameSuffix = 'pt.opex'
|
pkgNameSuffix = 'pt.opex'
|
||||||
extClass = '.OnePieceEx'
|
extClass = '.OnePieceEx'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,11 +193,9 @@ class OnePieceEx : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("script:containsData(paginasLista)").first()!!
|
return document.select("script:containsData(paginasLista)").first()!!
|
||||||
.data()
|
.data()
|
||||||
.substringAfter("paginasLista = \"")
|
.substringAfter("paginasLista = ")
|
||||||
.substringBefore("\";")
|
.substringBefore(";")
|
||||||
.replace("\\\"", "\"")
|
.let { json.parseToJsonElement(it).jsonPrimitive.content }
|
||||||
.replace("\\\\\\/", "/")
|
|
||||||
.replace("//", "/")
|
|
||||||
.let { json.parseToJsonElement(it).jsonObject.entries }
|
.let { json.parseToJsonElement(it).jsonObject.entries }
|
||||||
.mapIndexed { i, entry ->
|
.mapIndexed { i, entry ->
|
||||||
Page(i, document.location(), "$baseUrl/${entry.value.jsonPrimitive.content}")
|
Page(i, document.location(), "$baseUrl/${entry.value.jsonPrimitive.content}")
|
||||||
|
|
Loading…
Reference in New Issue