Updated parsing of manga title from URL.
This commit is contained in:
parent
f5395f23bb
commit
92b38ac042
@ -6,7 +6,7 @@ ext {
|
||||
extName = 'Madokami'
|
||||
pkgNameSuffix = 'en.madokami'
|
||||
extClass = '.Madokami'
|
||||
extVersionCode = 7
|
||||
extVersionCode = 8
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -67,7 +67,9 @@ class Madokami : ConfigurableSource, ParsedHttpSource() {
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
manga.url = element.attr("href")
|
||||
manga.title = URLDecoder.decode(element.attr("href").split("/").last(), "UTF-8").trimStart('!')
|
||||
val pathSegments = element.attr("href").split("/")
|
||||
var i = pathSegments.size
|
||||
do { i--; manga.title = URLDecoder.decode(pathSegments[i], "UTF-8") } while (URLDecoder.decode(pathSegments[i], "UTF-8").startsWith("!"))
|
||||
return manga
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user