mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 18:32:39 +01:00
Add Epikman (#3790)
This commit is contained in:
parent
d5d651b6e7
commit
a0d6f66cc9
9
src/tr/epikman/build.gradle
Normal file
9
src/tr/epikman/build.gradle
Normal file
@ -0,0 +1,9 @@
|
||||
ext {
|
||||
extName = 'Epikman'
|
||||
extClass = '.Epikman'
|
||||
themePkg = 'zeistmanga'
|
||||
baseUrl = 'https://www.epikman.ga'
|
||||
overrideVersionCode = 0
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
BIN
src/tr/epikman/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/tr/epikman/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
BIN
src/tr/epikman/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/tr/epikman/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
src/tr/epikman/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/tr/epikman/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
src/tr/epikman/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/tr/epikman/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
BIN
src/tr/epikman/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/tr/epikman/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,69 @@
|
||||
package eu.kanade.tachiyomi.extension.tr.epikman
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class Epikman : ZeistManga(
|
||||
"Epikman",
|
||||
"https://www.epikman.ga",
|
||||
"tr",
|
||||
) {
|
||||
override val useOldChapterFeed = true
|
||||
override val chapterCategory = "Bölüm"
|
||||
override val pageListSelector = ".chapter-view"
|
||||
|
||||
private var nextLatestPageUrl: String = ""
|
||||
|
||||
override fun latestUpdatesRequest(page: Int): Request {
|
||||
if (page == 1) {
|
||||
nextLatestPageUrl = ""
|
||||
}
|
||||
|
||||
val url = nextLatestPageUrl.ifBlank {
|
||||
"$baseUrl/search/label/Seri?max-results=20"
|
||||
}
|
||||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||
val document = response.asJsoup()
|
||||
val mangas = mangaListParse(document)
|
||||
val nextPage = document.selectFirst("a[title='Önceki Kayıtlar']")
|
||||
|
||||
nextPage?.let {
|
||||
nextLatestPageUrl = it.absUrl("href")
|
||||
}
|
||||
|
||||
return MangasPage(mangas, nextPage != null)
|
||||
}
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val url = "$baseUrl/search".toHttpUrl().newBuilder()
|
||||
.addQueryParameter("q", query)
|
||||
.addQueryParameter("max-results", "999")
|
||||
.build()
|
||||
return GET(url, headers)
|
||||
}
|
||||
|
||||
override fun searchMangaParse(response: Response) =
|
||||
MangasPage(mangaListParse(response.asJsoup()), false)
|
||||
|
||||
private fun mangaListParse(document: Document) =
|
||||
document.select("#Blog1 .grid > div").map { element ->
|
||||
SManga.create().apply {
|
||||
with(element.selectFirst(".clamp")!!) {
|
||||
title = text()
|
||||
setUrlWithoutDomain(absUrl("href"))
|
||||
}
|
||||
thumbnail_url = element.selectFirst("img")!!.absUrl("src")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user