MangaCatalog: Updated page parsing to exclude ads (#10131)

This commit is contained in:
Troy121 2021-12-19 13:05:58 +01:00 committed by GitHub
parent 2cb8aad759
commit 96a82c1673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -101,11 +101,10 @@ abstract class MangaCatalog(
// Pages
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
document.select(".text-center img,.img_container img").forEach { img ->
add(Page(size, "", img.attr("src")))
override fun pageListParse(document: Document): List<Page> =
document.select(".js-pages-container img.js-page,.img_container img").mapIndexed { index, img ->
Page(index, "", img.attr("src"))
}
}
override fun imageUrlParse(document: Document): String = throw Exception("Not Used")
}

View File

@ -9,7 +9,7 @@ class MangaCatalogGenerator : ThemeSourceGenerator {
override val themeClass = "MangaCatalog"
override val baseVersionCode: Int = 2
override val baseVersionCode: Int = 3
override val sources = listOf(
SingleLang("Read Boku no Hero Academia My Hero Academia Manga", "https://ww6.readmha.com", "en", className = "ReadBokuNoHeroAcademiaMyHeroAcademiaManga", overrideVersionCode = 2),