Hentai-chan: Fixed chapter name parsing and image links parsing for mangas, that has quotes in the title (#2532)
Hentai-chan small fixes
This commit is contained in:
parent
22b48ab3ca
commit
778c63a412
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: Henchan'
|
||||
pkgNameSuffix = 'ru.henchan'
|
||||
extClass = '.Henchan'
|
||||
extVersionCode = 14
|
||||
extVersionCode = 15
|
||||
libVersion = '1.2'
|
||||
}
|
||||
dependencies {
|
||||
|
|
|
@ -165,7 +165,10 @@ class Henchan : ParsedHttpSource() {
|
|||
if (document.select("#right > div:nth-child(4)").text().contains(" похожий на ")) {
|
||||
val chap = SChapter.create()
|
||||
chap.setUrlWithoutDomain(document.select("#left > div > a").attr("href"))
|
||||
chap.name = document.select("#right > div:nth-child(4)").text().split(" похожий на ")[1]
|
||||
chap.name = document.select("#right > div:nth-child(4)").text()
|
||||
.split(" похожий на ")[1]
|
||||
.replace("\\\"", "\"")
|
||||
.replace("\\'", "'")
|
||||
chap.chapter_number = 1F
|
||||
chap.date_upload = Date().time //setting to current date because of a sorting in the "Recent updates" section
|
||||
return listOf(chap)
|
||||
|
@ -219,7 +222,7 @@ class Henchan : ParsedHttpSource() {
|
|||
|
||||
private fun Document.parseJsonArray(): JsonArray {
|
||||
val imgScript = this.select("script:containsData(fullimg)").first().toString()
|
||||
val imgString = imgScript.substring(imgScript.indexOf('{'), imgScript.lastIndexOf('}') + 1)
|
||||
val imgString = imgScript.substring(imgScript.indexOf('{'), imgScript.lastIndexOf('}') + 1).replace(""", "\"")
|
||||
return gson.fromJson<JsonObject>(imgString)["fullimg"].array
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue