Mangatown - longstrip parsing (#721)
This commit is contained in:
parent
cf9f358af1
commit
9ca3646702
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Mangatown'
|
extName = 'Mangatown'
|
||||||
extClass = '.Mangatown'
|
extClass = '.Mangatown'
|
||||||
extVersionCode = 6
|
extVersionCode = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -122,9 +122,18 @@ class Mangatown : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for paged first, then try longstrip
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("select#top_chapter_list ~ div.page_select option:not(:contains(featured))").mapIndexed { i, element ->
|
return document.select("select#top_chapter_list ~ div.page_select option:not(:contains(featured))").let { elements ->
|
||||||
Page(i, element.attr("value").substringAfter("com"))
|
if (elements.isNotEmpty()) {
|
||||||
|
elements.mapIndexed { i, e ->
|
||||||
|
Page(i, e.attr("value").substringAfter("com"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
document.select("#viewer .image").mapIndexed { i, e ->
|
||||||
|
Page(i, "", e.attr("abs:src"))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue