Skip to content

Commit

Permalink
Add Epikman (#3790)
Browse files Browse the repository at this point in the history
  • Loading branch information
choppeh committed Jun 28, 2024
1 parent d5d651b commit a0d6f66
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/tr/epikman/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ext {
extName = 'Epikman'
extClass = '.Epikman'
themePkg = 'zeistmanga'
baseUrl = 'https://www.epikman.ga'
overrideVersionCode = 0
}

apply from: "$rootDir/common.gradle"
Binary file added src/tr/epikman/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/tr/epikman/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/tr/epikman/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/tr/epikman/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/tr/epikman/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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")
}
}
}

0 comments on commit a0d6f66

Please sign in to comment.