MangaKawaii: add scanlator (#6490)
This commit is contained in:
parent
0e39cec5b8
commit
726992ddfb
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Mangakawaii'
|
extName = 'Mangakawaii'
|
||||||
pkgNameSuffix = 'fr.mangakawaii'
|
pkgNameSuffix = 'fr.mangakawaii'
|
||||||
extClass = '.MangaKawaii'
|
extClass = '.MangaKawaii'
|
||||||
extVersionCode = 28
|
extVersionCode = 29
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,13 +103,14 @@ class MangaKawaii : ParsedHttpSource() {
|
||||||
override fun chapterListSelector() = throw Exception("Not used")
|
override fun chapterListSelector() = throw Exception("Not used")
|
||||||
override fun chapterFromElement(element: Element): SChapter = throw Exception("Not used")
|
override fun chapterFromElement(element: Element): SChapter = throw Exception("Not used")
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
var document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
|
var widgetDocument = document
|
||||||
val widgetPageListUrl = Regex("""['"](/arrilot/load-widget.*?)['"]""").find(document.toString())?.groupValues?.get(1)
|
val widgetPageListUrl = Regex("""['"](/arrilot/load-widget.*?)['"]""").find(document.toString())?.groupValues?.get(1)
|
||||||
if (widgetPageListUrl != null) {
|
if (widgetPageListUrl != null) {
|
||||||
document = client.newCall(GET("$baseUrl$widgetPageListUrl", headers)).execute().asJsoup()
|
widgetDocument = client.newCall(GET("$baseUrl$widgetPageListUrl", headers)).execute().asJsoup()
|
||||||
}
|
}
|
||||||
|
|
||||||
return document.select("tr[class*=volume-]:has(td)").map {
|
return widgetDocument.select("tr[class*=volume-]:has(td)").map {
|
||||||
SChapter.create().apply {
|
SChapter.create().apply {
|
||||||
url = it.select("td.table__chapter").select("a").attr("href")
|
url = it.select("td.table__chapter").select("a").attr("href")
|
||||||
name = it.select("td.table__chapter").select("span").text().trim()
|
name = it.select("td.table__chapter").select("span").text().trim()
|
||||||
|
@ -117,6 +118,7 @@ class MangaKawaii : ParsedHttpSource() {
|
||||||
?: -1F
|
?: -1F
|
||||||
date_upload = it.select("td.table__date").firstOrNull()?.text()?.let { parseDate(it) }
|
date_upload = it.select("td.table__date").firstOrNull()?.text()?.let { parseDate(it) }
|
||||||
?: 0
|
?: 0
|
||||||
|
scanlator = document.select("[itemprop=translator] a").joinToString { it.text().replace(Regex("""[\[\]]"""), "") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue