diff --git a/src/all/meituatop/build.gradle b/src/all/meituatop/build.gradle deleted file mode 100644 index f7ed4514c..000000000 --- a/src/all/meituatop/build.gradle +++ /dev/null @@ -1,8 +0,0 @@ -ext { - extName = 'Meitua.top' - extClass = '.MeituaTop' - extVersionCode = 6 - isNsfw = true -} - -apply from: "$rootDir/common.gradle" diff --git a/src/all/meituatop/res/mipmap-hdpi/ic_launcher.png b/src/all/meituatop/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index ab954a480..000000000 Binary files a/src/all/meituatop/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/meituatop/res/mipmap-mdpi/ic_launcher.png b/src/all/meituatop/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 5842c008b..000000000 Binary files a/src/all/meituatop/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/meituatop/res/mipmap-xhdpi/ic_launcher.png b/src/all/meituatop/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index da15fb7ac..000000000 Binary files a/src/all/meituatop/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/meituatop/res/mipmap-xxhdpi/ic_launcher.png b/src/all/meituatop/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 169aa3c23..000000000 Binary files a/src/all/meituatop/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/meituatop/res/mipmap-xxxhdpi/ic_launcher.png b/src/all/meituatop/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index a77d68b94..000000000 Binary files a/src/all/meituatop/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/meituatop/src/eu/kanade/tachiyomi/extension/all/meituatop/MeituaTop.kt b/src/all/meituatop/src/eu/kanade/tachiyomi/extension/all/meituatop/MeituaTop.kt deleted file mode 100644 index 331b23f32..000000000 --- a/src/all/meituatop/src/eu/kanade/tachiyomi/extension/all/meituatop/MeituaTop.kt +++ /dev/null @@ -1,111 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.meituatop - -import eu.kanade.tachiyomi.network.GET -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.Page -import eu.kanade.tachiyomi.source.model.SChapter -import eu.kanade.tachiyomi.source.model.SManga -import eu.kanade.tachiyomi.source.online.HttpSource -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.HttpUrl.Companion.toHttpUrl -import okhttp3.Request -import okhttp3.Response -import org.jsoup.select.Evaluator -import rx.Observable -import java.text.SimpleDateFormat -import java.util.Locale - -// Uses MACCMS http://www.maccms.la/ -class MeituaTop : HttpSource() { - override val name = "Meitua.top" - override val lang = "all" - override val supportsLatest = false - - override val baseUrl = "https://mt1.meitu1.sbs" - - override fun popularMangaRequest(page: Int) = GET("$baseUrl/arttype/0b-$page.html", headers) - - override fun popularMangaParse(response: Response): MangasPage { - val document = response.asJsoup() - val mangas = document.selectFirst(Evaluator.Class("thumbnail-group"))!!.children().map { - SManga.create().apply { - url = it.selectFirst(Evaluator.Tag("a"))!!.attr("href") - val image = it.selectFirst(Evaluator.Tag("img"))!! - title = image.attr("alt") - thumbnail_url = image.attr("src") - val info = it.selectFirst(Evaluator.Tag("p"))!!.ownText().split(" - ") - genre = info[0] - description = info[1] - status = SManga.COMPLETED - initialized = true - } - } - val pageLinks = document.select(Evaluator.Class("page_link")) - if (pageLinks.isEmpty()) return MangasPage(mangas, false) - val lastPage = pageLinks[3].attr("href") - val hasNextPage = document.location().pageNumber() != lastPage.pageNumber() - return MangasPage(mangas, hasNextPage) - } - - override fun latestUpdatesRequest(page: Int) = throw UnsupportedOperationException() - - override fun latestUpdatesParse(response: Response) = throw UnsupportedOperationException() - - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - if (query.isNotEmpty()) { - val url = "$baseUrl/artsearch/-------.html".toHttpUrl().newBuilder() - .addQueryParameter("wd", query) - .addQueryParameter("page", page.toString()) - .toString() - return GET(url, headers) - } - - val filter = filters.filterIsInstance().firstOrNull() ?: return popularMangaRequest(page) - return GET("$baseUrl/arttype/${21 + filter.state}b-$page.html", headers) - } - - override fun searchMangaParse(response: Response) = popularMangaParse(response) - - override fun fetchMangaDetails(manga: SManga): Observable = Observable.just(manga) - - override fun mangaDetailsParse(response: Response) = throw UnsupportedOperationException() - - override fun fetchChapterList(manga: SManga): Observable> { - val chapter = SChapter.create().apply { - url = manga.url - name = "Gallery" - date_upload = dateFormat.parse(manga.description!!)!!.time - chapter_number = -2f - } - return Observable.just(listOf(chapter)) - } - - override fun chapterListParse(response: Response) = throw UnsupportedOperationException() - - override fun pageListParse(response: Response): List { - val document = response.asJsoup() - val images = document.selectFirst(Evaluator.Class("ttnr"))!!.select(Evaluator.Tag("img")) - .map { it.attr("src") }.distinct() - return images.mapIndexed { index, imageUrl -> Page(index, imageUrl = imageUrl) } - } - - override fun imageUrlParse(response: Response) = throw UnsupportedOperationException() - - override fun getFilterList() = FilterList( - Filter.Header("Category (ignored for text search)"), - RegionFilter(), - ) - - private class RegionFilter : Filter.Select( - "Region", - arrayOf("All", "国产美女", "韩国美女", "台湾美女", "日本美女", "欧美美女", "泰国美女"), - ) - - private fun String.pageNumber() = numberRegex.findAll(this).last().value.toInt() - - private val numberRegex by lazy { Regex("""\d+""") } - - private val dateFormat by lazy { SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH) } -}