Update 'UM' selectors. (#6623)
This commit is contained in:
parent
d87741688a
commit
87cfe3f5b1
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Union Mangás'
|
extName = 'Union Mangás'
|
||||||
pkgNameSuffix = 'pt.unionmangas'
|
pkgNameSuffix = 'pt.unionmangas'
|
||||||
extClass = '.UnionMangas'
|
extClass = '.UnionMangas'
|
||||||
extVersionCode = 20
|
extVersionCode = 21
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
.connectTimeout(3, TimeUnit.MINUTES)
|
.connectTimeout(3, TimeUnit.MINUTES)
|
||||||
.readTimeout(3, TimeUnit.MINUTES)
|
.readTimeout(3, TimeUnit.MINUTES)
|
||||||
.writeTimeout(3, TimeUnit.MINUTES)
|
.writeTimeout(3, TimeUnit.MINUTES)
|
||||||
.addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS))
|
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
||||||
|
@ -62,7 +62,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
return GET("$baseUrl/lista-mangas/visualizacoes$pageStr", newHeaders)
|
return GET("$baseUrl/lista-mangas/visualizacoes$pageStr", newHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun popularMangaSelector(): String = "div.bloco-manga"
|
override fun popularMangaSelector(): String = "div.lista-mangas"
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
|
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
|
||||||
title = element.select("div[id^=bloco-tooltip] > b").first().text().withoutLanguage()
|
title = element.select("div[id^=bloco-tooltip] > b").first().text().withoutLanguage()
|
||||||
|
@ -112,7 +112,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
val url = HttpUrl.parse("$baseUrl/assets/busca.php")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/assets/busca.php")!!.newBuilder()
|
||||||
.addQueryParameter("q", query)
|
.addQueryParameter("pesquisa", query)
|
||||||
|
|
||||||
return GET(url.toString(), newHeaders)
|
return GET(url.toString(), newHeaders)
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||||
val infoElement = document.select("div.tamanho-bloco-perfil").first()
|
val infoElement = document.select("div.perfil-manga").first()
|
||||||
val rowInfo = infoElement.select("div.row:eq(2)").first()
|
val rowInfo = infoElement.select("div.row:eq(2)").first()
|
||||||
|
|
||||||
title = infoElement.select("h2").first().text().withoutLanguage()
|
title = infoElement.select("h2").first().text().withoutLanguage()
|
||||||
|
@ -160,11 +160,11 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
thumbnail_url = infoElement.select(".img-thumbnail").first().attr("src")
|
thumbnail_url = infoElement.select(".img-thumbnail").first().attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListSelector() = "div.row.lancamento-linha"
|
override fun chapterListSelector() = "div.row.capitulos"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||||
val firstColumn = element.select("div.col-md-6:eq(0)").first()!!
|
val firstColumn = element.select("div.col-md-6:eq(0)").first()!!
|
||||||
val secondColumn = element.select("div.col-md-6:eq(1)").first()
|
val secondColumn = element.select("div.col-md-6:eq(1)").firstOrNull()
|
||||||
|
|
||||||
name = firstColumn.select("a").first().text()
|
name = firstColumn.select("a").first().text()
|
||||||
scanlator = secondColumn?.select("a")?.joinToString { it.text() }
|
scanlator = secondColumn?.select("a")?.joinToString { it.text() }
|
||||||
|
|
Loading…
Reference in New Issue