From cd22cfa20e83b351d3c2d74402054174f16914fe Mon Sep 17 00:00:00 2001 From: Salman-Git-Hub Date: Wed, 25 Oct 2023 19:08:51 +0545 Subject: [PATCH 1/5] fix filters data --- .../animeextension/en/animetake/AnimeTakeFilters.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTakeFilters.kt b/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTakeFilters.kt index d75f7587f1..bec06df344 100644 --- a/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTakeFilters.kt +++ b/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTakeFilters.kt @@ -101,14 +101,14 @@ object AnimeTakeFilters { Pair("Sci-Fi", "Sci-Fi"), Pair("Seinen", "Seinen"), Pair("Shoujo", "Shoujo"), - Pair("Shoujo+Ai", "Shoujo+Ai"), + Pair("Shoujo Ai", "Shoujo+Ai"), Pair("Shounen", "Shounen"), - Pair("Shounen+Ai", "Shounen+Ai"), + Pair("Shounen Ai", "Shounen+Ai"), Pair("Slice of Life", "Slice+of+Life"), Pair("Space", "Space"), Pair("Sports", "Sports"), - Pair("Strategy+Game", "Strategy+Game"), - Pair("Super+Power", "Super+Power"), + Pair("Strategy Game", "Strategy+Game"), + Pair("Super Power", "Super+Power"), Pair("Supernatural", "Supernatural"), Pair("Survival", "Survival"), Pair("Suspense", "Suspense"), From 00cae54244b22ca88f2a74d506696f6a55972504 Mon Sep 17 00:00:00 2001 From: Salman-Git-Hub Date: Wed, 25 Oct 2023 19:09:32 +0545 Subject: [PATCH 2/5] fix episodes --- .../animeextension/en/animetake/AnimeTake.kt | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTake.kt b/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTake.kt index b01f81fea1..7eb192f429 100644 --- a/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTake.kt +++ b/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/AnimeTake.kt @@ -119,22 +119,34 @@ class AnimeTake : ConfigurableAnimeSource, ParsedAnimeHttpSource() { } // ============================== Episodes ============================== - override fun episodeListSelector() = "div#eps > div > a[href]" + override fun episodeListSelector() = "div.tab-content" override fun episodeListParse(response: Response): List { val document = response.asJsoup() val episodesLink = document.select(episodeListSelector()) - return episodesLink.map(::episodeFromElement).reversed() + val episodes = mutableListOf() + + val specialsDiv = episodesLink.select("div#specials") + if (specialsDiv.isNotEmpty()) { + episodes.addAll(specialsDiv.select("a[href]").map(::episodeFromElement).reversed()) + } + episodes.addAll( + episodesLink.select("div#eps").select("a[href]") + .map(::episodeFromElement).reversed(), + ) + + return episodes.toList() } override fun episodeFromElement(element: Element): SEpisode { return SEpisode.create().apply { setUrlWithoutDomain(element.attr("href")) - val upDate = element.select("div.col-xs-12 > span.label").text() + val upDate = element.select("div.col-xs-12 > span.front_time").text().trim() date_upload = parseDate(upDate) - val epName = element.select("div.col-xs-12 > div.anime-title > b").text() + val epName = element.select("div.col-xs-12 > div.anime-title > b").text().trim() + val epNum = epName.split(" ").last() name = epName - episode_number = 0F + episode_number = epNum.toFloatOrNull() ?: 0F } } From 4a969547ed93f3b44895592859140bca2586a560 Mon Sep 17 00:00:00 2001 From: Salman-Git-Hub Date: Wed, 25 Oct 2023 19:09:56 +0545 Subject: [PATCH 3/5] remove Vidstreaming extractor --- .../extractors/VidstreamingExtractor.kt | 135 ------------------ 1 file changed, 135 deletions(-) delete mode 100644 src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/extractors/VidstreamingExtractor.kt diff --git a/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/extractors/VidstreamingExtractor.kt b/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/extractors/VidstreamingExtractor.kt deleted file mode 100644 index 31a93865a3..0000000000 --- a/src/en/animetake/src/eu/kanade/tachiyomi/animeextension/en/animetake/extractors/VidstreamingExtractor.kt +++ /dev/null @@ -1,135 +0,0 @@ -package eu.kanade.tachiyomi.animeextension.en.animetake.extractors - -import android.util.Base64 -import eu.kanade.tachiyomi.animesource.model.Video -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.util.asJsoup -import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.json.Json -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.jsonArray -import kotlinx.serialization.json.jsonObject -import kotlinx.serialization.json.jsonPrimitive -import okhttp3.Headers -import okhttp3.HttpUrl.Companion.toHttpUrl -import okhttp3.OkHttpClient -import uy.kohesive.injekt.injectLazy -import java.util.Locale -import javax.crypto.Cipher -import javax.crypto.spec.IvParameterSpec -import javax.crypto.spec.SecretKeySpec - -@ExperimentalSerializationApi -class VidstreamingExtractor(private val client: OkHttpClient) { - - private val json: Json by injectLazy() - - fun videosFromUrl(serverUrl: String, prefix: String): List