fix mangakawaii (#5284) (#5314)

* title and description in latest working again

* browse working again
This commit is contained in:
OncePunchedMan 2021-01-05 04:22:54 +01:00 committed by GitHub
parent 6b054939b9
commit 91963858bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mangakawaii'
pkgNameSuffix = 'fr.mangakawaii'
extClass = '.MangaKawaii'
extVersionCode = 11
extVersionCode = 12
libVersion = '1.2'
}

View File

@ -37,7 +37,7 @@ class MangaKawaii : ParsedHttpSource() {
override fun latestUpdatesNextPageSelector(): String? = null
override fun searchMangaNextPageSelector() = "no selector"
override fun popularMangaRequest(page: Int) = GET("$baseUrl/liste-manga/filterMangaList?page=$page&sortBy=views&asc=false", headersBuilder().add("X-Requested-With", "XMLHttpRequest").build())
override fun popularMangaRequest(page: Int) = GET(baseUrl, headers)
override fun latestUpdatesRequest(page: Int) = GET(baseUrl, headers)
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
@ -49,14 +49,14 @@ class MangaKawaii : ParsedHttpSource() {
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
manga.setUrlWithoutDomain(element.select("a").attr("abs:href"))
manga.title = element.select("h3").text().trim()
manga.thumbnail_url = element.select("a").attr("abs:data-background-image")
manga.setUrlWithoutDomain(element.select("a").attr("href").substringBeforeLast("/"))
manga.title = element.select("div.hot-manga__item-caption").select("div.hot-manga__item-name").text().trim()
manga.thumbnail_url = element.select("a").attr("style").substringAfter("('").substringBeforeLast("'")
return manga
}
override fun latestUpdatesFromElement(element: Element): SManga = SManga.create().apply {
title = element.select(" a").text().trim()
title = element.select("a").attr("title")
setUrlWithoutDomain(element.select("a").attr("href"))
thumbnail_url = element.select("img").attr("data-src")
}
@ -85,7 +85,7 @@ class MangaKawaii : ParsedHttpSource() {
override fun mangaDetailsParse(document: Document): SManga {
val manga = SManga.create()
manga.thumbnail_url = document.select("div.manga-view__header-image").select("img").attr("abs:src")
manga.description = document.select("div.info-desc__content").text()
manga.description = document.select("dd.text-justify.text-break").text()
manga.author = document.select("a[href*=author]").text()
manga.artist = document.select("a[href*=artist]").text()
val glist = document.select("a[href*=category]").map { it.text() }