From 560f55cfce7cf15a3c486cfa510beba5342947dd Mon Sep 17 00:00:00 2001 From: mobi2002 <48650614+mobi2002@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:25:21 +0500 Subject: [PATCH] Webtoons.com: update selectors (#15221) * Webtoons: update selectors * actually fix popular selector --- .../java/eu/kanade/tachiyomi/multisrc/webtoons/Webtoons.kt | 6 +++--- .../kanade/tachiyomi/multisrc/webtoons/WebtoonsGenerator.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/Webtoons.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/Webtoons.kt index 07adc7162..9618f55e5 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/Webtoons.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/Webtoons.kt @@ -113,7 +113,7 @@ open class Webtoons( var maxChild = 0 // For ongoing webtoons rows are ordered by descending popularity, count how many rows there are - document.select("div#dailyList > div").forEach { day -> + document.select("div#dailyList .daily_section").forEach { day -> day.select("li").count().let { rowCount -> if (rowCount > maxChild) maxChild = rowCount } @@ -121,7 +121,7 @@ open class Webtoons( // Process each row for (i in 1..maxChild) { - document.select("div#dailyList > div li:nth-child($i) a").map { mangas.add(popularMangaFromElement(it)) } + document.select("div#dailyList .daily_section li:nth-child($i) a").map { mangas.add(popularMangaFromElement(it)) } } // Add completed webtoons, no sorting needed @@ -186,7 +186,7 @@ open class Webtoons( return GET(url.toString(), headers) } - override fun searchMangaSelector() = "#content > div.card_wrap.search li a" + override fun searchMangaSelector() = "#content > div.card_wrap.search ul:not(#filterLayer) li a" override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/WebtoonsGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/WebtoonsGenerator.kt index dc32fd3cb..ca8bdf1cd 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/WebtoonsGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/webtoons/WebtoonsGenerator.kt @@ -13,7 +13,7 @@ class WebtoonsGenerator : ThemeSourceGenerator { override val baseVersionCode: Int = 2 override val sources = listOf( - MultiLang("Webtoons.com", "https://www.webtoons.com", listOf("en", "fr", "es", "id", "th", "zh-Hant", "de"), className = "WebtoonsFactory", pkgName = "webtoons", overrideVersionCode = 36), + MultiLang("Webtoons.com", "https://www.webtoons.com", listOf("en", "fr", "es", "id", "th", "zh-Hant", "de"), className = "WebtoonsFactory", pkgName = "webtoons", overrideVersionCode = 37), SingleLang("Dongman Manhua", "https://www.dongmanmanhua.cn", "zh") )