try #2
@ -1,68 +0,0 @@
|
||||
import java.io.BufferedReader
|
||||
import java.io.InputStreamReader
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion(Config.compileSdk)
|
||||
buildToolsVersion(Config.buildTools)
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion(29)
|
||||
targetSdkVersion(Config.targetSdk)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// dependencies
|
||||
apply("$rootDir/common-dependencies.gradle")
|
||||
|
||||
tasks {
|
||||
val generateExtensions by registering {
|
||||
doLast {
|
||||
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
|
||||
var classPath = (configurations.debugCompileOnly.get().asFileTree.toList() +
|
||||
listOf(
|
||||
configurations.androidApis.get().asFileTree.first().absolutePath, // android.jar path
|
||||
"$projectDir/build/intermediates/aar_main_jar/debug/classes.jar" // jar made from this module
|
||||
))
|
||||
.joinToString(if (isWindows) ";" else ":")
|
||||
|
||||
var javaPath = "${System.getProperty("java.home")}/bin/java"
|
||||
|
||||
val mainClass = "generator.GeneratorMainKt" // Main class we want to execute
|
||||
|
||||
if (isWindows) {
|
||||
classPath = classPath.replace("/", "\\")
|
||||
javaPath = javaPath.replace("/", "\\")
|
||||
}
|
||||
|
||||
val javaProcess = ProcessBuilder()
|
||||
.directory(null).command(javaPath, "-classpath", classPath, mainClass)
|
||||
.redirectErrorStream(true).start()
|
||||
|
||||
val inputStreamReader = InputStreamReader(javaProcess.inputStream)
|
||||
val bufferedReader = BufferedReader(inputStreamReader)
|
||||
|
||||
var s: String?
|
||||
while (bufferedReader.readLine().also { s = it } != null) {
|
||||
logger.info(s)
|
||||
}
|
||||
|
||||
bufferedReader.close()
|
||||
inputStreamReader.close()
|
||||
|
||||
val exitCode = javaProcess.waitFor()
|
||||
if (exitCode != 0) {
|
||||
throw Exception("Java process failed with exit code: $exitCode")
|
||||
}
|
||||
}
|
||||
dependsOn("assembleDebug")
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 355 KiB |
@ -1,5 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.en.letitgoscans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.comicake.ComiCake
|
||||
|
||||
class LetItGoScans : ComiCake("LetItGo Scans", "https://reader.letitgo.scans.today", "en", "/")
|
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1006 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 92 KiB |
@ -1,9 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.en.eightmuses
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
import eu.kanade.tachiyomi.multisrc.eromuse.EroMuse
|
||||
import kotlin.ExperimentalStdlibApi
|
||||
|
||||
@ExperimentalStdlibApi
|
||||
@Nsfw
|
||||
class EightMuses : EroMuse("8Muses", "https://comics.8muses.com")
|
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 42 KiB |
@ -1,167 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.en.erofus
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
import eu.kanade.tachiyomi.multisrc.eromuse.EroMuse
|
||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||
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
|
||||
import okhttp3.Response
|
||||
import rx.Observable
|
||||
|
||||
@ExperimentalStdlibApi
|
||||
@Nsfw
|
||||
class Erofus : EroMuse("Erofus", "https://www.erofus.com") {
|
||||
|
||||
override val albumSelector = "a.a-click"
|
||||
override val topLevelPathSegment = "comics"
|
||||
|
||||
override fun fetchPopularManga(page: Int): Observable<MangasPage> = fetchManga("$baseUrl/comics/various-authors?sort=viewed&page=1", page, "viewed")
|
||||
override fun fetchLatestUpdates(page: Int): Observable<MangasPage> = fetchManga("$baseUrl/comics/various-authors?sort=recent&page=1", page, "recent")
|
||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||
if (page == 1) {
|
||||
pageStack.clear()
|
||||
|
||||
val filterList = if (filters.isEmpty()) getFilterList() else filters
|
||||
currentSortingMode = filterList.filterIsInstance<SortFilter>().first().toQueryValue()
|
||||
|
||||
if (query.isNotBlank()) {
|
||||
// TODO possibly add genre search if a decent list of them can be built
|
||||
pageStack.addLast(StackItem("$baseUrl/?search=$query&sort=$currentSortingMode&page=1", SEARCH_RESULTS_OR_BASE))
|
||||
} else {
|
||||
val albumFilter = filterList.filterIsInstance<AlbumFilter>().first().selection()
|
||||
val url = HttpUrl.parse(baseUrl + albumFilter.pathSegments)!!.newBuilder()
|
||||
.addQueryParameter("sort", currentSortingMode)
|
||||
.addQueryParameter("page", "1")
|
||||
|
||||
pageStack.addLast(StackItem(url.toString(), albumFilter.pageType))
|
||||
}
|
||||
}
|
||||
|
||||
return client.newCall(stackRequest())
|
||||
.asObservableSuccess()
|
||||
.map { response -> parseManga(response.asJsoup()) }
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(response: Response): SManga {
|
||||
return SManga.create().apply {
|
||||
with(response.asJsoup()) {
|
||||
setUrlWithoutDomain(response.request().url().toString())
|
||||
thumbnail_url = select("$albumSelector img").firstOrNull()?.imgAttr()
|
||||
author = when (getAlbumType(url)) {
|
||||
AUTHOR -> {
|
||||
// eg. https://www.erofus.com/comics/witchking00-comics/adventure-time
|
||||
// eg. https://www.erofus.com/comics/mcc-comics/bearing-gifts/bearing-gifts-issue-1
|
||||
select("div.navigation-breadcrumb li:nth-child(3)").text()
|
||||
}
|
||||
VARIOUS_AUTHORS -> {
|
||||
// eg. https://www.erofus.com/comics/various-authors/artdude41/bat-vore
|
||||
select("div.navigation-breadcrumb li:nth-child(5)").text()
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
|
||||
genre = select("div.album-tag-container a").joinToString { it.text() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override val linkedChapterSelector = "a.a-click:has(img)[href^=/comics/]"
|
||||
override val pageThumbnailSelector = "a.a-click:has(img)[href*=/pic/] img"
|
||||
|
||||
override val pageThumbnailPathSegment = "/thumb/"
|
||||
override val pageFullSizePathSegment = "/medium/"
|
||||
|
||||
override fun getAlbumList() = arrayOf(
|
||||
Triple("All Authors", "", SEARCH_RESULTS_OR_BASE),
|
||||
Triple("Various Authors", "/comics/various-authors", VARIOUS_AUTHORS),
|
||||
Triple("Hentai and Manga English", "/comics/hentai-and-manga-english", VARIOUS_AUTHORS),
|
||||
Triple("TabooLicious.xxx Comics", "/comics/taboolicious_xxx-comics", AUTHOR),
|
||||
Triple("IllustratedInterracial.com Comics", "/comics/illustratedinterracial_com-comics", AUTHOR),
|
||||
Triple("ZZZ Comics", "/comics/zzz-comics", AUTHOR),
|
||||
Triple("JohnPersons.com Comics", "/comics/johnpersons_com-comics", AUTHOR),
|
||||
Triple("For members only", "/", AUTHOR),
|
||||
Triple("PalComix Comics", "/comics/palcomix-comics", AUTHOR),
|
||||
Triple("Melkormancin.com Comics", "/comics/melkormancin_com-comics", AUTHOR),
|
||||
Triple("TG Comics", "/comics/tg-comics", AUTHOR),
|
||||
Triple("ShadBase Comics", "/comics/shadbase-comics", AUTHOR),
|
||||
Triple("Filthy Figments Comics", "/comics/filthy-figments-comics", AUTHOR),
|
||||
Triple("Witchking00 Comics", "/comics/witchking00-comics", AUTHOR),
|
||||
Triple("Tease Comix", "/comics/tease-comix", AUTHOR),
|
||||
Triple("PrismGirls Comics", "/comics/prismgirls-comics", AUTHOR),
|
||||
Triple("Croc Comics", "/comics/croc-comics", AUTHOR),
|
||||
Triple("CRAZYXXX3DWORLD Comics", "/comics/crazyxxx3dworld-comics", AUTHOR),
|
||||
Triple("Moiarte Comics", "/comics/moiarte-comics", AUTHOR),
|
||||
Triple("Nicole Heat Comics", "/comics/nicole-heat-comics", AUTHOR),
|
||||
Triple("Expansion Comics", "/comics/expansion-comics", AUTHOR),
|
||||
Triple("DizzyDills Comics", "/comics/dizzydills-comics", AUTHOR),
|
||||
Triple("Hustler Cartoons", "/comics/hustler-cartoons", AUTHOR),
|
||||
Triple("ArtOfJaguar Comics", "/comics/artofjaguar-comics", AUTHOR),
|
||||
Triple("Grow Comics", "/comics/grow-comics", AUTHOR),
|
||||
Triple("Bimbo Story Club Comics", "/comics/bimbo-story-club-comics", AUTHOR),
|
||||
Triple("HentaiTNA.com Comics", "/comics/hentaitna_com-comics", AUTHOR),
|
||||
Triple("ZZomp Comics", "/comics/zzomp-comics", AUTHOR),
|
||||
Triple("Seiren.com.br Comics", "/comics/seiren_com_br-comics", AUTHOR),
|
||||
Triple("DukesHardcoreHoneys.com Comics", "/comics/dukeshardcorehoneys_com-comics", AUTHOR),
|
||||
Triple("Frozen Parody Comics", "/comics/frozen-parody-comics", AUTHOR),
|
||||
Triple("Giantess Club Comics", "/comics/giantess-club-comics", AUTHOR),
|
||||
Triple("Ultimate3DPorn Comics", "/comics/ultimate3dporn-comics", AUTHOR),
|
||||
Triple("Sean Harrington Comics", "/comics/sean-harrington-comics", AUTHOR),
|
||||
Triple("Central Comics", "/comics/central-comics", AUTHOR),
|
||||
Triple("Mana World Comics", "/comics/mana-world-comics", AUTHOR),
|
||||
Triple("The Foxxx Comics", "/comics/the-foxxx-comics", AUTHOR),
|
||||
Triple("Bloody Sugar Comics", "/comics/bloody-sugar-comics", AUTHOR),
|
||||
Triple("Deuce Comics", "/comics/deuce-comics", AUTHOR),
|
||||
Triple("Adult Empire Comics", "/comics/adult-empire-comics", AUTHOR),
|
||||
Triple("SuperHeroineComixxx", "/comics/superheroinecomixxx", AUTHOR),
|
||||
Triple("Sluttish Comics", "/comics/sluttish-comics", AUTHOR),
|
||||
Triple("Damn3D Comics", "/comics/damn3d-comics", AUTHOR),
|
||||
Triple("Fake Celebrities Sex Pictures", "/comics/fake-celebrities-sex-pictures", AUTHOR),
|
||||
Triple("Secret Chest Comics", "/comics/secret-chest-comics", AUTHOR),
|
||||
Triple("Project Bellerophon Comics", "/comics/project-bellerophon-comics", AUTHOR),
|
||||
Triple("Smudge Comics", "/comics/smudge-comics", AUTHOR),
|
||||
Triple("Superheroine Central Comics", "/comics/superheroine-central-comics", AUTHOR),
|
||||
Triple("Jay Marvel Comics", "/comics/jay-marvel-comics", AUTHOR),
|
||||
Triple("Fred Perry Comics", "/comics/fred-perry-comics", AUTHOR),
|
||||
Triple("Seduced Amanda Comics", "/comics/seduced-amanda-comics", AUTHOR),
|
||||
Triple("VGBabes Comics", "/comics/vgbabes-comics", AUTHOR),
|
||||
Triple("SodomSluts.com Comics", "/comics/sodomsluts_com-comics", AUTHOR),
|
||||
Triple("AKABUR Comics", "/comics/akabur-comics", AUTHOR),
|
||||
Triple("eBluberry Comics", "/comics/ebluberry-comics", AUTHOR),
|
||||
Triple("InterracialComicPorn.com Comics", "/comics/interracialcomicporn_com-comics", AUTHOR),
|
||||
Triple("Dubh3d-Dubhgilla Comics", "/comics/dubh3d-dubhgilla-comics", AUTHOR),
|
||||
Triple("Gush Bomb Comix", "/comics/gush-bomb-comix", AUTHOR),
|
||||
Triple("Chiyoji Tomo Comics", "/comics/chiyoji-tomo-comics", AUTHOR),
|
||||
Triple("Mangrowing Comics", "/comics/mangrowing-comics", AUTHOR),
|
||||
Triple("eAdultComics Collection", "/comics/eadultcomics-collection", AUTHOR),
|
||||
Triple("Skulltitti Comics", "/comics/skulltitti-comics", AUTHOR),
|
||||
Triple("James Lemay Comics", "/comics/james-lemay-comics", AUTHOR),
|
||||
Triple("TalesOfPleasure.com Comics", "/comics/talesofpleasure_com-comics", AUTHOR),
|
||||
Triple("Eden Comics", "/comics/eden-comics", AUTHOR),
|
||||
Triple("WorldOfPeach Comics", "/comics/worldofpeach-comics", AUTHOR),
|
||||
Triple("Daniel40 Comics", "/comics/daniel40-comics", AUTHOR),
|
||||
Triple("DontFapGirl Comics", "/comics/dontfapgirl-comics", AUTHOR),
|
||||
Triple("Wingbird Comics", "/comics/wingbird-comics", AUTHOR),
|
||||
Triple("Intrigue3d.com Comics", "/comics/intrigue3d_com-comics", AUTHOR),
|
||||
Triple("Hentaikey Comics", "/comics/hentaikey-comics", AUTHOR),
|
||||
Triple("Kamina1978 Comics", "/comics/kamina1978-comics", AUTHOR),
|
||||
Triple("3DPerils Comics", "/comics/3dperils-comics", AUTHOR),
|
||||
Triple("Tracy Scops Comics", "/comics/tracy-scops-comics", AUTHOR),
|
||||
Triple("Shemale3D Comics", "/comics/shemale3d-comics", AUTHOR),
|
||||
Triple("InterracialSex3D.com Comics", "/comics/Interracialsex3d-Com-Comix", AUTHOR),
|
||||
Triple("MyHentaiGrid Comics", "/comics/myhentaigrid-comics", AUTHOR),
|
||||
Triple("Magnifire Comics", "/comics/magnifire-comics", AUTHOR),
|
||||
Triple("Reptileye Comics", "/comics/reptileye-comics", AUTHOR),
|
||||
Triple("ProjectPinkXXX.com Comics", "/comics/projectpinkxxx_com-comics", AUTHOR),
|
||||
Triple("CallMePlisskin Comics", "/comics/callmeplisskin-comics", AUTHOR)
|
||||
)
|
||||
|
||||
override fun getSortList() = arrayOf(
|
||||
Pair("Viewed", "viewed"),
|
||||
Pair("Liked", "liked"),
|
||||
Pair("Date", "recent"),
|
||||
Pair("A-Z", "az")
|
||||
)
|
||||
}
|
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 57 KiB |
@ -1,56 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.tr.epikmanga
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||
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.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import rx.Observable
|
||||
|
||||
class EpikManga : FMReader("Epik Manga", "https://www.epikmanga.com", "tr") {
|
||||
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/seri-listesi?sorting=views&sorting-type=DESC&Sayfa=$page", headers)
|
||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/seri-listesi?sorting=lastUpdate&sorting-type=DESC&Sayfa=$page", headers)
|
||||
override fun popularMangaNextPageSelector() = "ul.pagination li.active + li:not(.disabled)"
|
||||
|
||||
override val headerSelector = "h4 a"
|
||||
|
||||
// search wasn't working on source's website
|
||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||
return client.newCall(searchMangaRequest(page, query, filters))
|
||||
.asObservableSuccess()
|
||||
.map { response ->
|
||||
searchMangaParse(response, query)
|
||||
}
|
||||
}
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/seri-listesi?type=text", headers)
|
||||
private fun searchMangaParse(response: Response, query: String): MangasPage {
|
||||
val mangas = response.asJsoup().select("div.char.col-lg-4 a")
|
||||
.filter { it.text().contains(query, ignoreCase = true) }
|
||||
.map {
|
||||
SManga.create().apply {
|
||||
setUrlWithoutDomain(it.attr("href"))
|
||||
title = it.text()
|
||||
}
|
||||
}
|
||||
return MangasPage(mangas, false)
|
||||
}
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
val infoElement = document.select("div.col-md-9 div.row").first()
|
||||
|
||||
return SManga.create().apply {
|
||||
status = parseStatus(infoElement.select("h4:contains(Durum:)").firstOrNull()?.ownText())
|
||||
author = infoElement.select("h4:contains(Yazar:)").firstOrNull()?.ownText()
|
||||
artist = infoElement.select("h4:contains(Çizer:)").firstOrNull()?.ownText()
|
||||
genre = infoElement.select("h4:contains(Türler:) a").joinToString { it.text() }
|
||||
thumbnail_url = infoElement.select("img.thumbnail").imgAttr()
|
||||
description = document.select("div.col-md-12 p").text()
|
||||
}
|
||||
}
|
||||
override fun chapterListSelector() = "table.table tbody tr"
|
||||
override fun getFilterList(): FilterList = FilterList()
|
||||
}
|
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 71 KiB |
@ -1,20 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.en.heroscan
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
class HeroScan : FMReader("HeroScan", "https://heroscan.com", "en") {
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor { chain ->
|
||||
val originalRequest = chain.request()
|
||||
chain.proceed(originalRequest).let { response ->
|
||||
if (response.code() == 403 && originalRequest.url().host().contains("b-cdn")) {
|
||||
response.close()
|
||||
chain.proceed(originalRequest.newBuilder().removeHeader("Referer").addHeader("Referer", "https://isekaiscan.com").build())
|
||||
} else {
|
||||
response
|
||||
}
|
||||
}
|
||||
}
|
||||
.build()
|
||||
}
|
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 111 KiB |
@ -1,9 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.ja.kisslove
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class KissLove : FMReader("KissLove", "https://kissaway.net", "ja") {
|
||||
override fun pageListParse(document: Document): List<Page> = base64PageListParse(document)
|
||||
}
|
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 88 KiB |
@ -1,67 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.en.ksgroupscans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import org.jsoup.nodes.Element
|
||||
import java.util.Calendar
|
||||
|
||||
|
||||
class KSGroupScans : FMReader("KSGroupScans", "https://ksgroupscans.com", "en") {
|
||||
override fun chapterFromElement(element: Element, mangaTitle: String): SChapter {
|
||||
return SChapter.create().apply {
|
||||
element.select(chapterUrlSelector).first().let {
|
||||
setUrlWithoutDomain(it.attr("abs:href"))
|
||||
name = element.select(".chapter-name").text()
|
||||
}
|
||||
date_upload = element.select(chapterTimeSelector).let { if (it.hasText()) parseChapterDate(it.text()) else 0 }
|
||||
}
|
||||
}
|
||||
|
||||
private fun parseChapterDate(date: String): Long {
|
||||
val value = date.split(' ')[dateValueIndex].toInt()
|
||||
val dateWord = date.split(' ')[dateWordIndex].let {
|
||||
if (it.contains("(")) {
|
||||
it.substringBefore("(")
|
||||
} else {
|
||||
it.substringBefore("s")
|
||||
}
|
||||
}
|
||||
|
||||
// languages: en, vi, es, tr
|
||||
return when (dateWord) {
|
||||
"min", "minute", "phút", "minuto", "dakika" -> Calendar.getInstance().apply {
|
||||
add(Calendar.MINUTE, value * -1)
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}.timeInMillis
|
||||
"hour", "giờ", "hora", "saat" -> Calendar.getInstance().apply {
|
||||
add(Calendar.HOUR_OF_DAY, value * -1)
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}.timeInMillis
|
||||
"day", "ngày", "día", "gün" -> Calendar.getInstance().apply {
|
||||
add(Calendar.DATE, value * -1)
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}.timeInMillis
|
||||
"week", "tuần", "semana", "hafta" -> Calendar.getInstance().apply {
|
||||
add(Calendar.DATE, value * 7 * -1)
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}.timeInMillis
|
||||
"month", "tháng", "mes", "ay" -> Calendar.getInstance().apply {
|
||||
add(Calendar.MONTH, value * -1)
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}.timeInMillis
|
||||
"year", "năm", "año", "yıl" -> Calendar.getInstance().apply {
|
||||
add(Calendar.YEAR, value * -1)
|
||||
set(Calendar.SECOND, 0)
|
||||
set(Calendar.MILLISECOND, 0)
|
||||
}.timeInMillis
|
||||
else -> {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 180 KiB |
@ -1,98 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.tr.mangatr
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Headers
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import rx.Observable
|
||||
|
||||
class MangaTR : FMReader("Manga-TR", "https://manga-tr.com", "tr") {
|
||||
override fun headersBuilder() = Headers.Builder().apply {
|
||||
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
|
||||
}
|
||||
override fun popularMangaNextPageSelector() = "div.btn-group:not(div.btn-block) button.btn-info"
|
||||
// TODO: genre search possible but a bit of a pain
|
||||
override fun getFilterList() = FilterList()
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/arama.html?icerik=$query", headers)
|
||||
override fun searchMangaParse(response: Response): MangasPage {
|
||||
val mangas = mutableListOf<SManga>()
|
||||
|
||||
response.asJsoup().select("div.row a[data-toggle]")
|
||||
.filterNot { it.siblingElements().text().contains("Novel") }
|
||||
.map { mangas.add(searchMangaFromElement(it)) }
|
||||
|
||||
return MangasPage(mangas, false)
|
||||
}
|
||||
|
||||
override fun searchMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
|
||||
manga.setUrlWithoutDomain(element.attr("abs:href"))
|
||||
manga.title = element.text()
|
||||
|
||||
return manga
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
val manga = SManga.create()
|
||||
val infoElement = document.select("div#tab1").first()
|
||||
|
||||
manga.author = infoElement.select("table + table tr + tr td a").first()?.text()
|
||||
manga.artist = infoElement.select("table + table tr + tr td + td a").first()?.text()
|
||||
manga.genre = infoElement.select("div#tab1 table + table tr + tr td + td + td").text()
|
||||
manga.status = parseStatus(infoElement.select("div#tab1 table tr + tr td a").first().text())
|
||||
manga.description = infoElement.select("div.well").text().trim()
|
||||
manga.thumbnail_url = document.select("img.thumbnail").attr("abs:src")
|
||||
|
||||
return manga
|
||||
}
|
||||
|
||||
override fun chapterListSelector() = "tr.table-bordered"
|
||||
override val chapterUrlSelector = "td[align=left] > a"
|
||||
override val chapterTimeSelector = "td[align=right]"
|
||||
private val chapterListHeaders = headers.newBuilder().add("X-Requested-With", "XMLHttpRequest").build()
|
||||
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
||||
val requestUrl = "$baseUrl/cek/fetch_pages_manga.php?manga_cek=${manga.url.substringAfter("manga-").substringBefore(".")}"
|
||||
return client.newCall(GET(requestUrl, chapterListHeaders))
|
||||
.asObservableSuccess()
|
||||
.map { response ->
|
||||
chapterListParse(response, requestUrl)
|
||||
}
|
||||
}
|
||||
|
||||
private fun chapterListParse(response: Response, requestUrl: String): List<SChapter> {
|
||||
val chapters = mutableListOf<SChapter>()
|
||||
var document = response.asJsoup()
|
||||
var moreChapters = true
|
||||
var nextPage = 2
|
||||
|
||||
// chapters are paginated
|
||||
while (moreChapters) {
|
||||
document.select(chapterListSelector()).map { chapters.add(chapterFromElement(it)) }
|
||||
if (document.select("a[data-page=$nextPage]").isNotEmpty()) {
|
||||
val body = FormBody.Builder()
|
||||
.add("page", nextPage.toString())
|
||||
.build()
|
||||
document = client.newCall(POST(requestUrl, chapterListHeaders, body)).execute().asJsoup()
|
||||
nextPage++
|
||||
} else {
|
||||
moreChapters = false
|
||||
}
|
||||
}
|
||||
return chapters
|
||||
}
|
||||
|
||||
override fun pageListRequest(chapter: SChapter): Request = GET("$baseUrl/${chapter.url.substringAfter("cek/")}", headers)
|
||||
}
|
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 212 KiB |
@ -1,19 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.en.manhwa18
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
import eu.kanade.tachiyomi.multisrc.fmreader.FMReader
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import okhttp3.Request
|
||||
|
||||
@Nsfw
|
||||
class Manhwa18 : FMReader("Manhwa18", "https://manhwa18.com", "en") {
|
||||
override fun imageRequest(page: Page): Request {
|
||||
return if (page.imageUrl!!.contains("manhwa18")) {
|
||||
super.imageRequest(page)
|
||||
} else {
|
||||
GET(page.imageUrl!!, headers.newBuilder().removeAll("Referer").build())
|
||||
}
|
||||
}
|
||||
override fun getGenreList() = getAdultGenreList()
|
||||
}
|