diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ExHentaiParser.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ExHentaiParser.kt index 62190c0f..286372bc 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ExHentaiParser.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ExHentaiParser.kt @@ -105,7 +105,7 @@ internal class ExHentaiParser( return getListPage(page, query, tags, sortOrder) } updateDm = false - nextPages[page + 1] = getNextTimestamp(root) + nextPages[page + 1] = getNextTimestamp(body) return root.children().mapNotNull { tr -> if (tr.childrenSize() != 2) return@mapNotNull null val (td1, td2) = tr.children() diff --git a/src/test/kotlin/org/koitharu/kotatsu/parsers/MangaParserTest.kt b/src/test/kotlin/org/koitharu/kotatsu/parsers/MangaParserTest.kt index ea1f85eb..4abd1506 100644 --- a/src/test/kotlin/org/koitharu/kotatsu/parsers/MangaParserTest.kt +++ b/src/test/kotlin/org/koitharu/kotatsu/parsers/MangaParserTest.kt @@ -36,6 +36,8 @@ internal class MangaParserTest { val parser = source.newParser(context) val page1 = parser.getList(0, sortOrder = null, tags = null) val page2 = parser.getList(page1.size, sortOrder = null, tags = null) + assert(page1.isNotEmpty()) { "Page 1 is empty" } + assert(page2.isNotEmpty()) { "Page 2 is empty" } val intersection = page1.intersect(page2.toSet()) assert(intersection.isEmpty()) { "Pages are intersected by " + intersection.size