Webtoons.com: update selectors (#15221)

* Webtoons: update selectors

* actually fix popular selector
This commit is contained in:
mobi2002 2023-02-03 23:25:21 +05:00 committed by GitHub
parent 044762ceb0
commit 560f55cfce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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")
)