From 33f763e157c1ac511fc7a0080a5db619dcced6b9 Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:46:01 -0400 Subject: [PATCH] WP Mangastream - update Komiktap (#3618) --- src/all/wpmangastream/build.gradle | 2 +- .../all/wpmangastream/WPMangaStream.kt | 2 +- .../all/wpmangastream/WPMangaStreamFactory.kt | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/all/wpmangastream/build.gradle b/src/all/wpmangastream/build.gradle index 09e9f35ca..ebc856464 100644 --- a/src/all/wpmangastream/build.gradle +++ b/src/all/wpmangastream/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'WP Mangstream (multiple sources)' pkgNameSuffix = 'all.wpmangastream' extClass = '.WPMangaStreamFactory' - extVersionCode = 16 + extVersionCode = 17 libVersion = '1.2' } diff --git a/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStream.kt b/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStream.kt index 75148280f..0d460a9cf 100644 --- a/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStream.kt +++ b/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStream.kt @@ -155,7 +155,7 @@ abstract class WPMangaStream( override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element) override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element) - override fun popularMangaNextPageSelector() = "a.next.page-numbers" + override fun popularMangaNextPageSelector(): String? = "a.next.page-numbers" override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector() override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() diff --git a/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt b/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt index a52986a04..374a74e34 100644 --- a/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt +++ b/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt @@ -615,10 +615,21 @@ class SekteDoujin : WPMangaStream("Sekte Doujin", "https://sektedoujin.com", "id class NonStopScans : WPMangaStream("Non-Stop Scans", "https://www.nonstopscans.com", "en") -class KomikTap : WPMangaStream("KomikTap", "https://komiktap.xyz", "id") { - override fun popularMangaRequest(page: Int) = GET("$baseUrl/manga/?page=$page&order=popular", headers) - override fun popularMangaNextPageSelector() = "a.r" - override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/manga/?page=$page&order=update", headers) +class KomikTap : WPMangaStream("KomikTap", "https://komiktap.us", "id") { + override fun popularMangaRequest(page: Int) = GET("$baseUrl/project/", headers) + override fun popularMangaNextPageSelector(): String? = null + override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/?page=$page", headers) + override fun latestUpdatesSelector() = "div.releases:contains(latest update) + div div.uta" + override fun latestUpdatesFromElement(element: Element): SManga { + return SManga.create().apply { + element.select("div.luf > a").let { + title = it.text() + setUrlWithoutDomain(it.attr("href")) + } + thumbnail_url = element.select("img").attr("abs:src") + } + } + override fun latestUpdatesNextPageSelector() = "div.hpage a.r" // Source's search is semi-broken, filtered search returns "no results" for page > 1 override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/cari-manga/$query/page/$page/") override fun searchMangaNextPageSelector() = "a.next.page-numbers"