Webtoons.com: update selectors (#15221)
* Webtoons: update selectors * actually fix popular selector
This commit is contained in:
parent
044762ceb0
commit
560f55cfce
|
@ -113,7 +113,7 @@ open class Webtoons(
|
||||||
var maxChild = 0
|
var maxChild = 0
|
||||||
|
|
||||||
// For ongoing webtoons rows are ordered by descending popularity, count how many rows there are
|
// 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 ->
|
day.select("li").count().let { rowCount ->
|
||||||
if (rowCount > maxChild) maxChild = rowCount
|
if (rowCount > maxChild) maxChild = rowCount
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ open class Webtoons(
|
||||||
|
|
||||||
// Process each row
|
// Process each row
|
||||||
for (i in 1..maxChild) {
|
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
|
// Add completed webtoons, no sorting needed
|
||||||
|
@ -186,7 +186,7 @@ open class Webtoons(
|
||||||
return GET(url.toString(), headers)
|
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)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class WebtoonsGenerator : ThemeSourceGenerator {
|
||||||
override val baseVersionCode: Int = 2
|
override val baseVersionCode: Int = 2
|
||||||
|
|
||||||
override val sources = listOf(
|
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")
|
SingleLang("Dongman Manhua", "https://www.dongmanmanhua.cn", "zh")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue