Fix sources after Jsoup update

This commit is contained in:
Jobobby04 2022-08-29 18:13:12 -04:00
parent 65f6e14a46
commit 2784794634
3 changed files with 5 additions and 5 deletions

View File

@ -130,9 +130,9 @@ class EHentai(
private fun extendedGenericMangaParse(doc: Document) = with(doc) {
// Parse mangas (supports compact + extended layout)
val parsedMangas = select(".itg > tbody > tr").filter {
val parsedMangas = select(".itg > tbody > tr").filter { element ->
// Do not parse header and ads
it.selectFirst("th") == null && it.selectFirst(".itd") == null
element.selectFirst("th") == null && element.selectFirst(".itd") == null
}.map { body ->
val thumbnailElement = body.selectFirst(".gl1e img, .gl2c .glthumb img")!!
val column2 = body.selectFirst(".gl3e, .gl2c")!!

View File

@ -47,8 +47,8 @@ class EightMuses(delegate: HttpSource, val context: Context) :
val gc = doc.select(".gallery .c-tile")
// Check if any in self
val selfAlbums = gc.filter { it.attr("href").startsWith("/comics/album") }
val selfImages = gc.filter { it.attr("href").startsWith("/comics/picture") }
val selfAlbums = gc.filter { element -> element.attr("href").startsWith("/comics/album") }
val selfImages = gc.filter { element -> element.attr("href").startsWith("/comics/picture") }
return SelfContents(selfAlbums, selfImages)
}

View File

@ -69,7 +69,7 @@ class HBrowse(delegate: HttpSource, val context: Context) :
return doc.select("#main > .listTable").associate { ele ->
val tableName = ele.previousElementSibling()?.text()?.lowercase().orEmpty()
tableName to ele.select("tr")
.filter { it.childrenSize() > 1 }
.filter { element -> element.childrenSize() > 1 }
.associate {
it.child(0).text() to it.child(1)
}