From 87cfe3f5b19eda173f81164fd14d0d4585873bed Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Mon, 19 Apr 2021 19:29:12 -0300 Subject: [PATCH] Update 'UM' selectors. (#6623) --- src/pt/unionmangas/build.gradle | 2 +- .../extension/pt/unionmangas/UnionMangas.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pt/unionmangas/build.gradle b/src/pt/unionmangas/build.gradle index 5ee91d5cb..4b9921571 100644 --- a/src/pt/unionmangas/build.gradle +++ b/src/pt/unionmangas/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Union Mangás' pkgNameSuffix = 'pt.unionmangas' extClass = '.UnionMangas' - extVersionCode = 20 + extVersionCode = 21 libVersion = '1.2' } diff --git a/src/pt/unionmangas/src/eu/kanade/tachiyomi/extension/pt/unionmangas/UnionMangas.kt b/src/pt/unionmangas/src/eu/kanade/tachiyomi/extension/pt/unionmangas/UnionMangas.kt index 5d39ac2db..f62922ce9 100644 --- a/src/pt/unionmangas/src/eu/kanade/tachiyomi/extension/pt/unionmangas/UnionMangas.kt +++ b/src/pt/unionmangas/src/eu/kanade/tachiyomi/extension/pt/unionmangas/UnionMangas.kt @@ -44,7 +44,7 @@ class UnionMangas : ParsedHttpSource() { .connectTimeout(3, TimeUnit.MINUTES) .readTimeout(3, TimeUnit.MINUTES) .writeTimeout(3, TimeUnit.MINUTES) - .addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS)) + .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) .build() override fun headersBuilder(): Headers.Builder = Headers.Builder() @@ -62,7 +62,7 @@ class UnionMangas : ParsedHttpSource() { 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 { title = element.select("div[id^=bloco-tooltip] > b").first().text().withoutLanguage() @@ -112,7 +112,7 @@ class UnionMangas : ParsedHttpSource() { .build() val url = HttpUrl.parse("$baseUrl/assets/busca.php")!!.newBuilder() - .addQueryParameter("q", query) + .addQueryParameter("pesquisa", query) return GET(url.toString(), newHeaders) } @@ -148,7 +148,7 @@ class UnionMangas : ParsedHttpSource() { } 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() title = infoElement.select("h2").first().text().withoutLanguage() @@ -160,11 +160,11 @@ class UnionMangas : ParsedHttpSource() { 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 { 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() scanlator = secondColumn?.select("a")?.joinToString { it.text() }