mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 10:22:47 +01:00
parent
d39e0f15f5
commit
97ce648e34
@ -3,7 +3,7 @@ ext {
|
|||||||
extClass = '.FenixManhwas'
|
extClass = '.FenixManhwas'
|
||||||
themePkg = 'zeistmanga'
|
themePkg = 'zeistmanga'
|
||||||
baseUrl = 'https://fenixleitura.blogspot.com'
|
baseUrl = 'https://fenixleitura.blogspot.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -9,9 +9,9 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
|||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import kotlinx.serialization.decodeFromString
|
import kotlinx.serialization.decodeFromString
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
class FenixManhwas : ZeistManga(
|
class FenixManhwas : ZeistManga(
|
||||||
"Fênix Manhwas",
|
"Fênix Manhwas",
|
||||||
@ -32,25 +32,12 @@ class FenixManhwas : ZeistManga(
|
|||||||
setUrlWithoutDomain(document.location())
|
setUrlWithoutDomain(document.location())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListRequest(manga: SManga): Request {
|
override fun getChapterFeedUrl(doc: Document): String {
|
||||||
val url = "$baseUrl/feeds/posts/default/-/".toHttpUrl().newBuilder()
|
val feed = doc.selectFirst(".chapter_get")!!.attr("data-labelchapter")
|
||||||
.addPathSegment(manga.title)
|
return apiUrl(chapterCategory)
|
||||||
.addQueryParameter("alt", "json")
|
.addPathSegments(feed)
|
||||||
.addQueryParameter("start-index", "1")
|
.addQueryParameter("max-results", maxChapterResults.toString())
|
||||||
.addQueryParameter("max-results", "99999")
|
.build().toString()
|
||||||
.addQueryParameter("orderby", "updated")
|
|
||||||
.build()
|
|
||||||
return GET(url, headers)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
|
||||||
val result = json.decodeFromString<ZeistMangaDto>(response.body.string())
|
|
||||||
return result.feed?.entry
|
|
||||||
?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } }
|
|
||||||
?.map { it.toSChapter(baseUrl) }
|
|
||||||
?.sortedBy { it.name }
|
|
||||||
?.reversed()
|
|
||||||
?: throw Exception("Failed to parse from chapter API")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
override fun pageListRequest(chapter: SChapter): Request {
|
||||||
|
Loading…
Reference in New Issue
Block a user