diff --git a/src/en/mangatown/build.gradle b/src/en/mangatown/build.gradle index 3ba2c307e..d402a9084 100644 --- a/src/en/mangatown/build.gradle +++ b/src/en/mangatown/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Mangatown' extClass = '.Mangatown' - extVersionCode = 6 + extVersionCode = 7 } apply from: "$rootDir/common.gradle" diff --git a/src/en/mangatown/src/eu/kanade/tachiyomi/extension/en/mangatown/Mangatown.kt b/src/en/mangatown/src/eu/kanade/tachiyomi/extension/en/mangatown/Mangatown.kt index 426f33ac9..fe31912fa 100644 --- a/src/en/mangatown/src/eu/kanade/tachiyomi/extension/en/mangatown/Mangatown.kt +++ b/src/en/mangatown/src/eu/kanade/tachiyomi/extension/en/mangatown/Mangatown.kt @@ -122,9 +122,18 @@ class Mangatown : ParsedHttpSource() { } } + // check for paged first, then try longstrip override fun pageListParse(document: Document): List { - return document.select("select#top_chapter_list ~ div.page_select option:not(:contains(featured))").mapIndexed { i, element -> - Page(i, element.attr("value").substringAfter("com")) + return document.select("select#top_chapter_list ~ div.page_select option:not(:contains(featured))").let { elements -> + 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")) + } + } } }