Dynasty scanlator (#4913)

* Dynasty: add scnalator

* Dynasty: bump
This commit is contained in:
dngonz 2024-09-04 16:20:09 +02:00 committed by Draff
parent 66c2007490
commit 47380ab91d
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
3 changed files with 46 additions and 1 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Dynasty'
extClass = '.DynastyFactory'
extVersionCode = 24
extVersionCode = 25
}
apply from: "$rootDir/common.gradle"

View File

@ -14,4 +14,5 @@ fun getAllDynasty() =
DynastyDoujins(),
DynastyIssues(),
DynastySeries(),
DynastyScanlator(),
)

View File

@ -0,0 +1,44 @@
package eu.kanade.tachiyomi.extension.en.dynasty
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class DynastyScanlator : DynastyScans() {
override val name = "Dynasty-Scanlator"
override val searchPrefix = "scanlators"
override val categoryPrefix = "Scanlator"
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
return GET(
"$baseUrl/search?q=$query&classes%5B%5D=$categoryPrefix&page=$page&sort=",
headers,
)
}
override fun popularMangaInitialUrl() = ""
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
manga.setUrlWithoutDomain(element.select("a").attr("href"))
manga.title = element.select("div.caption").text()
return manga
}
override fun mangaDetailsParse(document: Document): SManga {
val manga = SManga.create()
parseHeader(document, manga)
return manga
}
override fun chapterListSelector() = "dl.chapter-list > dd"
override fun chapterListParse(response: Response): List<SChapter> {
return super.chapterListParse(response).reversed()
}
}