diff --git a/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/XkcdFactory.kt b/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/XkcdFactory.kt index 8dcfd4ade..e7a023da8 100644 --- a/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/XkcdFactory.kt +++ b/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/XkcdFactory.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.extension.all.xkcd import eu.kanade.tachiyomi.extension.all.xkcd.translations.XkcdES import eu.kanade.tachiyomi.extension.all.xkcd.translations.XkcdFR -import eu.kanade.tachiyomi.extension.all.xkcd.translations.XkcdKO import eu.kanade.tachiyomi.extension.all.xkcd.translations.XkcdRU import eu.kanade.tachiyomi.extension.all.xkcd.translations.XkcdZH import eu.kanade.tachiyomi.source.SourceFactory @@ -14,6 +13,5 @@ class XkcdFactory : SourceFactory { XkcdZH(), XkcdFR(), XkcdRU(), - XkcdKO(), ) } diff --git a/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/translations/XkcdKO.kt b/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/translations/XkcdKO.kt deleted file mode 100644 index 9b9d60af3..000000000 --- a/src/all/xkcd/src/eu/kanade/tachiyomi/extension/all/xkcd/translations/XkcdKO.kt +++ /dev/null @@ -1,49 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.xkcd.translations - -import eu.kanade.tachiyomi.extension.all.xkcd.Xkcd -import eu.kanade.tachiyomi.source.model.Page -import eu.kanade.tachiyomi.source.model.SChapter -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.Response - -class XkcdKO : Xkcd("https://xkcdko.com", "ko") { - override val creator = "랜들 먼로" - - override val synopsis = "사랑, 풍자, 수학, 그리고 언어에 관한 웹 만화." - - // Google translated, sorry - override val interactiveText = - "이 만화의 대화형 버전을 경험하려면 WebView/브라우저에서 엽니다." - - override val altTextUrl = CJK_ALT_TEXT_URL - - override val chapterListSelector = "#comicList > ol > li > a" - - override fun chapterListParse(response: Response) = - response.asJsoup().select(chapterListSelector).map { - SChapter.create().apply { - url = it.attr("href") - val number = it.attr("title") - name = it.text().numbered(number) - chapter_number = number.toFloat() - // no dates available - date_upload = 0L - } - } - - override fun pageListParse(response: Response): List { - // if the img tag is empty then it is an interactive comic - val img = response.asJsoup().selectFirst(imageSelector) ?: error(interactiveText) - - // if an HD image is available it'll be the srcset attribute - val image = when { - !img.hasAttr("srcset") -> img.attr("abs:src") - else -> img.attr("abs:srcset").substringBefore(' ') - } - - // create a text image for the alt text - val text = img.attr("alt") + "\n\n" + img.attr("title") - - return listOf(Page(0, "", image), Page(1, "", text.image())) - } -} diff --git a/src/en/creepyscans/build.gradle b/src/en/creepyscans/build.gradle deleted file mode 100644 index 68ceddd39..000000000 --- a/src/en/creepyscans/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -ext { - extName = 'CreepyScans' - extClass = '.CreepyScans' - themePkg = 'madara' - baseUrl = 'https://creepyscans.com' - overrideVersionCode = 1 -} - -apply from: "$rootDir/common.gradle" diff --git a/src/en/creepyscans/res/mipmap-hdpi/ic_launcher.png b/src/en/creepyscans/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 1056a4758..000000000 Binary files a/src/en/creepyscans/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/creepyscans/res/mipmap-mdpi/ic_launcher.png b/src/en/creepyscans/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 642ee2cc6..000000000 Binary files a/src/en/creepyscans/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/creepyscans/res/mipmap-xhdpi/ic_launcher.png b/src/en/creepyscans/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 58f471536..000000000 Binary files a/src/en/creepyscans/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/creepyscans/res/mipmap-xxhdpi/ic_launcher.png b/src/en/creepyscans/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index ea2244a3f..000000000 Binary files a/src/en/creepyscans/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/creepyscans/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/creepyscans/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 2d8848d81..000000000 Binary files a/src/en/creepyscans/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/creepyscans/src/eu/kanade/tachiyomi/extension/en/creepyscans/CreepyScans.kt b/src/en/creepyscans/src/eu/kanade/tachiyomi/extension/en/creepyscans/CreepyScans.kt deleted file mode 100644 index 4836d793e..000000000 --- a/src/en/creepyscans/src/eu/kanade/tachiyomi/extension/en/creepyscans/CreepyScans.kt +++ /dev/null @@ -1,155 +0,0 @@ -package eu.kanade.tachiyomi.extension.en.creepyscans - -import eu.kanade.tachiyomi.multisrc.madara.Madara -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.POST -import eu.kanade.tachiyomi.network.asObservableSuccess -import eu.kanade.tachiyomi.network.interceptor.rateLimit -import eu.kanade.tachiyomi.source.model.Filter -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 kotlinx.serialization.json.boolean -import kotlinx.serialization.json.jsonArray -import kotlinx.serialization.json.jsonObject -import kotlinx.serialization.json.jsonPrimitive -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrl -import okhttp3.OkHttpClient -import okhttp3.Request -import org.jsoup.nodes.Document -import rx.Observable -import java.util.concurrent.TimeUnit - -class CreepyScans : Madara( - "CreepyScans", - "https://creepyscans.com", - "en", -) { - - override val client: OkHttpClient = super.client.newBuilder() - .rateLimit(1, 3, TimeUnit.SECONDS) - .build() - - override val useNewChapterEndpoint = true - - // Search - - override fun fetchSearchManga( - page: Int, - query: String, - filters: FilterList, - ): Observable { - return if (query.isNotBlank()) { - val form = FormBody.Builder() - .add("action", "wp-manga-search-manga") - .add("title", query) - .build() - client.newCall(POST("$baseUrl/wp-admin/admin-ajax.php", headers, form)).asObservableSuccess().map { res -> - json.parseToJsonElement(res.body.string()).jsonObject.let { obj -> - if (!obj["success"]!!.jsonPrimitive.boolean) { - MangasPage(emptyList(), false) - } else { - val mangas = obj["data"]!!.jsonArray.map { - SManga.create().apply { - title = it.jsonObject["title"]!!.jsonPrimitive.content - setUrlWithoutDomain(it.jsonObject["url"]!!.jsonPrimitive.content) - } - } - MangasPage(mangas, false) - } - } - } - } else { - super.fetchSearchManga(page, query, filters) - } - } - - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val url = "$baseUrl/$mangaSubString/".toHttpUrl().newBuilder() - filters.forEach { filter -> - when (filter) { - is OrderByFilter -> { - if (filter.state != 0) { - url.addQueryParameter("m_orderby", filter.toUriPart()) - } - } - is GenreFilter -> { - val selected = filter.vals[filter.state].second - if (selected.isNotBlank()) { - url.removePathSegment(0) - url.addPathSegment("manga-genre") - url.addPathSegment(filter.vals[filter.state].second) - } - } - else -> {} - } - } - return GET(url.build(), headers) - } - - override fun searchMangaSelector(): String = - super.searchMangaSelector() + ",div.page-content-listing div.page-item-detail" - - override fun searchMangaNextPageSelector(): String? = null - - // Filter - - override fun genresRequest(): Request { - return GET("$baseUrl/$mangaSubString/?genres=", headers) - } - - override fun parseGenres(document: Document): List { - genresList = document.select(".list-unstyled li").mapNotNull { genre -> - genre.selectFirst("a[href]")?.let { - val slug = it.attr("href") - .split("/") - .last(String::isNotEmpty) - - Pair(it.ownText().trim(), slug) - } - } - - return emptyList() - } - - // From manga18fx - private var genresList: List> = emptyList() - - class GenreFilter(val vals: List>) : - Filter.Select("Genre", vals.map { it.first }.toTypedArray()) - - override fun getFilterList(): FilterList { - launchIO { fetchGenres() } - - val filters = buildList(4) { - add( - OrderByFilter( - title = intl["order_by_filter_title"], - options = orderByFilterOptions.map { Pair(it.key, it.value) }, - state = 0, - ), - ) - add(Filter.Separator()) - add(Filter.Header("Filters are ignored for text search!")) - - if (genresList.isNotEmpty()) { - add(GenreFilter(listOf(Pair("