diff --git a/Anichi/build.gradle.kts b/Anichi/build.gradle.kts deleted file mode 100644 index 643809b0..00000000 --- a/Anichi/build.gradle.kts +++ /dev/null @@ -1,42 +0,0 @@ -import org.jetbrains.kotlin.konan.properties.Properties - -// use an integer for version numbers -version = 9 - -android { - defaultConfig { - val properties = Properties() - properties.load(project.rootProject.file("local.properties").inputStream()) - - buildConfigField("String", "ANICHI_API", "\"${properties.getProperty("ANICHI_API")}\"") - buildConfigField("String", "ANICHI_SERVER", "\"${properties.getProperty("ANICHI_SERVER")}\"") - buildConfigField("String", "ANICHI_ENDPOINT", "\"${properties.getProperty("ANICHI_ENDPOINT")}\"") - buildConfigField("String", "ANICHI_APP", "\"${properties.getProperty("ANICHI_APP")}\"") - - - } -} - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://media.discordapp.net/attachments/1059306855865782282/1123970193274712096/Anichi.png" -} \ No newline at end of file diff --git a/Anichi/src/main/AndroidManifest.xml b/Anichi/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/Anichi/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Anichi/src/main/kotlin/com/hexated/Anichi.kt b/Anichi/src/main/kotlin/com/hexated/Anichi.kt deleted file mode 100644 index bbad3ae7..00000000 --- a/Anichi/src/main/kotlin/com/hexated/Anichi.kt +++ /dev/null @@ -1,263 +0,0 @@ -package com.hexated - -import com.hexated.AnichiExtractors.invokeExternalSources -import com.hexated.AnichiExtractors.invokeInternalSources -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.syncproviders.SyncIdName -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.nicehttp.RequestBodyTypes -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.RequestBody.Companion.toRequestBody - -open class Anichi : MainAPI() { - override var name = "Anichi" - override val instantLinkLoading = true - override val hasQuickSearch = false - override val hasMainPage = true - - private fun getStatus(t: String): ShowStatus { - return when (t) { - "Finished" -> ShowStatus.Completed - "Releasing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - - override val supportedSyncNames = setOf(SyncIdName.Anilist, SyncIdName.MyAnimeList) - override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie) - - private val popularTitle = "Popular" - private val animeRecentTitle = "Latest Anime" - private val donghuaRecentTitle = "Latest Donghua" - private val movieTitle = "Movie" - - override val mainPage = mainPageOf( - """$apiUrl?variables={"search":{"sortBy":"Latest_Update","allowAdult":${settingsForProvider.enableAdult},"allowUnknown":false},"limit":26,"page":%d,"translationType":"sub","countryOrigin":"JP"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$mainHash"}}""" to animeRecentTitle, - """$apiUrl?variables={"search":{"sortBy":"Latest_Update","allowAdult":${settingsForProvider.enableAdult},"allowUnknown":false},"limit":26,"page":%d,"translationType":"sub","countryOrigin":"CN"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$mainHash"}}""" to donghuaRecentTitle, - """$apiUrl?variables={"type":"anime","size":30,"dateRange":1,"page":%d,"allowAdult":${settingsForProvider.enableAdult},"allowUnknown":false}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$popularHash"}}""" to popularTitle, - """$apiUrl?variables={"search":{"slug":"movie-anime","format":"anime","tagType":"upcoming","name":"Trending Movies"}}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$slugHash"}}""" to movieTitle - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - - val url = request.data.format(page) - val res = app.get(url, headers = headers).parsedSafe()?.data - val query = res?.shows ?: res?.queryPopular ?: res?.queryListForTag - val card = if(request.name == popularTitle) query?.recommendations?.map { it.anyCard } else query?.edges - val home = card?.filter { - // filtering in case there is an anime with 0 episodes available on the site. - !(it?.availableEpisodes?.raw == 0 && it.availableEpisodes.sub == 0 && it.availableEpisodes.dub == 0) - }?.mapNotNull { media -> - media?.toSearchResponse() - } ?: emptyList() - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - ), - hasNext = request.name != movieTitle - ) - } - - private fun Edges.toSearchResponse(): AnimeSearchResponse? { - - return newAnimeSearchResponse( - name ?: englishName ?: nativeName ?: "", - Id ?: return null, - fix = false - ) { - this.posterUrl = thumbnail - this.year = airedStart?.year - this.otherName = englishName - addDub(availableEpisodes?.dub) - addSub(availableEpisodes?.sub) - } - } - - override suspend fun search(query: String): List? { - - val link = - """$apiUrl?variables={"search":{"allowAdult":false,"allowUnknown":false,"query":"$query"},"limit":26,"page":1,"translationType":"sub","countryOrigin":"ALL"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$mainHash"}}""" - val res = app.get( - link, - headers = headers - ).text.takeUnless { it.contains("PERSISTED_QUERY_NOT_FOUND") } - // Retries - ?: app.get( - link, - headers = headers - ).text.takeUnless { it.contains("PERSISTED_QUERY_NOT_FOUND") } - ?: return emptyList() - - val response = parseJson(res) - - val results = response.data?.shows?.edges?.filter { - // filtering in case there is an anime with 0 episodes available on the site. - !(it.availableEpisodes?.raw == 0 && it.availableEpisodes.sub == 0 && it.availableEpisodes.dub == 0) - } - - return results?.map { - newAnimeSearchResponse(it.name ?: "", "${it.Id}", fix = false) { - this.posterUrl = it.thumbnail - this.year = it.airedStart?.year - this.otherName = it.englishName - addDub(it.availableEpisodes?.dub) - addSub(it.availableEpisodes?.sub) - } - } - } - - override suspend fun getLoadUrl(name: SyncIdName, id: String): String? { - val syncId = id.split("/").last() - val malId = if (name == SyncIdName.MyAnimeList) { - syncId - } else { - aniToMal(syncId) - } - - val media = app.get("$jikanApi/anime/$malId").parsedSafe()?.data - val link = - """$apiUrl?variables={"search":{"allowAdult":false,"allowUnknown":false,"query":"${media?.title}"},"limit":26,"page":1,"translationType":"sub","countryOrigin":"ALL"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$mainHash"}}""" - val res = app.get( - link, - headers = headers - ).parsedSafe()?.data?.shows?.edges - return res?.find { - (it.name.equals(media?.title, true) || it.englishName.equals( - media?.title_english, - true - ) || it.nativeName.equals(media?.title_japanese, true)) && it.airedStart?.year == media?.year - }?.Id - } - - override suspend fun load(url: String): LoadResponse? { - - val id = url.substringAfterLast("/") - // lazy to format - val body = """ - { - "query": " query(\n ${'$'}_id: String!\n ) {\n show(\n _id: ${'$'}_id\n ) {\n _id\n name\n description\n thumbnail\n thumbnails\n lastEpisodeInfo\n lastEpisodeDate \n type\n genres\n score\n status\n season\n altNames \n averageScore\n rating\n episodeCount\n episodeDuration\n broadcastInterval\n banner\n airedEnd\n airedStart \n studios\n characters\n availableEpisodesDetail\n availableEpisodes\n prevideos\n nameOnlyString\n relatedShows\n relatedMangas\n musics\n isAdult\n \n tags\n countryOfOrigin\n\n pageStatus{\n _id\n notes\n pageId\n showId\n \n # ranks:[Object]\n views\n likesCount\n commentCount\n dislikesCount\n reviewCount\n userScoreCount\n userScoreTotalValue\n userScoreAverValue\n viewers{\n firstViewers{\n viewCount\n lastWatchedDate\n user{\n _id\n displayName\n picture\n # description\n hideMe\n # createdAt\n # badges\n brief\n }\n \n }\n recViewers{\n viewCount\n lastWatchedDate\n user{\n _id\n displayName\n picture\n # description\n hideMe\n # createdAt\n # badges\n brief\n }\n \n }\n }\n\n }\n }\n }", - "extensions": "{\"persistedQuery\":{\"version\":1,\"sha256Hash\":\"$detailHash\"}}", - "variables": "{\"_id\":\"$id\"}" - } - """.trimIndent().trim().toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) - - val res = app.post(apiUrl, requestBody = body, headers = headers) - val showData = res.parsedSafe()?.data?.show ?: return null - - val title = showData.name - val description = showData.description - val poster = showData.thumbnail - - val trackers = getTracker( - title, - showData.altNames?.firstOrNull(), - showData.airedStart?.year, - showData.season?.quarter, - showData.type - ) - - val episodes = showData.availableEpisodesDetail.let { - if (it == null) return@let Pair(null, null) - if (showData.Id == null) return@let Pair(null, null) - Pair( - it.getEpisode("sub", showData.Id, trackers?.idMal), - it.getEpisode("dub", showData.Id, trackers?.idMal), - ) - } - - val characters = showData.characters?.map { - val role = when (it.role) { - "Main" -> ActorRole.Main - "Supporting" -> ActorRole.Supporting - "Background" -> ActorRole.Background - else -> null - } - val name = it.name?.full ?: it.name?.native ?: "" - val image = it.image?.large ?: it.image?.medium - Pair(Actor(name, image), role) - } - - return newAnimeLoadResponse(title ?: "", url, TvType.Anime) { - engName = showData.altNames?.firstOrNull() - posterUrl = trackers?.coverImage?.extraLarge ?: trackers?.coverImage?.large ?: poster - backgroundPosterUrl = trackers?.bannerImage ?: showData.banner - rating = showData.averageScore?.times(100) - tags = showData.genres - year = showData.airedStart?.year - duration = showData.episodeDuration?.div(60_000) - addTrailer(showData.prevideos.filter { it.isNotBlank() } - .map { "https://www.youtube.com/watch?v=$it" }) - addEpisodes(DubStatus.Subbed, episodes.first) - addEpisodes(DubStatus.Dubbed, episodes.second) - addActors(characters) - //this.recommendations = recommendations - - showStatus = getStatus(showData.status.toString()) - addMalId(trackers?.idMal) - addAniListId(trackers?.id) - plot = description?.replace(Regex("""<(.*?)>"""), "") - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val loadData = parseJson(data) - - argamap( - { - invokeInternalSources( - loadData.hash, - loadData.dubStatus, - loadData.episode, - subtitleCallback, - callback - ) - }, - { - invokeExternalSources( - loadData.idMal, - loadData.dubStatus, - loadData.episode, - subtitleCallback, - callback - ) - } - ) - - return true - } - - companion object { - const val apiUrl = BuildConfig.ANICHI_API - const val serverUrl = BuildConfig.ANICHI_SERVER - const val apiEndPoint = BuildConfig.ANICHI_ENDPOINT - - const val anilistApi = "https://graphql.anilist.co" - const val jikanApi = "https://api.jikan.moe/v4" - const val marinHost = "https://marin.moe" - - private const val mainHash = "e42a4466d984b2c0a2cecae5dd13aa68867f634b16ee0f17b380047d14482406" - private const val popularHash = "31a117653812a2547fd981632e8c99fa8bf8a75c4ef1a77a1567ef1741a7ab9c" - private const val slugHash = "bf603205eb2533ca21d0324a11f623854d62ed838a27e1b3fcfb712ab98b03f4" - private const val detailHash = "bb263f91e5bdd048c1c978f324613aeccdfe2cbc694a419466a31edb58c0cc0b" - const val serverHash = "5e7e17cdd0166af5a2d8f43133d9ce3ce9253d1fdb5160a0cfd515564f98d061" - - val headers = mapOf( - "app-version" to "android_c-247", - "from-app" to BuildConfig.ANICHI_APP, - "platformstr" to "android_c", - ) - } - -} \ No newline at end of file diff --git a/Anichi/src/main/kotlin/com/hexated/AnichiExtractors.kt b/Anichi/src/main/kotlin/com/hexated/AnichiExtractors.kt deleted file mode 100644 index 86d452ed..00000000 --- a/Anichi/src/main/kotlin/com/hexated/AnichiExtractors.kt +++ /dev/null @@ -1,218 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.apmap -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.argamap -import com.lagradost.cloudstream3.extractors.helper.GogoHelper -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.SubtitleHelper -import com.lagradost.cloudstream3.utils.httpsify -import com.lagradost.cloudstream3.utils.loadExtractor -import java.net.URI - -object AnichiExtractors : Anichi() { - - suspend fun invokeInternalSources( - hash: String, - dubStatus: String, - episode: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - ) { - val apiUrl = - """$apiUrl?variables={"showId":"$hash","translationType":"$dubStatus","episodeString":"$episode"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$serverHash"}}""" - val apiResponse = app.get(apiUrl, headers = headers).parsed() - - apiResponse.data?.episode?.sourceUrls?.apmap { source -> - safeApiCall { - val link = fixSourceUrls(source.sourceUrl ?: return@safeApiCall, source.sourceName) - ?: return@safeApiCall - if (URI(link).isAbsolute || link.startsWith("//")) { - val fixedLink = if (link.startsWith("//")) "https:$link" else link - val host = link.getHost() - - when { - fixedLink.contains(Regex("(?i)playtaku|gogo")) || source.sourceName == "Vid-mp4" -> { - invokeGogo(fixedLink, subtitleCallback, callback) - } - - embedIsBlacklisted(fixedLink) -> { - loadExtractor(fixedLink, subtitleCallback, callback) - } - - URI(fixedLink).path.contains(".m3u") -> { - getM3u8Qualities(fixedLink, serverUrl, host).forEach(callback) - } - - else -> { - callback( - ExtractorLink( - name, - host, - fixedLink, - serverUrl, - Qualities.P1080.value, - false - ) - ) - } - } - } else { - val fixedLink = link.fixUrlPath() - val links = app.get(fixedLink).parsedSafe()?.links - ?: emptyList() - links.forEach { server -> - val host = server.link.getHost() - when { - source.sourceName?.contains("Default") == true -> { - if (server.resolutionStr == "SUB" || server.resolutionStr == "Alt vo_SUB") { - getM3u8Qualities( - server.link, - "https://static.crunchyroll.com/", - host, - ).forEach(callback) - } - } - - server.hls != null && server.hls -> { - getM3u8Qualities( - server.link, - "$apiEndPoint/player?uri=" + (if (URI(server.link).host.isNotEmpty()) server.link else apiEndPoint + URI( - server.link - ).path), - host - ).forEach(callback) - } - - else -> { - callback( - ExtractorLink( - host, - host, - server.link, - "$apiEndPoint/player?uri=" + (if (URI(server.link).host.isNotEmpty()) server.link else apiEndPoint + URI( - server.link - ).path), - server.resolutionStr.removeSuffix("p").toIntOrNull() - ?: Qualities.P1080.value, - false, - isDash = server.resolutionStr == "Dash 1" - ) - ) - server.subtitles?.map { sub -> - subtitleCallback.invoke( - SubtitleFile( - SubtitleHelper.fromTwoLettersToLanguage(sub.lang ?: "") - ?: sub.lang ?: "", - httpsify(sub.src ?: return@map) - ) - ) - } - } - } - } - } - } - } - } - - suspend fun invokeExternalSources( - idMal: Int? = null, - dubStatus: String, - episode: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - ) { - val ids = app.get("https://api.malsync.moe/mal/anime/${idMal ?: return}") - .parsedSafe()?.sites - - if (dubStatus == "sub") invokeMarin(ids?.marin?.keys?.firstOrNull(), episode, callback) - - } - - private suspend fun invokeMarin( - id: String? = null, - episode: String, - callback: (ExtractorLink) -> Unit - ) { - val url = "$marinHost/anime/${id ?: return}/$episode" - val cookies = app.get( - "$marinHost/anime", - headers = mapOf( - "Cookie" to "__ddg1_=;__ddg2_=;" - ), - referer = "$marinHost/anime", - ).cookies.let { - decode(it["XSRF-TOKEN"].toString()) to decode(it["marin_session"].toString()) - } - - val json = app.get( - url, - headers = mapOf( - "Accept" to "text/html, application/xhtml+xml", - "Cookie" to "__ddg1=;__ddg2_=;XSRF-TOKEN=${cookies.first};marin_session=${cookies.second};", - "X-XSRF-TOKEN" to cookies.first - ), - referer = "$marinHost/anime/$id" - ).document.selectFirst("div#app")?.attr("data-page") - tryParseJson(json)?.props?.video?.data?.mirror?.map { video -> - callback.invoke( - ExtractorLink( - "Marin", - "Marin", - video.code?.file ?: return@map, - url, - video.code.height ?: Qualities.Unknown.value, - headers = mapOf( - "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", - "Accept-Language" to "en-US,en;q=0.5", - "Cookie" to "__ddg1=;__ddg2_=; XSRF-TOKEN=${cookies.first}; marin_session=${cookies.second};", - "Connection" to "keep-alive", - "Sec-Fetch-Dest" to "video", - "Sec-Fetch-Mode" to "cors", - "Sec-Fetch-Site" to "cross-site", - ) - ) - ) - } - } - - private suspend fun invokeGogo( - link: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val iframe = app.get(link) - val iframeDoc = iframe.document - argamap({ - iframeDoc.select(".list-server-items > .linkserver") - .forEach { element -> - val status = element.attr("data-status") ?: return@forEach - if (status != "1") return@forEach - val extractorData = element.attr("data-video") ?: return@forEach - loadExtractor(extractorData, iframe.url, subtitleCallback, callback) - } - }, { - val iv = "3134003223491201" - val secretKey = "37911490979715163134003223491201" - val secretDecryptKey = "54674138327930866480207815084989" - GogoHelper.extractVidstream( - iframe.url, - "Gogoanime", - callback, - iv, - secretKey, - secretDecryptKey, - isUsingAdaptiveKeys = false, - isUsingAdaptiveData = true, - iframeDocument = iframeDoc - ) - }) - } - -} \ No newline at end of file diff --git a/Anichi/src/main/kotlin/com/hexated/AnichiParser.kt b/Anichi/src/main/kotlin/com/hexated/AnichiParser.kt deleted file mode 100644 index 6cbe56ec..00000000 --- a/Anichi/src/main/kotlin/com/hexated/AnichiParser.kt +++ /dev/null @@ -1,292 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty - -data class AnichiLoadData( - val hash: String, - val dubStatus: String, - val episode: String, - val idMal: Int? = null, -) - -data class JikanData( - @JsonProperty("title") val title: String? = null, - @JsonProperty("title_english") val title_english: String? = null, - @JsonProperty("title_japanese") val title_japanese: String? = null, - @JsonProperty("year") val year: Int? = null, - @JsonProperty("season") val season: String? = null, - @JsonProperty("type") val type: String? = null, -) - -data class JikanResponse( - @JsonProperty("data") val data: JikanData? = null, -) - -data class IdMal( - @JsonProperty("idMal") val idMal: String? = null, -) - -data class MediaAni( - @JsonProperty("Media") val media: IdMal? = null, -) - -data class DataAni( - @JsonProperty("data") val data: MediaAni? = null, -) - -data class CoverImage( - @JsonProperty("extraLarge") var extraLarge: String? = null, - @JsonProperty("large") var large: String? = null, -) - -data class AniMedia( - @JsonProperty("id") var id: Int? = null, - @JsonProperty("idMal") var idMal: Int? = null, - @JsonProperty("coverImage") var coverImage: CoverImage? = null, - @JsonProperty("bannerImage") var bannerImage: String? = null, -) - -data class AniPage( - @JsonProperty("media") var media: ArrayList = arrayListOf() -) - -data class AniData( - @JsonProperty("Page") var Page: AniPage? = AniPage() -) - -data class AniSearch( - @JsonProperty("data") var data: AniData? = AniData() -) - -data class AkIframe( - @JsonProperty("idUrl") val idUrl: String? = null, -) - -data class Stream( - @JsonProperty("format") val format: String? = null, - @JsonProperty("audio_lang") val audio_lang: String? = null, - @JsonProperty("hardsub_lang") val hardsub_lang: String? = null, - @JsonProperty("url") val url: String? = null, -) - -data class PortData( - @JsonProperty("streams") val streams: ArrayList? = arrayListOf(), -) - -data class Subtitles( - @JsonProperty("lang") val lang: String?, - @JsonProperty("label") val label: String?, - @JsonProperty("src") val src: String?, -) - -data class Links( - @JsonProperty("link") val link: String, - @JsonProperty("hls") val hls: Boolean?, - @JsonProperty("resolutionStr") val resolutionStr: String, - @JsonProperty("src") val src: String?, - @JsonProperty("portData") val portData: PortData? = null, - @JsonProperty("subtitles") val subtitles: ArrayList? = arrayListOf(), -) - -data class AnichiVideoApiResponse( - @JsonProperty("links") val links: List -) - -data class Data( - @JsonProperty("shows") val shows: Shows? = null, - @JsonProperty("queryListForTag") val queryListForTag: Shows? = null, - @JsonProperty("queryPopular") val queryPopular: Shows? = null, -) - -data class Shows( - @JsonProperty("edges") val edges: List? = arrayListOf(), - @JsonProperty("recommendations") val recommendations: List? = arrayListOf(), -) - -data class EdgesCard( - @JsonProperty("anyCard") val anyCard: Edges? = null, -) - -data class CharacterImage( - @JsonProperty("large") val large: String?, - @JsonProperty("medium") val medium: String? -) - -data class CharacterName( - @JsonProperty("full") val full: String?, - @JsonProperty("native") val native: String? -) - -data class Characters( - @JsonProperty("image") val image: CharacterImage?, - @JsonProperty("role") val role: String?, - @JsonProperty("name") val name: CharacterName?, -) - -data class Edges( - @JsonProperty("_id") val Id: String?, - @JsonProperty("name") val name: String?, - @JsonProperty("englishName") val englishName: String?, - @JsonProperty("nativeName") val nativeName: String?, - @JsonProperty("thumbnail") val thumbnail: String?, - @JsonProperty("type") val type: String?, - @JsonProperty("season") val season: Season?, - @JsonProperty("score") val score: Double?, - @JsonProperty("airedStart") val airedStart: AiredStart?, - @JsonProperty("availableEpisodes") val availableEpisodes: AvailableEpisodes?, - @JsonProperty("availableEpisodesDetail") val availableEpisodesDetail: AvailableEpisodesDetail?, - @JsonProperty("studios") val studios: List?, - @JsonProperty("genres") val genres: List?, - @JsonProperty("averageScore") val averageScore: Int?, - @JsonProperty("characters") val characters: List?, - @JsonProperty("altNames") val altNames: List?, - @JsonProperty("description") val description: String?, - @JsonProperty("status") val status: String?, - @JsonProperty("banner") val banner: String?, - @JsonProperty("episodeDuration") val episodeDuration: Int?, - @JsonProperty("prevideos") val prevideos: List = emptyList(), -) - -data class AvailableEpisodes( - @JsonProperty("sub") val sub: Int, - @JsonProperty("dub") val dub: Int, - @JsonProperty("raw") val raw: Int -) - -data class AiredStart( - @JsonProperty("year") val year: Int, - @JsonProperty("month") val month: Int, - @JsonProperty("date") val date: Int -) - -data class Season( - @JsonProperty("quarter") val quarter: String, - @JsonProperty("year") val year: Int -) - -data class AnichiQuery( - @JsonProperty("data") val data: Data? = null -) - -data class Detail( - @JsonProperty("data") val data: DetailShow -) - -data class DetailShow( - @JsonProperty("show") val show: Edges -) - -data class AvailableEpisodesDetail( - @JsonProperty("sub") val sub: List, - @JsonProperty("dub") val dub: List, - @JsonProperty("raw") val raw: List -) - -data class LinksQuery( - @JsonProperty("data") val data: LinkData? = LinkData() -) - -data class LinkData( - @JsonProperty("episode") val episode: Episode? = Episode() -) - -data class SourceUrls( - @JsonProperty("sourceUrl") val sourceUrl: String? = null, - @JsonProperty("priority") val priority: Int? = null, - @JsonProperty("sourceName") val sourceName: String? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("className") val className: String? = null, - @JsonProperty("streamerId") val streamerId: String? = null -) - -data class Episode( - @JsonProperty("sourceUrls") val sourceUrls: ArrayList = arrayListOf(), -) - -data class Sub( - @JsonProperty("hour") val hour: Int? = null, - @JsonProperty("minute") val minute: Int? = null, - @JsonProperty("year") val year: Int? = null, - @JsonProperty("month") val month: Int? = null, - @JsonProperty("date") val date: Int? = null -) - -data class LastEpisodeDate( - @JsonProperty("dub") val dub: Sub? = Sub(), - @JsonProperty("sub") val sub: Sub? = Sub(), - @JsonProperty("raw") val raw: Sub? = Sub() -) - -data class AnyCard( - @JsonProperty("_id") val Id: String? = null, - @JsonProperty("name") val name: String? = null, - @JsonProperty("englishName") val englishName: String? = null, - @JsonProperty("nativeName") val nativeName: String? = null, - @JsonProperty("availableEpisodes") val availableEpisodes: AvailableEpisodes? = null, - @JsonProperty("score") val score: Double? = null, - @JsonProperty("lastEpisodeDate") val lastEpisodeDate: LastEpisodeDate? = LastEpisodeDate(), - @JsonProperty("thumbnail") val thumbnail: String? = null, - @JsonProperty("lastChapterDate") val lastChapterDate: String? = null, - @JsonProperty("availableChapters") val availableChapters: String? = null, - @JsonProperty("__typename") val _typename: String? = null -) - -data class PageStatus( - @JsonProperty("_id") val Id: String? = null, - @JsonProperty("views") val views: String? = null, - @JsonProperty("showId") val showId: String? = null, - @JsonProperty("rangeViews") val rangeViews: String? = null, - @JsonProperty("isManga") val isManga: Boolean? = null, - @JsonProperty("__typename") val _typename: String? = null -) - - -data class Recommendations( - @JsonProperty("anyCard") val anyCard: AnyCard? = null, - @JsonProperty("pageStatus") val pageStatus: PageStatus? = PageStatus(), - @JsonProperty("__typename") val _typename: String? = null -) - -data class QueryPopular( - @JsonProperty("total") val total: Int? = null, - @JsonProperty("recommendations") val recommendations: ArrayList = arrayListOf(), - @JsonProperty("__typename") val _typename: String? = null -) - -data class DataPopular( - @JsonProperty("queryPopular") val queryPopular: QueryPopular? = QueryPopular() -) - -data class MALSyncSites( - @JsonProperty("Zoro") val zoro: HashMap>? = hashMapOf(), - @JsonProperty("Marin") val marin: HashMap>? = hashMapOf(), -) - -data class MALSyncResponses( - @JsonProperty("Sites") val sites: MALSyncSites? = null, -) - -data class MarinCode( - @JsonProperty("file") val file: String? = null, - @JsonProperty("height") val height: Int? = null, -) - -data class MarinMirror( - @JsonProperty("code") val code: MarinCode? = null, -) - -data class MarinData( - @JsonProperty("mirror") val mirror: ArrayList? = arrayListOf(), -) - -data class MarinVideos( - @JsonProperty("data") val data: MarinData? = null, -) - -data class MarinProps( - @JsonProperty("video") val video: MarinVideos? = null, -) - -data class MarinResponses( - @JsonProperty("props") val props: MarinProps? = null, -) \ No newline at end of file diff --git a/Anichi/src/main/kotlin/com/hexated/AnichiPlugin.kt b/Anichi/src/main/kotlin/com/hexated/AnichiPlugin.kt deleted file mode 100644 index 6fbec8d3..00000000 --- a/Anichi/src/main/kotlin/com/hexated/AnichiPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnichiPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Anichi()) - } -} \ No newline at end of file diff --git a/Anichi/src/main/kotlin/com/hexated/AnichiUtils.kt b/Anichi/src/main/kotlin/com/hexated/AnichiUtils.kt deleted file mode 100644 index 42d3242f..00000000 --- a/Anichi/src/main/kotlin/com/hexated/AnichiUtils.kt +++ /dev/null @@ -1,147 +0,0 @@ -package com.hexated - -import com.hexated.Anichi.Companion.anilistApi -import com.hexated.Anichi.Companion.apiEndPoint -import com.lagradost.cloudstream3.Episode -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.base64Decode -import com.lagradost.cloudstream3.fixTitle -import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.nicehttp.RequestBodyTypes -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.RequestBody.Companion.toRequestBody -import java.net.URI -import java.net.URLDecoder - -suspend fun getTracker(name: String?, altName: String?, year: Int?, season: String?, type: String?): AniMedia? { - return fetchId(name, year, season, type).takeIf { it?.id != null } ?: fetchId( - altName, - year, - season, - type - ) -} - -suspend fun fetchId(title: String?, year: Int?, season: String?, type: String?): AniMedia? { - val query = """ - query ( - ${'$'}page: Int = 1 - ${'$'}search: String - ${'$'}sort: [MediaSort] = [POPULARITY_DESC, SCORE_DESC] - ${'$'}type: MediaType - ${'$'}season: MediaSeason - ${'$'}year: String - ${'$'}format: [MediaFormat] - ) { - Page(page: ${'$'}page, perPage: 20) { - media( - search: ${'$'}search - sort: ${'$'}sort - type: ${'$'}type - season: ${'$'}season - startDate_like: ${'$'}year - format_in: ${'$'}format - ) { - id - idMal - coverImage { extraLarge large } - bannerImage - } - } - } - """.trimIndent().trim() - - val variables = mapOf( - "search" to title, - "sort" to "SEARCH_MATCH", - "type" to "ANIME", - "season" to if(type.equals("ona", true)) "" else season?.uppercase(), - "year" to "$year%", - "format" to listOf(type?.uppercase()) - ).filterValues { value -> value != null && value.toString().isNotEmpty() } - - val data = mapOf( - "query" to query, - "variables" to variables - ).toJson().toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) - - return try { - app.post(anilistApi, requestBody = data) - .parsedSafe()?.data?.Page?.media?.firstOrNull() - } catch (t: Throwable) { - logError(t) - null - } - -} - -suspend fun aniToMal(id: String): String? { - return app.post( - anilistApi, data = mapOf( - "query" to "{Media(id:$id,type:ANIME){idMal}}", - ) - ).parsedSafe()?.data?.media?.idMal -} - -fun decode(input: String): String = URLDecoder.decode(input, "utf-8") - -private val embedBlackList = listOf( - "https://mp4upload.com/", - "https://streamsb.net/", - "https://dood.to/", - "https://videobin.co/", - "https://ok.ru", - "https://streamlare.com", - "https://filemoon", - "streaming.php", -) - -fun embedIsBlacklisted(url: String): Boolean { - return embedBlackList.any { url.contains(it) } -} - -fun AvailableEpisodesDetail.getEpisode( - lang: String, - id: String, - malId: Int?, -): List { - val meta = if (lang == "sub") this.sub else this.dub - return meta.map { eps -> - Episode( - AnichiLoadData(id, lang, eps, malId).toJson(), - episode = eps.toIntOrNull() - ) - }.reversed() -} - -suspend fun getM3u8Qualities( - m3u8Link: String, - referer: String, - qualityName: String, -): List { - return M3u8Helper.generateM3u8( - qualityName, - m3u8Link, - referer, - ) -} - -fun String.getHost(): String { - return fixTitle(URI(this).host.substringBeforeLast(".").substringAfterLast(".")) -} - -fun String.fixUrlPath() : String { - return if(this.contains(".json?")) apiEndPoint + this else apiEndPoint + URI(this).path + ".json?" + URI(this).query -} - -fun fixSourceUrls(url: String, source: String?) : String? { - return if(source == "Ak" || url.contains("/player/vitemb")) { - AppUtils.tryParseJson(base64Decode(url.substringAfter("=")))?.idUrl - } else { - url.replace(" ", "%20") - } -} \ No newline at end of file diff --git a/Anifreakz/build.gradle.kts b/Anifreakz/build.gradle.kts deleted file mode 100644 index 83b7a132..00000000 --- a/Anifreakz/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 1 - - -cloudstream { - language = "de" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 0 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=anifreakz.com&sz=%size%" -} \ No newline at end of file diff --git a/Anifreakz/src/main/AndroidManifest.xml b/Anifreakz/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Anifreakz/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Anifreakz/src/main/kotlin/com/hexated/Anifreakz.kt b/Anifreakz/src/main/kotlin/com/hexated/Anifreakz.kt deleted file mode 100644 index 32d9b7e4..00000000 --- a/Anifreakz/src/main/kotlin/com/hexated/Anifreakz.kt +++ /dev/null @@ -1,193 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.getAndUnpack -import org.jsoup.nodes.Element -import java.net.URLDecoder - -class Anifreakz : MainAPI() { - override var mainUrl = "https://anifreakz.com" - override var name = "Anifreakz" - override val hasMainPage = true - override var lang = "de" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - override val mainPage = mainPageOf( - "$mainUrl/series?filter=null&page=" to "Anime Neuste", - "$mainUrl/series?filter={\"sorting\":\"popular\"}&page=" to "Anime Angesagt", - "$mainUrl/series?filter={\"sorting\":\"released\"}&page=" to "Anime Veröffentlicht", - "$mainUrl/kalender" to "Anime Kalender", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val items = mutableListOf() - val nonPaged = request.name == "Anime Kalender" && page <= 1 - - if (!nonPaged) { - val document = app.get(request.data + page).document - val home = document.select("div.app-section div.col").mapNotNull { - it.toSearchResult() - } - items.add(HomePageList(request.name, home)) - } - - if (nonPaged) { - val document = app.get(request.data).document - document.select("div.app-content div.app-section").forEach { block -> - val header = block.selectFirst("div.app-heading div.text")?.ownText() ?: "" - val home = block.select("div.col").mapNotNull { - it.toSearchResult() - } - items.add(HomePageList(header, home)) - } - } - - return newHomePageResponse(items) - - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null) - val title = this.selectFirst("a.list-title")?.text()?.trim() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("div.media-cover")?.attr("data-src")) - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - } - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search/$query").document - return document.select("div.app-section div.col").mapNotNull { - it.toSearchResult() - } - } - - private fun decode(input: String): String? = URLDecoder.decode(input, "utf-8") - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = - document.selectFirst("div.pl-md-4 h1, div.caption-content h1")?.text() ?: return null - val poster = fixUrlNull(document.selectFirst("div.media.media-cover")?.attr("data-src")) - val tags = document.select("div.categories a").map { it.text() } - val rating = document.selectFirst("div.featured-box div:contains(IMDB) div.text")?.text() - .toRatingInt() - val year = - document.selectFirst("div.featured-box div:contains(Veröffentlicht) div.text")?.text() - ?.trim()?.toIntOrNull() - val type = if (document.select("div.episodes.tab-content") - .isNullOrEmpty() - ) TvType.Movie else TvType.TvSeries - val description = - document.select("div.detail-attr div.text-content, div.caption div:contains(Übersicht) div.text") - .text().trim() - val trailer = document.selectFirst("button:contains(Trailer)")?.attr("data-remote") - ?.substringAfter("?trailer=")?.let { - decode(it) - } - - return if (type == TvType.Movie) { - newMovieLoadResponse(title, url, type, url) { - posterUrl = poster - this.year = year - this.rating = rating - plot = description - this.tags = tags - addTrailer(trailer) - } - } else { - val subEpisodes = mutableListOf() - document.select("div.episodes.tab-content div[id*=season-]").forEach { season -> - val seasonNum = season.attr("id").substringAfterLast("-").toIntOrNull() - season.select("a").map { eps -> - val href = eps.attr("href") - val name = eps.select("div.name").text() - val episode = - eps.select("div.episode").text().substringBefore(".").toIntOrNull() - val episodes = Episode( - href, - name, - seasonNum, - episode - ) - subEpisodes.add(episodes) - } - } - newAnimeLoadResponse(title, url, type) { - posterUrl = poster - this.year = year - addEpisodes(DubStatus.Subbed, subEpisodes) - this.rating = rating - plot = description - this.tags = tags - addTrailer(trailer) - } - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - - val servers = mutableListOf>() - - document.select("div[aria-labelledby=videoSource] button").map { - servers.add(it.attr("data-embed") to it.text()) - } - - document.select("div.nav-player-select a").map { - servers.add(it.attr("data-embed") to it.select("span").text()) - } - - servers.distinctBy { it.first }.apmap { (id, source) -> - val iframe = app.post( - "$mainUrl/ajax/embed", - data = mapOf("id" to id, "captcha" to ""), - headers = mapOf( - "X-Requested-With" to "XMLHttpRequest" - ), - referer = data - ).document.select("iframe").attr("src") - val doc = app.get(iframe, referer = "$mainUrl/").document - val link = - unpackJs(doc)?.substringAfter("file:\"")?.substringBefore("\"") ?: return@apmap null - callback.invoke( - ExtractorLink( - source, - source, - link, - "https://filemoon.sx/", - Qualities.Unknown.value, - isM3u8 = link.contains(".m3u8") - ) - ) - } - - return true - } - - private fun unpackJs(script: Element): String? { - return script.select("script").find { it.data().contains("eval(function(p,a,c,k,e,d)") } - ?.data()?.let { getAndUnpack(it) } - } - -} \ No newline at end of file diff --git a/Anifreakz/src/main/kotlin/com/hexated/AnifreakzPlugin.kt b/Anifreakz/src/main/kotlin/com/hexated/AnifreakzPlugin.kt deleted file mode 100644 index 5de45031..00000000 --- a/Anifreakz/src/main/kotlin/com/hexated/AnifreakzPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnifreakzPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Anifreakz()) - } -} \ No newline at end of file diff --git a/Anilibria/build.gradle.kts b/Anilibria/build.gradle.kts deleted file mode 100644 index 061d5f39..00000000 --- a/Anilibria/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 2 - - -cloudstream { - language = "ru" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "OVA", - "Anime", - ) - - iconUrl = "https://raw.githubusercontent.com/hexated/cloudstream-extensions-hexated/master/Anilibria/icon.png" -} \ No newline at end of file diff --git a/Anilibria/icon.png b/Anilibria/icon.png deleted file mode 100644 index 844b3684..00000000 Binary files a/Anilibria/icon.png and /dev/null differ diff --git a/Anilibria/src/main/AndroidManifest.xml b/Anilibria/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Anilibria/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Anilibria/src/main/kotlin/com/hexated/Anilibria.kt b/Anilibria/src/main/kotlin/com/hexated/Anilibria.kt deleted file mode 100644 index c51afb3c..00000000 --- a/Anilibria/src/main/kotlin/com/hexated/Anilibria.kt +++ /dev/null @@ -1,197 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.getQualityFromName -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -class Anilibria : MainAPI() { - override var mainUrl = "https://anilibria.tv" - override var name = "Anilibria" - override val hasMainPage = true - override var lang = "ru" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String): TvType { - return when { - t.contains("Фильм", true) -> TvType.Movie - t.contains("ТВ", true) -> TvType.Anime - else -> TvType.OVA - } - } - } - - override val mainPage = mainPageOf( - "1" to "Новое", - "2" to "Популярное", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.post( - "$mainUrl/public/catalog.php", data = mapOf( - "page" to "$page", - "xpage" to "catalog", - "sort" to request.data, - "finish" to "1", - "search" to "{\"year\":\"\",\"genre\":\"\",\"season\":\"\"}" - ), headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.table?.let { Jsoup.parse(it) } - val home = document?.select("a")?.mapNotNull { - it.toSearchResult() - } ?: throw ErrorLoadingException("Invalid json responses") - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = fixUrl(this.attr("href")) - val title = this.selectFirst("span")?.text() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addDubStatus(isDub = true) - } - } - - override suspend fun search(query: String): List { - val document = app.post( - "$mainUrl/public/search.php", - data = mapOf("search" to query, "small" to "1"), - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.mes?.let { Jsoup.parse(it) } - - return document?.select("a")?.mapNotNull { - it.toSearchResult() - } ?: throw ErrorLoadingException("Invalid json responses") - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.release-title")?.text() ?: return null - val poster = fixUrlNull(document.selectFirst("img#adminPoster")?.attr("src")) - val trackTitle = (document.selectFirst("h1.release-title br")?.nextSibling() - ?: document.selectFirst("h1.release-title")?.text()?.substringAfter("/")?.trim()).toString() - val type = document.selectFirst("div#xreleaseInfo b:contains(Тип:)")?.nextSibling() - .toString().substringBefore(",").trim() - val trackType = type.let { - if(it.contains("Фильм", true)) "movie" else "tv" - } - val year = document.selectFirst("div#xreleaseInfo b:contains(Сезон:)")?.nextElementSibling() - ?.text()?.filter { it.isDigit() }?.toIntOrNull() - val (malId, anilistId, image, cover) = getTracker(trackTitle, trackType, year) - val episodes = document.select("script").find { it.data().contains("var player =") }?.data() - ?.substringAfter("file:[")?.substringBefore("],")?.let { data -> - tryParseJson>("[$data]")?.mapNotNull { eps -> - Episode( - eps.file ?: return@mapNotNull null, - name = eps.title ?: return@mapNotNull null, - posterUrl = fixUrlNull(eps.poster), - ) - } - } - return newAnimeLoadResponse(title, url, getType(type)) { - posterUrl = image ?: poster - backgroundPosterUrl = cover ?: image ?: poster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - plot = document.select("p.detail-description").text().trim() - this.tags = document.selectFirst("div#xreleaseInfo b:contains(Жанры:)")?.nextSibling() - .toString().split(",").map { it.trim() } - addMalId(malId) - addAniListId(anilistId?.toIntOrNull()) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - data.split(",").map { it.trim() }.map { m3u -> - val quality = Regex("\\[([0-9]+p)]").find(m3u)?.groupValues?.getOrNull(1) - val link = m3u.removePrefix("[$quality]").trim() - callback.invoke( - ExtractorLink( - this.name, - this.name, - link, - "$mainUrl/", - getQualityFromName(quality), - true - ) - ) - } - - return true - } - - private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker { - val res = app.get("https://api.consumet.org/meta/anilist/$title") - .parsedSafe()?.results?.find { media -> - (media.title?.english.equals(title, true) || media.title?.romaji.equals( - title, - true - )) || (media.type.equals(type, true) && media.releaseDate == year) - } - return Tracker(res?.malId, res?.aniId, res?.image, res?.cover) - } - - data class Tracker( - val malId: Int? = null, - val aniId: String? = null, - val image: String? = null, - val cover: String? = null, - ) - - data class Title( - @JsonProperty("romaji") val romaji: String? = null, - @JsonProperty("english") val english: String? = null, - ) - - data class Results( - @JsonProperty("id") val aniId: String? = null, - @JsonProperty("malId") val malId: Int? = null, - @JsonProperty("title") val title: Title? = null, - @JsonProperty("releaseDate") val releaseDate: Int? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("image") val image: String? = null, - @JsonProperty("cover") val cover: String? = null, - ) - - data class AniSearch( - @JsonProperty("results") val results: ArrayList? = arrayListOf(), - ) - - private data class Episodes( - @JsonProperty("file") val file: String? = null, - @JsonProperty("title") val title: String? = null, - @JsonProperty("poster") val poster: String? = null, - ) - - private data class Home( - @JsonProperty("table") val table: String? = null, - ) - - private data class Search( - @JsonProperty("mes") val mes: String? = null, - ) - -} \ No newline at end of file diff --git a/Anilibria/src/main/kotlin/com/hexated/AnilibriaPlugin.kt b/Anilibria/src/main/kotlin/com/hexated/AnilibriaPlugin.kt deleted file mode 100644 index d813fb25..00000000 --- a/Anilibria/src/main/kotlin/com/hexated/AnilibriaPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnilibriaPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Anilibria()) - } -} \ No newline at end of file diff --git a/Animasu/build.gradle.kts b/Animasu/build.gradle.kts deleted file mode 100644 index 24d134e7..00000000 --- a/Animasu/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 9 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "OVA", - "Anime", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=animasu.cc&sz=%size%" -} \ No newline at end of file diff --git a/Animasu/src/main/AndroidManifest.xml b/Animasu/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/Animasu/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Animasu/src/main/kotlin/com/hexated/Animasu.kt b/Animasu/src/main/kotlin/com/hexated/Animasu.kt deleted file mode 100644 index 2b1cdf7d..00000000 --- a/Animasu/src/main/kotlin/com/hexated/Animasu.kt +++ /dev/null @@ -1,191 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.* -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -class Animasu : MainAPI() { - override var mainUrl = "https://animasu.win" - override var name = "Animasu" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String?): TvType { - if(t == null) return TvType.Anime - return when { - t.contains("Tv", true) -> TvType.Anime - t.contains("Movie", true) -> TvType.AnimeMovie - t.contains("OVA", true) || t.contains("Special", true) -> TvType.OVA - else -> TvType.Anime - } - } - - fun getStatus(t: String?): ShowStatus { - if(t == null) return ShowStatus.Completed - return when { - t.contains("Sedang Tayang", true) -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "urutan=update" to "Baru diupdate", - "status=&tipe=&urutan=publikasi" to "Baru ditambahkan", - "status=&tipe=&urutan=populer" to "Terpopuler", - "status=&tipe=&urutan=rating" to "Rating Tertinggi", - "status=&tipe=Movie&urutan=update" to "Movie Terbaru", - "status=&tipe=Movie&urutan=populer" to "Movie Terpopuler", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val document = app.get("$mainUrl/pencarian/?${request.data}&halaman=$page").document - val home = document.select("div.listupd div.bs").map { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("/anime/")) { - uri - } else { - var title = uri.substringAfter("$mainUrl/") - title = when { - (title.contains("-episode")) && !(title.contains("-movie")) -> title.substringBefore( - "-episode" - ) - - (title.contains("-movie")) -> title.substringBefore("-movie") - else -> title - } - - "$mainUrl/anime/$title" - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse { - val href = getProperAnimeLink(fixUrlNull(this.selectFirst("a")?.attr("href")).toString()) - val title = this.select("div.tt").text().trim() - val posterUrl = fixUrlNull(this.selectFirst("img")?.getImageAttr()) - val epNum = this.selectFirst("span.epx")?.text()?.filter { it.isDigit() }?.toIntOrNull() - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - return app.get("$mainUrl/?s=$query").document.select("div.listupd div.bs").map { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("div.infox h1")?.text().toString().replace("Sub Indo", "").trim() - val poster = document.selectFirst("div.bigcontent img")?.getImageAttr() - - val table = document.selectFirst("div.infox div.spe") - val type = getType(table?.selectFirst("span:contains(Jenis:)")?.ownText()) - val year = table?.selectFirst("span:contains(Rilis:)")?.ownText()?.substringAfterLast(",")?.trim()?.toIntOrNull() - val status = table?.selectFirst("span:contains(Status:) font")?.text() - val trailer = document.selectFirst("div.trailer iframe")?.attr("src") - val episodes = document.select("ul#daftarepisode > li").map { - val link = fixUrl(it.selectFirst("a")!!.attr("href")) - val name = it.selectFirst("a")?.text() ?: "" - val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull() - Episode(link, episode = episode) - }.reversed() - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = getStatus(status) - plot = document.select("div.sinopsis p").text() - this.tags = table?.select("span:contains(Genre:) a")?.map { it.text() } - addTrailer(trailer) - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - document.select(".mobius > .mirror > option").mapNotNull { - fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src")) to it.text() - }.apmap { (iframe, quality) -> - loadFixedExtractor(iframe.fixIframe(), quality, "$mainUrl/", subtitleCallback, callback) - } - return true - } - - private suspend fun loadFixedExtractor( - url: String, - quality: String?, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - if(link.type == ExtractorLinkType.M3U8 || link.name == "Uservideo") link.quality else getIndexQuality(quality), - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun String.fixIframe() : String { - return if(this.startsWith("https://dl.berkasdrive.com")) { - base64Decode(this.substringAfter("id=")) - } else { - this - } - } - - private fun getIndexQuality(str: String?): Int { - return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull() - ?: Qualities.Unknown.value - } - - private fun Element.getImageAttr(): String? { - return when { - this.hasAttr("data-src") -> this.attr("abs:data-src") - this.hasAttr("data-lazy-src") -> this.attr("abs:data-lazy-src") - this.hasAttr("srcset") -> this.attr("abs:srcset").substringBefore(" ") - else -> this.attr("abs:src") - } - } - -} \ No newline at end of file diff --git a/Animasu/src/main/kotlin/com/hexated/AnimasuPlugin.kt b/Animasu/src/main/kotlin/com/hexated/AnimasuPlugin.kt deleted file mode 100644 index 5ef35841..00000000 --- a/Animasu/src/main/kotlin/com/hexated/AnimasuPlugin.kt +++ /dev/null @@ -1,17 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnimasuPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Animasu()) - registerExtractorAPI(Archivd()) - registerExtractorAPI(Newuservideo()) - registerExtractorAPI(Vidhidepro()) - } -} \ No newline at end of file diff --git a/Animasu/src/main/kotlin/com/hexated/Extractors.kt b/Animasu/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index dfd08840..00000000 --- a/Animasu/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,108 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.INFER_TYPE -import com.lagradost.cloudstream3.utils.Qualities - -class Archivd : ExtractorApi() { - override val name: String = "Archivd" - override val mainUrl: String = "https://archivd.net" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val res = app.get(url).document - val json = res.select("div#app").attr("data-page") - val video = AppUtils.tryParseJson(json)?.props?.datas?.data?.link?.media - callback.invoke( - ExtractorLink( - this.name, - this.name, - video ?: return, - "$mainUrl/", - Qualities.Unknown.value, - INFER_TYPE - ) - ) - } - - data class Link( - @JsonProperty("media") val media: String? = null, - ) - - data class Data( - @JsonProperty("link") val link: Link? = null, - ) - - data class Datas( - @JsonProperty("data") val data: Data? = null, - ) - - data class Props( - @JsonProperty("datas") val datas: Datas? = null, - ) - - data class Sources( - @JsonProperty("props") val props: Props? = null, - ) -} - -class Newuservideo : ExtractorApi() { - override val name: String = "Uservideo" - override val mainUrl: String = "https://new.uservideo.xyz" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val iframe = app.get(url,referer=referer).document.select("iframe#videoFrame").attr("src") - val doc = app.get(iframe,referer="$mainUrl/").text - val json = "VIDEO_CONFIG\\s?=\\s?(.*)".toRegex().find(doc)?.groupValues?.get(1) - - AppUtils.tryParseJson(json)?.streams?.map { - callback.invoke( - ExtractorLink( - this.name, - this.name, - it.playUrl ?: return@map, - "$mainUrl/", - when (it.formatId) { - 18 -> Qualities.P360.value - 22 -> Qualities.P720.value - else -> Qualities.Unknown.value - }, - INFER_TYPE - ) - ) - } - - } - - data class Streams( - @JsonProperty("play_url") val playUrl: String? = null, - @JsonProperty("format_id") val formatId: Int? = null, - ) - - data class Sources( - @JsonProperty("streams") val streams: ArrayList? = null, - ) - -} - -class Vidhidepro : Filesim() { - override val mainUrl = "https://vidhidepro.com" - override val name = "Vidhidepro" -} \ No newline at end of file diff --git a/AnimeIndoProvider/build.gradle.kts b/AnimeIndoProvider/build.gradle.kts deleted file mode 100644 index af852c5c..00000000 --- a/AnimeIndoProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 15 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "OVA", - "Anime", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=animeindo.fun&sz=%size%" -} \ No newline at end of file diff --git a/AnimeIndoProvider/src/main/AndroidManifest.xml b/AnimeIndoProvider/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/AnimeIndoProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt b/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt deleted file mode 100644 index fcf6489c..00000000 --- a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt +++ /dev/null @@ -1,175 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.httpsify -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -class AnimeIndoProvider : MainAPI() { - override var mainUrl = "https://animeindo.quest" - override var name = "AnimeIndo" - override val hasMainPage = true - override var lang = "id" - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Finished Airing" -> ShowStatus.Completed - "Currently Airing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - - } - - override val mainPage = mainPageOf( - "episode-terbaru" to "Episode Terbaru", - "ongoing" to "Anime Ongoing", - "populer" to "Anime Populer", - "donghua-terbaru" to "Donghua Terbaru", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("$mainUrl/${request.data}/page/$page").document - val home = document.select("main#main div.animposx").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("/anime/")) { - uri - } else { - var title = uri.substringAfter("$mainUrl/") - title = when { - (title.contains("-episode")) && !(title.contains("-movie")) -> title.substringBefore( - "-episode" - ) - - (title.contains("-movie")) -> title.substringBefore("-movie") - else -> title - } - - "$mainUrl/anime/$title" - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse { - val title = this.selectFirst("div.title, h2.entry-title, h4")?.text()?.trim() ?: "" - val href = getProperAnimeLink(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val epNum = this.selectFirst("span.episode")?.ownText()?.replace(Regex("\\D"), "")?.trim() - ?.toIntOrNull() - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - val anime = mutableListOf() - (1..2).forEach { page -> - val document = app.get("$mainUrl/page/$page/?s=$query").document - val media = document.select(".site-main.relat > article").mapNotNull { - val title = it.selectFirst("div.title > h2")!!.ownText().trim() - val href = it.selectFirst("a")!!.attr("href") - val posterUrl = it.selectFirst("img")!!.attr("src").toString() - val type = getType(it.select("div.type").text().trim()) - newAnimeSearchResponse(title, href, type) { - this.posterUrl = posterUrl - } - } - if(media.isNotEmpty()) anime.addAll(media) - } - return anime - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - val title = document.selectFirst("h1.entry-title")?.text()?.replace("Subtitle Indonesia", "") - ?.trim() ?: return null - val poster = document.selectFirst("div.thumb > img[itemprop=image]")?.attr("src") - val tags = document.select("div.genxed > a").map { it.text() } - val type = getType(document.selectFirst("div.info-content > div.spe > span:contains(Type:)")?.ownText() - ?.trim()?.lowercase() ?: "tv") - val year = document.selectFirst("div.info-content > div.spe > span:contains(Released:)")?.ownText()?.let { - Regex("\\d,\\s(\\d*)").find(it)?.groupValues?.get(1)?.toIntOrNull() - } - val status = getStatus(document.selectFirst("div.info-content > div.spe > span:nth-child(1)")!!.ownText().trim()) - val description = document.select("div[itemprop=description] > p").text() - - val trailer = document.selectFirst("div.player-embed iframe")?.attr("src") - val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull { - val header = it.selectFirst("span.lchx > a") ?: return@mapNotNull null - val episode = header.text().trim().replace("Episode", "").trim().toIntOrNull() - val link = fixUrl(header.attr("href")) - Episode(link, episode = episode) - }.reversed() - - val recommendations = document.select("div.relat div.animposx").mapNotNull { - it.toSearchResult() - } - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - this.recommendations = recommendations - addTrailer(trailer) - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - document.select("div.itemleft > .mirror > option").mapNotNull { - fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src")) - }.apmap { - if (it.startsWith(mainUrl)) { - app.get(it, referer = "$mainUrl/").document.select("iframe").attr("src") - } else { - it - } - }.apmap { - loadExtractor(httpsify(it), data, subtitleCallback, callback) - } - - return true - } - -} \ No newline at end of file diff --git a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProviderPlugin.kt b/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProviderPlugin.kt deleted file mode 100644 index 7f4d0a0d..00000000 --- a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnimeIndoProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(AnimeIndoProvider()) - } -} \ No newline at end of file diff --git a/AnimeSailProvider/build.gradle.kts b/AnimeSailProvider/build.gradle.kts deleted file mode 100644 index cea32bdc..00000000 --- a/AnimeSailProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 10 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://aghanim.xyz/wp-content/themes/animesail/assets/images/ico.png" -} \ No newline at end of file diff --git a/AnimeSailProvider/src/main/AndroidManifest.xml b/AnimeSailProvider/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/AnimeSailProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/AnimeSailProvider/src/main/kotlin/com/hexated/AnimeSailProvider.kt b/AnimeSailProvider/src/main/kotlin/com/hexated/AnimeSailProvider.kt deleted file mode 100644 index 721121a2..00000000 --- a/AnimeSailProvider/src/main/kotlin/com/hexated/AnimeSailProvider.kt +++ /dev/null @@ -1,230 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.ExtractorLinkType -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.loadExtractor -import com.lagradost.nicehttp.NiceResponse -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -class AnimeSailProvider : MainAPI() { - override var mainUrl = "https://154.26.137.28" - override var name = "AnimeSail" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - private suspend fun request(url: String, ref: String? = null): NiceResponse { - return app.get( - url, - headers = mapOf("Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"), - cookies = mapOf("_as_ipin_ct" to "ID"), - referer = ref - ) - } - - override val mainPage = mainPageOf( - "$mainUrl/page/" to "Episode Terbaru", - "$mainUrl/movie-terbaru/page/" to "Movie Terbaru", - "$mainUrl/genres/donghua/page/" to "Donghua" - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val document = request(request.data + page).document - val home = document.select("article").map { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("/anime/")) { - uri - } else { - var title = uri.substringAfter("$mainUrl/") - title = when { - (title.contains("-episode")) && !(title.contains("-movie")) -> title.substringBefore( - "-episode" - ) - (title.contains("-movie")) -> title.substringBefore("-movie") - else -> title - } - - "$mainUrl/anime/$title" - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse { - val href = getProperAnimeLink(fixUrlNull(this.selectFirst("a")?.attr("href")).toString()) - val title = this.select(".tt > h2").text().trim() - val posterUrl = fixUrlNull(this.selectFirst("div.limit img")?.attr("src")) - val epNum = this.selectFirst(".tt > h2")?.text()?.let { - Regex("Episode\\s?(\\d+)").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query" - val document = request(link).document - - return document.select("div.listupd article").map { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = request(url).document - - val title = document.selectFirst("h1.entry-title")?.text().toString() - .replace("Subtitle Indonesia", "").trim() - val poster = document.selectFirst("div.entry-content > img")?.attr("src") - val type = getType(document.select("tbody th:contains(Tipe)").next().text().lowercase()) - val year = document.select("tbody th:contains(Dirilis)").next().text().trim().toIntOrNull() - - val episodes = document.select("ul.daftar > li").map { - val link = fixUrl(it.select("a").attr("href")) - val name = it.select("a").text() - val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull() - Episode(link, episode = episode) - }.reversed() - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = - getStatus(document.select("tbody th:contains(Status)").next().text().trim()) - plot = document.selectFirst("div.entry-content > p")?.text() - this.tags = - document.select("tbody th:contains(Genre)").next().select("a").map { it.text() } - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = request(data).document - - document.select(".mobius > .mirror > option").apmap { - safeApiCall { - val iframe = fixUrl( - Jsoup.parse(base64Decode(it.attr("data-em"))).select("iframe").attr("src") - ?: throw ErrorLoadingException("No iframe found") - ) - val quality = getIndexQuality(it.text()) - when { - iframe.startsWith("$mainUrl/utils/player/arch/") || iframe.startsWith( - "$mainUrl/utils/player/race/" - ) -> request(iframe, ref = data).document.select("source").attr("src") - .let { link -> - val source = - when { - iframe.contains("/arch/") -> "Arch" - iframe.contains("/race/") -> "Race" - else -> this.name - } - callback.invoke( - ExtractorLink( - source = source, - name = source, - url = link, - referer = mainUrl, - quality = quality - ) - ) - } -// skip for now -// iframe.startsWith("$mainUrl/utils/player/fichan/") -> "" -// iframe.startsWith("$mainUrl/utils/player/blogger/") -> "" - iframe.startsWith("https://aghanim.xyz/tools/redirect/") -> { - val link = "https://rasa-cintaku-semakin-berantai.xyz/v/${ - iframe.substringAfter("id=").substringBefore("&token") - }" - loadFixedExtractor(link, quality, mainUrl, subtitleCallback, callback) - } - iframe.startsWith("$mainUrl/utils/player/framezilla/") || iframe.startsWith("https://uservideo.xyz") -> { - request(iframe, ref = data).document.select("iframe").attr("src") - .let { link -> - loadFixedExtractor(fixUrl(link), quality, mainUrl, subtitleCallback, callback) - } - } - else -> { - loadFixedExtractor(iframe, quality, mainUrl, subtitleCallback, callback) - } - } - } - } - - return true - } - - private suspend fun loadFixedExtractor( - url: String, - quality: Int?, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - if(link.type == ExtractorLinkType.M3U8) link.quality else quality ?: Qualities.Unknown.value, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun getIndexQuality(str: String): Int { - return Regex("(\\d{3,4})[pP]").find(str)?.groupValues?.getOrNull(1)?.toIntOrNull() - ?: Qualities.Unknown.value - } - -} \ No newline at end of file diff --git a/AnimeSailProvider/src/main/kotlin/com/hexated/AnimeSailProviderPlugin.kt b/AnimeSailProvider/src/main/kotlin/com/hexated/AnimeSailProviderPlugin.kt deleted file mode 100644 index dfdc4c0c..00000000 --- a/AnimeSailProvider/src/main/kotlin/com/hexated/AnimeSailProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnimeSailProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(AnimeSailProvider()) - } -} \ No newline at end of file diff --git a/Animixplay/build.gradle.kts b/Animixplay/build.gradle.kts deleted file mode 100644 index 4d5730fa..00000000 --- a/Animixplay/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 7 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=animixplay.to&sz=%size%" -} \ No newline at end of file diff --git a/Animixplay/src/main/AndroidManifest.xml b/Animixplay/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/Animixplay/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Animixplay/src/main/kotlin/com/hexated/Animixplay.kt b/Animixplay/src/main/kotlin/com/hexated/Animixplay.kt deleted file mode 100644 index 79be5f62..00000000 --- a/Animixplay/src/main/kotlin/com/hexated/Animixplay.kt +++ /dev/null @@ -1,446 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.hexated.GogoExtractor.extractVidstream -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup -import java.net.URI - - -class Animixplay : MainAPI() { - override var mainUrl = "https://animixplay.red" - override var name = "Animixplay" - override val hasMainPage = true - override var lang = "en" - override val hasQuickSearch = true - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getStatus(t: String?): ShowStatus { - return when (t) { - "Finished Airing" -> ShowStatus.Completed - "Currently Airing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/api/search" to "Sub", - "$mainUrl/api/search" to "Dub", - "$mainUrl/a/XsWgdGCnKJfNvDFAM28EV" to "All", - "$mainUrl/api/search" to "Movie", - ) - - private var newPagination: String? = null - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val items = mutableListOf() - val paged = page.toString() - val pagination = if (request.name == "Movie") { - paged.replace(paged, "99999999") - } else { - paged.replace(paged, "3020-05-06 00:00:00") - } - - if (page <= 1) { - val headers = when (request.name) { - "Sub" -> mapOf("seasonal" to pagination) - "Dub" -> mapOf("seasonaldub" to pagination) - "All" -> mapOf("recent" to pagination) - "Movie" -> mapOf("movie" to pagination) - else -> mapOf() - } - val res = app.post( - request.data, - data = headers, - referer = mainUrl, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe() - newPagination = res?.last.toString() - val home = res?.result?.mapNotNull { - it.toSearchResponse() - } ?: throw ErrorLoadingException("No media found") - items.add( - HomePageList( - name = request.name, - list = home, - ) - ) - } else { - val headers = when (request.name) { - "Sub" -> mapOf("seasonal" to "$newPagination") - "Dub" -> mapOf("seasonaldub" to "$newPagination") - "All" -> mapOf("recent" to "$newPagination") - "Movie" -> mapOf("movie" to "$newPagination") - else -> mapOf() - } - val res = app.post( - request.data, - data = headers, - referer = mainUrl, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe() - newPagination = res?.last.toString() - val home = res?.result?.mapNotNull { - it.toSearchResponse() - } ?: throw ErrorLoadingException("No media found") - items.add( - HomePageList( - name = request.name, - list = home, - ) - ) - } - - return newHomePageResponse(items) - } - - private fun Anime.toSearchResponse(): AnimeSearchResponse? { - return newAnimeSearchResponse( - title ?: return null, - fixUrl(url ?: return null), - TvType.TvSeries, - ) { - this.posterUrl = img ?: picture - addDubStatus( - isDub = title.contains("Dub"), - episodes = Regex("EP\\s([0-9]+)/").find( - infotext ?: "" - )?.groupValues?.getOrNull(1) - ?.toIntOrNull() - ) - } - } - - - override suspend fun search(query: String): List? { - return app.post( - url = "https://v1.ij7p9towl8uj4qafsopjtrjk.workers.dev", - referer = mainUrl, - data = mapOf( - "q2" to query, - "origin" to "1", - "root" to "animixplay.to", - "d" to "gogoanime.tel" - ) - ).parsedSafe()?.result?.let { - Jsoup.parse(it).select("div").map { elem -> - - val href = fixUrl(elem.select("a").attr("href")) - val title = elem.select("a").attr("title") - newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = elem.select("img").attr("src") - addDubStatus(isDub = title.contains("Dub")) - } - } - } - } - - override suspend fun quickSearch(query: String): List? { - return app.post( - "https://cdn.animixplay.to/api/search", - data = mapOf("qfast" to query, "root" to URI(mainUrl).host) - ).parsedSafe()?.result?.let { - Jsoup.parse(it).select("a").map { elem -> - val href = elem.attr("href") - val title = elem.select("p.name").text() - newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = elem.select("img").attr("src") - addDubStatus(isDub = title.contains("Dub")) - } - } - } - } - - private suspend fun loadMissingAnime(url: String): LoadResponse? { - val doc = app.get(url).document - - val title = doc.selectFirst("span.animetitle")?.text() - val image = fixUrlNull(doc.selectFirst("meta[property=og:image]")?.attr("content")) - val genres = doc.selectFirst("span#genredata")?.text()?.split(",")?.map { it.trim() } - - val subEpisodes = mutableListOf() - val dubEpisodes = mutableListOf() - val dataEps = doc.select("div#epslistplace") - .text().trim() - Regex("\"([0-9]+)\":\"(\\S+?)\"").findAll(dataEps).toList() - .map { it.groupValues[1] to it.groupValues[2] }.map { (ep, link) -> - val episode = Episode(fixUrl(link), episode = ep.toInt() + 1) - if (url.contains("-dub")) { - dubEpisodes.add(episode) - } else { - subEpisodes.add(episode) - } - } - - return newAnimeLoadResponse( - title ?: return null, - url, - TvType.Anime - ) { - this.posterUrl = image - this.tags = genres - if (subEpisodes.isNotEmpty()) addEpisodes(DubStatus.Subbed, subEpisodes) - if (dubEpisodes.isNotEmpty()) addEpisodes(DubStatus.Dubbed, dubEpisodes) - } - } - - override suspend fun load(url: String): LoadResponse? { - - val (fixUrl, malId) = if (url.contains("/anime/")) { - listOf(url, Regex("anime/([0-9]+)/?").find(url)?.groupValues?.get(1)) - } else { - val malId = app.get(url).text.substringAfterLast("malid = '").substringBefore("';") - listOf("$mainUrl/anime/$malId", malId) - } - - val anilistId = app.post( - "https://graphql.anilist.co/", data = mapOf( - "query" to "{Media(idMal:$malId,type:ANIME){id}}", - ) - ).parsedSafe()?.data?.media?.id - - val res = app.get("$mainUrl/assets/mal/$malId.json").parsedSafe() - ?: return loadMissingAnime(url) - - val subEpisodes = mutableListOf() - val dubEpisodes = mutableListOf() - - app.post("$mainUrl/api/search", data = mapOf("recomended" to "$malId")) - .parsedSafe()?.data?.map { server -> - server.items?.apmap { data -> - val jsonData = - app.get( - fixUrl( - data.url ?: return@apmap null - ) - ).document.select("div#epslistplace") - .text().trim() - val episodeData = when (server.type) { - "AL" -> Regex("\"([0-9]+)\":\\[(.*?)]").findAll(jsonData).toList() - .map { it.groupValues[1] to it.groupValues[2] }.map { (ep, link) -> - Episode(link, episode = ep.toInt() + 1) - } - "RUSH" -> Regex("\"([0-9]+)\":\\[(.*?)]").findAll(jsonData).toList() - .map { it.groupValues[1] to it.groupValues[2] }.map { (ep, link) -> - val linkData = - Regex("\"vid\":\"(\\S+?)\"").findAll(link) - .map { it.groupValues[1] } - .toList().joinToString("") - Episode(linkData, episode = ep.toInt() + 1) - } - else -> { - Regex("\"([0-9]+)\":\"(\\S+?)\"").findAll(jsonData).toList() - .map { it.groupValues[1] to it.groupValues[2] }.map { (ep, link) -> - Episode(fixUrl(link), episode = ep.toInt() + 1) - } - } - } - episodeData.map { - if (data.url.contains("-dub")) { - dubEpisodes.add(it) - } else { - subEpisodes.add(it) - } - } - } - } - - val recommendations = app.get("$mainUrl/assets/similar/$malId.json") - .parsedSafe()?.recommendations?.mapNotNull { rec -> - newAnimeSearchResponse( - rec.title ?: return@mapNotNull null, - "$mainUrl/anime/${rec.malId}/", - TvType.Anime - ) { - this.posterUrl = rec.imageUrl - addDubStatus(dubExist = false, subExist = true) - } - } - - return newAnimeLoadResponse( - res.title ?: return null, - url, - TvType.Anime - ) { - engName = res.title - posterUrl = res.imageUrl - this.year = res.aired?.from?.split("-")?.firstOrNull()?.toIntOrNull() - showStatus = getStatus(res.status) - plot = res.synopsis - this.tags = res.genres?.mapNotNull { it.name } - this.recommendations = recommendations - addMalId(malId?.toIntOrNull()) - addAniListId(anilistId?.toIntOrNull()) - addTrailer(res.trailerUrl) - if (subEpisodes.isNotEmpty()) addEpisodes(DubStatus.Subbed, groupEpisodes(subEpisodes)) - if (dubEpisodes.isNotEmpty()) addEpisodes(DubStatus.Dubbed, groupEpisodes(dubEpisodes)) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - if (!data.contains("\"")) { - invokeGogo(data, subtitleCallback, callback) - } else { - data.split("http").apmap { - val link = it.replace("\"", "").let { url -> "http$url".trim() } - if (link.startsWith("https://gogohd.net")) { - invokeGogo(link, subtitleCallback, callback) - } else { - loadExtractor(link, "$mainUrl/", subtitleCallback) { links -> - val name = - if (link.startsWith("https://streamsb.net")) "StreamNet" else links.name - callback.invoke( - ExtractorLink( - name, - name, - links.url, - links.referer, - links.quality, - links.isM3u8, - links.headers, - links.extractorData - ) - ) - } - } - } - } - return true - } - - private fun groupEpisodes(episodes: List): List { - return episodes.groupBy { it.episode }.map { eps -> - val epsNum = eps.key - val epsLink = eps.value.joinToString("") { it.data }.replace("\",\"", "") - Episode(epsLink, episode = epsNum) - } - } - - private suspend fun invokeGogo( - link: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val iframe = app.get(link) - val iframeDoc = iframe.document - argamap({ - iframeDoc.select(".list-server-items > .linkserver") - .forEach { element -> - val status = element.attr("data-status") ?: return@forEach - if (status != "1") return@forEach - val extractorData = element.attr("data-video") ?: return@forEach - loadExtractor(extractorData, iframe.url, subtitleCallback, callback) - } - }, { - val iv = "3134003223491201" - val secretKey = "37911490979715163134003223491201" - val secretDecryptKey = "54674138327930866480207815084989" - extractVidstream( - iframe.url, - this.name, - callback, - iv, - secretKey, - secretDecryptKey, - isUsingAdaptiveKeys = false, - isUsingAdaptiveData = true, - iframeDocument = iframeDoc - ) - }) - } - - private data class IdAni( - @JsonProperty("id") val id: String? = null, - ) - - private data class MediaAni( - @JsonProperty("Media") val media: IdAni? = null, - ) - - private data class DataAni( - @JsonProperty("data") val data: MediaAni? = null, - ) - - private data class Items( - @JsonProperty("url") val url: String? = null, - @JsonProperty("title") val title: String? = null, - ) - - private data class Episodes( - @JsonProperty("type") val type: String? = null, - @JsonProperty("items") val items: ArrayList? = arrayListOf(), - ) - - private data class Data( - @JsonProperty("data") val data: ArrayList? = arrayListOf(), - ) - - private data class Aired( - @JsonProperty("from") val from: String? = null, - ) - - private data class Genres( - @JsonProperty("name") val name: String? = null, - ) - - private data class RecResult( - @JsonProperty("recommendations") val recommendations: ArrayList? = arrayListOf(), - ) - - private data class Recommendations( - @JsonProperty("mal_id") val malId: String? = null, - @JsonProperty("image_url") val imageUrl: String? = null, - @JsonProperty("title") val title: String? = null, - ) - - private data class AnimeDetail( - @JsonProperty("title") val title: String? = null, - @JsonProperty("image_url") val imageUrl: String? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("aired") val aired: Aired? = null, - @JsonProperty("status") val status: String? = null, - @JsonProperty("synopsis") val synopsis: String? = null, - @JsonProperty("trailer_url") val trailerUrl: String? = null, - @JsonProperty("genres") val genres: ArrayList? = arrayListOf(), - ) - - private data class Search( - @JsonProperty("result") val result: String? = null, - ) - - private data class Result( - @JsonProperty("result") val result: ArrayList = arrayListOf(), - @JsonProperty("last") val last: Any? = null, - ) - - private data class Anime( - @JsonProperty("title") val title: String? = null, - @JsonProperty("url") val url: String? = null, - @JsonProperty("img") val img: String? = null, - @JsonProperty("picture") val picture: String? = null, - @JsonProperty("infotext") val infotext: String? = null, - ) - - private data class FullSearch( - @JsonProperty("result") val result: String? = null, - ) - -} \ No newline at end of file diff --git a/Animixplay/src/main/kotlin/com/hexated/AnimixplayPlugin.kt b/Animixplay/src/main/kotlin/com/hexated/AnimixplayPlugin.kt deleted file mode 100644 index e759a515..00000000 --- a/Animixplay/src/main/kotlin/com/hexated/AnimixplayPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnimixplayPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Animixplay()) - } -} \ No newline at end of file diff --git a/Animixplay/src/main/kotlin/com/hexated/GogoExtractor.kt b/Animixplay/src/main/kotlin/com/hexated/GogoExtractor.kt deleted file mode 100644 index ed19fd25..00000000 --- a/Animixplay/src/main/kotlin/com/hexated/GogoExtractor.kt +++ /dev/null @@ -1,166 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.base64Decode -import com.lagradost.cloudstream3.base64DecodeArray -import com.lagradost.cloudstream3.base64Encode -import com.lagradost.cloudstream3.mvvm.normalSafeApiCall -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.getQualityFromName -import org.jsoup.nodes.Document -import java.net.URI -import javax.crypto.Cipher -import javax.crypto.spec.IvParameterSpec -import javax.crypto.spec.SecretKeySpec - -object GogoExtractor { - - /** - * @param id base64Decode(show_id) + IV - * @return the encryption key - * */ - private fun getKey(id: String): String? { - return normalSafeApiCall { - id.map { - it.code.toString(16) - }.joinToString("").substring(0, 32) - } - } - - // https://github.com/saikou-app/saikou/blob/3e756bd8e876ad7a9318b17110526880525a5cd3/app/src/main/java/ani/saikou/anime/source/extractors/GogoCDN.kt#L60 - // No Licence on the function - private fun cryptoHandler( - string: String, - iv: String, - secretKeyString: String, - encrypt: Boolean = true - ): String { - //println("IV: $iv, Key: $secretKeyString, encrypt: $encrypt, Message: $string") - val ivParameterSpec = IvParameterSpec(iv.toByteArray()) - val secretKey = SecretKeySpec(secretKeyString.toByteArray(), "AES") - val cipher = Cipher.getInstance("AES/CBC/PKCS5Padding") - return if (!encrypt) { - cipher.init(Cipher.DECRYPT_MODE, secretKey, ivParameterSpec) - String(cipher.doFinal(base64DecodeArray(string))) - } else { - cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivParameterSpec) - base64Encode(cipher.doFinal(string.toByteArray())) - } - } - - /** - * @param iframeUrl something like https://gogoplay4.com/streaming.php?id=XXXXXX - * @param mainApiName used for ExtractorLink names and source - * @param iv secret iv from site, required non-null if isUsingAdaptiveKeys is off - * @param secretKey secret key for decryption from site, required non-null if isUsingAdaptiveKeys is off - * @param secretDecryptKey secret key to decrypt the response json, required non-null if isUsingAdaptiveKeys is off - * @param isUsingAdaptiveKeys generates keys from IV and ID, see getKey() - * @param isUsingAdaptiveData generate encrypt-ajax data based on $("script[data-name='episode']")[0].dataset.value - * */ - suspend fun extractVidstream( - iframeUrl: String, - mainApiName: String, - callback: (ExtractorLink) -> Unit, - iv: String?, - secretKey: String?, - secretDecryptKey: String?, - // This could be removed, but i prefer it verbose - isUsingAdaptiveKeys: Boolean, - isUsingAdaptiveData: Boolean, - // If you don't want to re-fetch the document - iframeDocument: Document? = null - ) = safeApiCall { - // https://github.com/saikou-app/saikou/blob/3e756bd8e876ad7a9318b17110526880525a5cd3/app/src/main/java/ani/saikou/anime/source/extractors/GogoCDN.kt - // No Licence on the following code - // Also modified of https://github.com/jmir1/aniyomi-extensions/blob/master/src/en/gogoanime/src/eu/kanade/tachiyomi/animeextension/en/gogoanime/extractors/GogoCdnExtractor.kt - // License on the code above https://github.com/jmir1/aniyomi-extensions/blob/master/LICENSE - - if ((iv == null || secretKey == null || secretDecryptKey == null) && !isUsingAdaptiveKeys) - return@safeApiCall - - val id = Regex("id=([^&]+)").find(iframeUrl)!!.value.removePrefix("id=") - - var document: Document? = iframeDocument - val foundIv = - iv ?: (document ?: app.get(iframeUrl).document.also { document = it }) - .select("""div.wrapper[class*=container]""") - .attr("class").split("-").lastOrNull() ?: return@safeApiCall - val foundKey = secretKey ?: getKey(base64Decode(id) + foundIv) ?: return@safeApiCall - val foundDecryptKey = secretDecryptKey ?: foundKey - - val uri = URI(iframeUrl) - val mainUrl = "https://" + uri.host - - val encryptedId = cryptoHandler(id, foundIv, foundKey) - val encryptRequestData = if (isUsingAdaptiveData) { - // Only fetch the document if necessary - val realDocument = document ?: app.get(iframeUrl).document - val dataEncrypted = - realDocument.select("script[data-name='episode']").attr("data-value") - val headers = cryptoHandler(dataEncrypted, foundIv, foundKey, false) - "id=$encryptedId&alias=$id&" + headers.substringAfter("&") - } else { - "id=$encryptedId&alias=$id" - } - - val jsonResponse = - app.get( - "$mainUrl/encrypt-ajax.php?$encryptRequestData", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ) - val dataencrypted = - jsonResponse.text.substringAfter("{\"data\":\"").substringBefore("\"}") - val datadecrypted = cryptoHandler(dataencrypted, foundIv, foundDecryptKey, false) - val sources = AppUtils.parseJson(datadecrypted) - - suspend fun invokeGogoSource( - source: GogoSource, - sourceCallback: (ExtractorLink) -> Unit - ) { - if (source.file.contains(".m3u8")) { - M3u8Helper.generateM3u8( - mainApiName, - source.file, - mainUrl, - headers = mapOf("Origin" to "https://plyr.link") - ).forEach(sourceCallback) - } else { - sourceCallback.invoke( - ExtractorLink( - mainApiName, - mainApiName, - source.file, - mainUrl, - getQualityFromName(source.label), - ) - ) - } - } - - sources.source?.forEach { - invokeGogoSource(it, callback) - } - sources.sourceBk?.forEach { - invokeGogoSource(it, callback) - } - } - - data class GogoSources( - @JsonProperty("source") val source: List?, - @JsonProperty("sourceBk") val sourceBk: List?, - //val track: List, - //val advertising: List, - //val linkiframe: String - ) - - data class GogoSource( - @JsonProperty("file") val file: String, - @JsonProperty("label") val label: String?, - @JsonProperty("type") val type: String?, - @JsonProperty("default") val default: String? = null - ) -} diff --git a/Aniworld/build.gradle.kts b/Aniworld/build.gradle.kts deleted file mode 100644 index 86c61272..00000000 --- a/Aniworld/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 6 - - -cloudstream { - language = "de" - // All of these properties are optional, you can safely remove them - - description = "Include: Serienstream" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=aniworld.to&sz=%size%" -} \ No newline at end of file diff --git a/Aniworld/src/main/AndroidManifest.xml b/Aniworld/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Aniworld/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt b/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt deleted file mode 100644 index 1fb28346..00000000 --- a/Aniworld/src/main/kotlin/com/hexated/Aniworld.kt +++ /dev/null @@ -1,189 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.extractors.DoodLaExtractor -import com.lagradost.cloudstream3.extractors.Voe -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element - -open class Aniworld : MainAPI() { - override var mainUrl = "https://aniworld.to" - override var name = "Aniworld" - override val hasMainPage = true - override var lang = "de" - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - - val document = app.get(mainUrl).document - val item = arrayListOf() - document.select("div.carousel").map { ele -> - val header = ele.selectFirst("h2")?.text() ?: return@map - val home = ele.select("div.coverListItem").mapNotNull { - it.toSearchResult() - } - if (home.isNotEmpty()) item.add(HomePageList(header, home)) - } - return HomePageResponse(item) - } - - override suspend fun search(query: String): List { - val json = app.post( - "$mainUrl/ajax/search", - data = mapOf("keyword" to query), - referer = "$mainUrl/search", - headers = mapOf( - "x-requested-with" to "XMLHttpRequest" - ) - ) - return tryParseJson>(json.text)?.filter { - !it.link.contains("episode-") && it.link.contains( - "/stream" - ) - }?.map { - newAnimeSearchResponse( - it.title?.replace(Regex(""), "") ?: "", - fixUrl(it.link), - TvType.Anime - ) { - } - } ?: throw ErrorLoadingException() - - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("div.series-title span")?.text() ?: return null - val poster = fixUrlNull(document.selectFirst("div.seriesCoverBox img")?.attr("data-src")) - val tags = document.select("div.genres li a").map { it.text() } - val year = document.selectFirst("span[itemprop=startDate] a")?.text()?.toIntOrNull() - val description = document.select("p.seri_des").text() - val actor = - document.select("li:contains(Schauspieler:) ul li a").map { it.select("span").text() } - - val episodes = mutableListOf() - document.select("div#stream > ul:first-child li").map { ele -> - val page = ele.selectFirst("a") - val epsDocument = app.get(fixUrl(page?.attr("href") ?: return@map)).document - epsDocument.select("div#stream > ul:nth-child(4) li").mapNotNull { eps -> - episodes.add( - Episode( - fixUrl(eps.selectFirst("a")?.attr("href") ?: return@mapNotNull null), - episode = eps.selectFirst("a")?.text()?.toIntOrNull(), - season = page.text().toIntOrNull() - ) - ) - } - } - - return newAnimeLoadResponse( - title, - url, - TvType.Anime - ) { - engName = title - posterUrl = poster - this.year = year - addEpisodes( - DubStatus.Subbed, - episodes - ) - addActors(actor) - plot = description - this.tags = tags - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - document.select("div.hosterSiteVideo ul li").map { - Triple( - it.attr("data-lang-key"), - it.attr("data-link-target"), - it.select("h4").text() - ) - }.filter { - it.third != "Vidoza" - }.apmap { - val redirectUrl = app.get(fixUrl(it.second)).url - val lang = it.first.getLanguage(document) - val name = "${it.third} [${lang}]" - if (it.third == "VOE") { - Voe().getUrl(redirectUrl, data, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - name, - name, - link.url, - link.referer, - link.quality, - link.type, - link.headers, - link.extractorData - ) - ) - } - } else { - loadExtractor(redirectUrl, data, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - name, - name, - link.url, - link.referer, - link.quality, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - } - - return true - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null - val title = this.selectFirst("h3")?.text() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - } - } - - private fun String.getLanguage(document: Document): String? { - return document.selectFirst("div.changeLanguageBox img[data-lang-key=$this]")?.attr("title") - ?.removePrefix("mit")?.trim() - } - - private data class AnimeSearch( - @JsonProperty("link") val link: String, - @JsonProperty("title") val title: String? = null, - ) - -} - -class Dooood : DoodLaExtractor() { - override var mainUrl = "https://urochsunloath.com" -} \ No newline at end of file diff --git a/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt b/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt deleted file mode 100644 index 3e86596b..00000000 --- a/Aniworld/src/main/kotlin/com/hexated/AniworldPlugin.kt +++ /dev/null @@ -1,16 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AniworldPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Aniworld()) - registerMainAPI(Serienstream()) - registerExtractorAPI(Dooood()) - } -} \ No newline at end of file diff --git a/Aniworld/src/main/kotlin/com/hexated/Serienstream.kt b/Aniworld/src/main/kotlin/com/hexated/Serienstream.kt deleted file mode 100644 index ff475aa6..00000000 --- a/Aniworld/src/main/kotlin/com/hexated/Serienstream.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.LoadResponse -import com.lagradost.cloudstream3.TvType - -class Serienstream : Aniworld() { - override var mainUrl = "https://s.to" - override var name = "Serienstream" - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - ) - - override suspend fun load(url: String): LoadResponse? { - return super.load(url).apply { this?.type = TvType.TvSeries } - } -} \ No newline at end of file diff --git a/Anizm/build.gradle.kts b/Anizm/build.gradle.kts deleted file mode 100644 index 618896c5..00000000 --- a/Anizm/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 1 - - -cloudstream { - language = "tr" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 0 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=anizm.net&sz=%size%" -} \ No newline at end of file diff --git a/Anizm/src/main/AndroidManifest.xml b/Anizm/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/Anizm/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Anizm/src/main/kotlin/com/hexated/Anizm.kt b/Anizm/src/main/kotlin/com/hexated/Anizm.kt deleted file mode 100644 index 1d5fb8c0..00000000 --- a/Anizm/src/main/kotlin/com/hexated/Anizm.kt +++ /dev/null @@ -1,195 +0,0 @@ -package com.hexated - -import android.util.Log -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.* -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - - -class Anizm : MainAPI() { - override var mainUrl = "https://anizm.net" - override var name = "Anizm" - override val hasMainPage = true - override var lang = "tr" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - private const val mainServer = "https://anizmplayer.com" - } - - override val mainPage = mainPageOf( - "$mainUrl/anime-izle?sayfa=" to "Son Eklenen Animeler", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div.restrictedWidth div#episodesMiddle").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("-bolum")) { - "$mainUrl/${uri.substringAfter("$mainUrl/").replace(Regex("-[0-9]+-bolum.*"), "")}" - } else { - uri - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = getProperAnimeLink(this.selectFirst("a")!!.attr("href")) - val title = this.selectFirst("div.title, h5.animeTitle a")?.text() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val episode = this.selectFirst("div.truncateText")?.text()?.let { - Regex("([0-9]+).\\s?Bölüm").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(episode) - } - } - - override suspend fun search(query: String): List { - val document = app.get( - "$mainUrl/fullViewSearch?search=$query&skip=0", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).document - - return document.select("div.searchResultItem").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("h2.anizm_pageTitle a")!!.text().trim() - val type = - if (document.select("div.ui.grid div.four.wide").size == 1) TvType.Movie else TvType.Anime - val trailer = document.select("div.yt-hd-thumbnail-inner-container iframe").attr("src") - val episodes = document.select("div.ui.grid div.four.wide").map { - val name = it.select("div.episodeBlock").text() - val link = fixUrl(it.selectFirst("a")?.attr("href").toString()) - Episode(link, name) - } - return newAnimeLoadResponse(title, url, type) { - posterUrl = fixUrlNull(document.selectFirst("div.infoPosterImg > img")?.attr("src")) - this.year = document.select("div.infoSta ul li:first-child").text().trim().toIntOrNull() - addEpisodes(DubStatus.Subbed, episodes) - plot = document.select("div.infoDesc").text().trim() - this.tags = document.select("span.dataValue span.ui.label").map { it.text() } - addTrailer(trailer) - } - } - - private suspend fun invokeLokalSource( - url: String, - translator: String, - sourceCallback: (ExtractorLink) -> Unit - ) { - app.get(url, referer = "$mainUrl/").document.select("script").find { script -> - script.data().contains("eval(function(p,a,c,k,e,d)") - }?.let { - val key = getAndUnpack(it.data()).substringAfter("FirePlayer(\"").substringBefore("\",") - val referer = "$mainServer/video/$key" - val link = "$mainServer/player/index.php?data=$key&do=getVideo" - Log.i("hexated", link) - app.post( - link, - data = mapOf("hash" to key, "r" to "$mainUrl/"), - referer = referer, - headers = mapOf( - "Accept" to "*/*", - "Origin" to mainServer, - "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", - "X-Requested-With" to "XMLHttpRequest" - ) - ).parsedSafe()?.videoSource?.let { m3uLink -> - M3u8Helper.generateM3u8( - "${this.name} ($translator)", - m3uLink, - referer - ).forEach(sourceCallback) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - document.select("div.episodeTranslators div#fansec").map { - Pair(it.select("a").attr("translator"), it.select("div.title").text()) - }.apmap { (url, translator) -> - safeApiCall { - app.get( - url, - referer = data, - headers = mapOf( - "Accept" to "application/json, text/javascript, */*; q=0.01", - "X-Requested-With" to "XMLHttpRequest" - ) - ).parsedSafe()?.data?.let { - Jsoup.parse(it).select("a").apmap { video -> - app.get( - video.attr("video"), - referer = data, - headers = mapOf( - "Accept" to "application/json, text/javascript, */*; q=0.01", - "X-Requested-With" to "XMLHttpRequest" - ) - ).parsedSafe()?.player?.let { iframe -> - Jsoup.parse(iframe).select("iframe").attr("src").let { link -> - when { - link.startsWith(mainServer) -> { - invokeLokalSource(link, translator, callback) - } - else -> { - loadExtractor( - fixUrl(link), - "$mainUrl/", - subtitleCallback, - callback - ) - } - } - } - } - } - } - } - } - return true - } - - data class Source( - @JsonProperty("videoSource") val videoSource: String?, - ) - - data class Videos( - @JsonProperty("player") val player: String?, - ) - - data class Translators( - @JsonProperty("data") val data: String?, - ) - -} \ No newline at end of file diff --git a/Anizm/src/main/kotlin/com/hexated/AnizmPlugin.kt b/Anizm/src/main/kotlin/com/hexated/AnizmPlugin.kt deleted file mode 100644 index c6741426..00000000 --- a/Anizm/src/main/kotlin/com/hexated/AnizmPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnizmPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Anizm()) - } -} \ No newline at end of file diff --git a/Anroll/build.gradle.kts b/Anroll/build.gradle.kts deleted file mode 100644 index 7d575610..00000000 --- a/Anroll/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -// use an integer for version numbers -version = 2 - -cloudstream { - language = "pt-pt" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "Anime", - "AnimeMovie", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=www.anroll.net&sz=%size%" -} \ No newline at end of file diff --git a/Anroll/src/main/AndroidManifest.xml b/Anroll/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Anroll/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Anroll/src/main/kotlin/com/hexated/Anroll.kt b/Anroll/src/main/kotlin/com/hexated/Anroll.kt deleted file mode 100644 index d397caa0..00000000 --- a/Anroll/src/main/kotlin/com/hexated/Anroll.kt +++ /dev/null @@ -1,241 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import org.jsoup.nodes.Element - -class Anroll : MainAPI() { - override var mainUrl = "https://www.anroll.net" - override var name = "Anroll" - override val hasMainPage = true - override var lang = "pt" - override val hasDownloadSupport = true - override val hasQuickSearch = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - private const val searchUrl = "https://apiv2-prd.anroll.net" - private const val episodeUrl = "https://apiv3-prd.anroll.net" - private const val posterUrl = "https://static.anroll.net" - private const val videoUrl = "https://cdn-zenitsu.gamabunta.xyz" - } - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("$mainUrl/home").document - val home = mutableListOf() - document.select("div.hAbQAe").map { div -> - val header = div.selectFirst("h2")?.text() ?: return@map - val child = HomePageList( - header, - div.select("ul li").mapNotNull { - it.toSearchResult() - }, - header == "Últimos Laçamentos" - ) - home.add(child) - } - return HomePageResponse(home) - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("h1")?.text()?.trim() ?: "" - val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null) - val posterUrl = fixUrlNull(this.select("img").attr("src")) - val epNum = this.selectFirst("span.sc-f5d5b250-3.fsTgnD b")?.text()?.toIntOrNull() - val isDub = this.selectFirst("div.sc-9dbd1f1d-5.efznig")?.text() == "DUB" - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addDubStatus(isDub, epNum) - } - } - - override suspend fun quickSearch(query: String): List = search(query) - - override suspend fun search(query: String): List { - val res = app.get("$searchUrl/search?q=$query").parsedSafe() - val collection = mutableListOf() - val anime = res?.data_anime?.mapNotNull { - addAnimeSearch( - it.titulo ?: return@mapNotNull null, - "a/${it.generate_id}", - it.slug_serie ?: return@mapNotNull null, - Image.Anime - ) - } - if (anime?.isNotEmpty() == true) collection.addAll(anime) - val filme = res?.data_filme?.mapNotNull { - addAnimeSearch( - it.nome_filme ?: return@mapNotNull null, - "f/${it.generate_id}", - it.slug_filme ?: return@mapNotNull null, - Image.Filme - ) - } - if (filme?.isNotEmpty() == true) collection.addAll(filme) - return collection - } - - override suspend fun load(url: String): LoadResponse? { - val fixUrl = getProperAnimeLink(url) ?: throw ErrorLoadingException() - val document = app.get(fixUrl).document - - val article = document.selectFirst("article.animedetails") ?: return null - val title = article.selectFirst("h2")?.text() ?: return null - val poster = fixUrlNull(document.select("section.animecontent img").attr("src")) - val tags = article.select("div#generos a").map { it.text() } - val year = article.selectFirst("div.dfuefM")?.nextElementSibling()?.text() - ?.toIntOrNull() - val description = document.select("div.sinopse").text().trim() - val type = if (fixUrl.contains("/a/")) TvType.Anime else TvType.AnimeMovie - - val episodes = mutableListOf() - - if (type == TvType.Anime) { - for (i in 1..10) { - val dataEpisode = app.get("$episodeUrl/animes/${fixUrl.substringAfterLast("/")}/episodes?page=$i&order=desc") - .parsedSafe()?.data?.map { - Episode( - Load(it.anime?.get("slug_serie"), it.n_episodio, "animes").toJson(), - it.titulo_episodio, - episode = it.n_episodio?.toIntOrNull(), - posterUrl = it.anime?.get("slug_serie")?.fixImageUrl(Image.Episode), - description = it.sinopse_episodio - ) - }?.reversed() ?: emptyList() - if(dataEpisode.isEmpty()) break else episodes.addAll(dataEpisode) - } - } else { - val dataEpisode = listOf( - Episode( - Load( - document.selectFirst("script:containsData(slug_filme)")?.data()?.let { - Regex("[\"']slug_filme[\"']:[\"'](\\S+?)[\"']").find(it)?.groupValues?.get(1) - } ?: return null, "movie", "movies" - ).toJson() - - ) - ) - episodes.addAll(dataEpisode) - } - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = poster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - plot = description - this.tags = tags - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val load = tryParseJson(data) - callback.invoke( - ExtractorLink( - this.name, - this.name, - if(load?.type == "movies") { - "$videoUrl/hls/${load.type}/${load.slug_serie}/${load.n_episodio}.mp4/media-1/stream.m3u8" - } else { - "$videoUrl/cf/hls/${load?.type}/${load?.slug_serie}/${load?.n_episodio}.mp4/media-1/stream.m3u8" - }, - "$mainUrl/", - Qualities.Unknown.value, - true - ) - ) - return true - } - - private suspend fun getProperAnimeLink(uri: String): String? { - return if (uri.contains("/e/")) { - app.get(uri).document.selectFirst("div.epcontrol2 a[href*=/a/]")?.attr("href")?.let { - fixUrl(it) - } - } else { - uri - } - } - - private fun addAnimeSearch(titulo: String, id: String, slug: String, type: Image): AnimeSearchResponse { - return newAnimeSearchResponse(titulo, "$mainUrl/$id", TvType.Anime) { - this.posterUrl = slug.fixImageUrl(type) - } - } - - private fun String.fixImageUrl(param: Image): String { - return when (param) { - Image.Episode -> { - "$posterUrl/images/animes/screens/$this/130x74/007.jpg" - } - Image.Anime -> { - "$mainUrl/_next/image?url=$posterUrl/images/animes/capas/130x209/$this.jpg&w=384&q=75" - } - Image.Filme -> { - "$mainUrl/_next/image?url=$posterUrl/images/filmes/capas/130x209/$this.jpg&w=384&q=75" - } - } - } - - enum class Image { - Episode, - Anime, - Filme, - } - - data class Load( - val slug_serie: String? = null, - val n_episodio: String? = null, - val type: String? = null, - ) - - data class DataEpisode( - @JsonProperty("id_series_episodios") val id_series_episodios: Int? = null, - @JsonProperty("n_episodio") val n_episodio: String? = null, - @JsonProperty("titulo_episodio") val titulo_episodio: String? = null, - @JsonProperty("sinopse_episodio") val sinopse_episodio: String? = null, - @JsonProperty("generate_id") val generate_id: String? = null, - @JsonProperty("anime") val anime: HashMap? = null, - ) - - data class LoadAnime( - @JsonProperty("data") val data: ArrayList? = arrayListOf() - ) - - data class DataAnime( - @JsonProperty("titulo") val titulo: String? = null, - @JsonProperty("generate_id") val generate_id: String? = null, - @JsonProperty("slug_serie") val slug_serie: String? = null, - @JsonProperty("total_eps_anime") val total_eps_anime: Int? = null, - ) - - data class DataFilme( - @JsonProperty("nome_filme") val nome_filme: String? = null, - @JsonProperty("generate_id") val generate_id: String? = null, - @JsonProperty("slug_filme") val slug_filme: String? = null, - ) - - data class SearchAnime( - @JsonProperty("data_anime") val data_anime: ArrayList? = arrayListOf(), - @JsonProperty("data_filme") val data_filme: ArrayList? = arrayListOf(), - ) - -} \ No newline at end of file diff --git a/Anroll/src/main/kotlin/com/hexated/AnrollPlugin.kt b/Anroll/src/main/kotlin/com/hexated/AnrollPlugin.kt deleted file mode 100644 index 431b5f31..00000000 --- a/Anroll/src/main/kotlin/com/hexated/AnrollPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class AnrollPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Anroll()) - } -} \ No newline at end of file diff --git a/Dizikorea/build.gradle.kts b/Dizikorea/build.gradle.kts deleted file mode 100644 index f5df22d2..00000000 --- a/Dizikorea/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -// use an integer for version numbers -version = 1 - - -cloudstream { - language = "tr" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf("AsianDrama",) - - iconUrl = "https://www.google.com/s2/favicons?domain=dizikorea.com&sz=%size%" -} \ No newline at end of file diff --git a/Dizikorea/src/main/AndroidManifest.xml b/Dizikorea/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Dizikorea/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Dizikorea/src/main/kotlin/com/hexated/Dizikorea.kt b/Dizikorea/src/main/kotlin/com/hexated/Dizikorea.kt deleted file mode 100644 index adb1d95f..00000000 --- a/Dizikorea/src/main/kotlin/com/hexated/Dizikorea.kt +++ /dev/null @@ -1,203 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element -import java.net.URI - -class Dizikorea : MainAPI() { - override var mainUrl = "https://dizikorea.com" - override var name = "Dizikorea" - override val hasMainPage = true - override var lang = "tr" - override val hasDownloadSupport = true - override val hasQuickSearch = true - override val supportedTypes = setOf(TvType.AsianDrama) - - override val mainPage = mainPageOf( - "$mainUrl/diziler/page/" to "Kore Dizileri", - "$mainUrl/kore-filmleri-izle/page/" to "Son Eklenen Filmler", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("ul li.segment-poster").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val title = this.selectFirst("h2.truncate")?.text()?.trim() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) - - return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { - this.posterUrl = posterUrl - } - } - - override suspend fun quickSearch(query: String): List? = search(query) - - override suspend fun search(query: String): List? { - return app.post("$mainUrl/ajax.php?qr=$query") - .parsedSafe()?.data?.result?.mapNotNull { item -> - newTvSeriesSearchResponse( - item.s_name ?: return@mapNotNull null, - item.s_link ?: return@mapNotNull null, - TvType.AsianDrama - ) { - this.posterUrl = fixUrlNull(item.s_image) - } - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.page-title")?.ownText()?.trim() ?: return null - val poster = fixUrlNull(document.selectFirst("a.ui.image img")?.attr("data-src")) - val tags = document.select("div.nano-content div:contains(Tür:) a").map { it.text() } - - val year = document.selectFirst("table.ui.unstackable tr td:contains(Yapım Yılı) a")?.text() - ?.trim() - ?.toIntOrNull() - val description = document.selectFirst("p#tv-series-desc")?.text()?.trim() - val rating = - document.selectFirst("table.ui.unstackable tr td:contains(IMDb Puanı) .color-imdb") - ?.text()?.trim() - .toRatingInt() - val actors = document.select("div.global-box div.item").map { - Actor( - it.select("h5.truncate").text().trim(), - fixUrlNull(it.selectFirst("img")?.attr("src")) - ) - } - val type = if (document.select("div.all-seriespart") - .isNullOrEmpty() - ) TvType.Movie else TvType.TvSeries - val trailer = document.selectFirst("a.prettyPhoto")?.attr("href") - - return when (type) { - TvType.Movie -> { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - addTrailer(trailer) - } - } - else -> { - val episodes = document.select("div.all-seriespart div.el-item").map { ep -> - Episode( - fixUrl(ep.selectFirst("a")!!.attr("href")), - episode = ep.attr("data-epnumber").toIntOrNull(), - season = ep.selectFirst("span.season-name")?.text()?.filter { it.isDigit() } - ?.toIntOrNull() - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - addTrailer(trailer) - } - } - } - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - private suspend fun invokeLokalSource( - url: String, - source: String, - callback: (ExtractorLink) -> Unit - ) { - val script = app.get(url, referer = "$mainUrl/").document.select("script") - .find { it.data().contains("sources:") }?.data()?.substringAfter("sources: [") - ?.substringBefore("],")?.replace(Regex("\"?file\"?"), "\"file\"") - - AppUtils.tryParseJson(script)?.file?.let { link -> - if (link.contains(".m3u8")) { - M3u8Helper.generateM3u8( - source, - fixUrl(link), - getBaseUrl(url) - ).forEach(callback) - } else { - callback.invoke( - ExtractorLink( - source, - source, - fixUrl(link), - "$mainUrl/", - Qualities.Unknown.value, - ) - ) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - val sources: MutableList = mutableListOf() - - val mainServer = document.select("div#singlePlay iframe").attr("src") - sources.add(mainServer) - - document.select("ul.linkler li").apmap { - val server = - app.get(it.select("a").attr("href")).document.select("div#singlePlay iframe") - .attr("src") - if (sources.isNotEmpty()) sources.add(fixUrl(server)) - } - - sources.distinct().apmap { link -> - when { - link.startsWith("https://playerkorea") -> invokeLokalSource(link, this.name, callback) - link.startsWith("https://vidmoly") -> invokeLokalSource(link, "Vidmoly", callback) - else -> loadExtractor(link, "$mainUrl/", subtitleCallback, callback) - } - } - - return true - } - - private data class SearchItem( - @JsonProperty("s_link") val s_link: String? = null, - @JsonProperty("s_image") val s_image: String? = null, - @JsonProperty("s_name") val s_name: String? = null, - ) - - private data class Result( - @JsonProperty("result") val result: ArrayList = arrayListOf(), - ) - - private data class Search( - @JsonProperty("data") val data: Result? = null, - ) - - private data class Source( - @JsonProperty("file") val file: String? = null, - ) - -} \ No newline at end of file diff --git a/Dizikorea/src/main/kotlin/com/hexated/DizikoreaPlugin.kt b/Dizikorea/src/main/kotlin/com/hexated/DizikoreaPlugin.kt deleted file mode 100644 index 06e5083f..00000000 --- a/Dizikorea/src/main/kotlin/com/hexated/DizikoreaPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class DizikoreaPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Dizikorea()) - } -} \ No newline at end of file diff --git a/DramaSerial/build.gradle.kts b/DramaSerial/build.gradle.kts deleted file mode 100644 index e00ab652..00000000 --- a/DramaSerial/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 5 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=149.3.170.35&sz=%size%" -} \ No newline at end of file diff --git a/DramaSerial/src/main/AndroidManifest.xml b/DramaSerial/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/DramaSerial/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/DramaSerial/src/main/kotlin/com/hexated/DramaSerial.kt b/DramaSerial/src/main/kotlin/com/hexated/DramaSerial.kt deleted file mode 100644 index 1c1113dc..00000000 --- a/DramaSerial/src/main/kotlin/com/hexated/DramaSerial.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.INFER_TYPE -import com.lagradost.cloudstream3.utils.getQualityFromName -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element - -class DramaSerial : MainAPI() { - override var mainUrl = "https://tv3.dramaserial.id" - private var serverUrl = "http://31.220.73.179/" - override var name = "DramaSerial" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - override val supportedTypes = setOf(TvType.AsianDrama) - - override val mainPage = mainPageOf( - "$mainUrl/page/" to "Latest Movie", - "$mainUrl/Genre/ongoing/page/" to "Ongoing", - "$mainUrl/Genre/drama-serial-korea/page/" to "Drama Serial Korea", - "$mainUrl/Genre/drama-serial-jepang/page/" to "Drama Serial Jepang", - "$mainUrl/Genre/drama-serial-mandarin/page/" to "Drama Serial Mandarin", - "$mainUrl/Genre/drama-serial-filipina/page/" to "Drama Serial Filipina", - "$mainUrl/Genre/drama-serial-india/page/" to "Drama Serial India", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("main#main article").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val title = this.selectFirst("h2.entry-title a")?.text()?.trim() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val episode = - this.selectFirst("div.gmr-episode-item")?.text()?.filter { it.isDigit() }?.toIntOrNull() - - return newAnimeSearchResponse(title, href, TvType.AsianDrama) { - this.posterUrl = posterUrl - addSub(episode) - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query&post_type[]=post&post_type[]=tv" - val document = app.get(link).document - - return document.select("main#main article").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("h1.entry-title")!!.text().trim() - val poster = fixUrlNull(document.selectFirst("figure.pull-left img")?.attr("src")) - val tags = - document.select("div.gmr-movie-innermeta span:contains(Genre:) a").map { it.text() } - val year = - document.selectFirst("div.gmr-movie-innermeta span:contains(Year:) a")!!.text().trim() - .toIntOrNull() - val duration = - document.selectFirst("div.gmr-movie-innermeta span:contains(Duration:)")?.text() - ?.filter { it.isDigit() }?.toIntOrNull() - val description = document.select("div.entry-content.entry-content-single div.entry-content.entry-content-single").text().trim() - val type = if(document.select("div.page-links").isNullOrEmpty()) TvType.Movie else TvType.AsianDrama - - if (type == TvType.Movie) { - return newMovieLoadResponse(title, url, TvType.Movie, url) { - posterUrl = poster - this.year = year - plot = description - this.tags = tags - this.duration = duration - } - } else { - val episodes = document.select("div.page-links span.page-link-number").mapNotNull { eps -> - val episode = eps.text().filter { it.isDigit() }.toIntOrNull() - val link = if(episode == 1) { - url - } else { - eps.parent()?.attr("href") - } - Episode( - link ?: return@mapNotNull null, - episode = episode, - ) - } - return newTvSeriesLoadResponse(title, url, TvType.AsianDrama, episodes = episodes) { - posterUrl = poster - this.year = year - this.duration = duration - plot = description - this.tags = tags - } - } - } - - private suspend fun invokeGetbk( - url: String, - callback: (ExtractorLink) -> Unit - ) { - val script = app.get( - url, - referer = "$serverUrl/" - ).document.selectFirst("script:containsData(sources)")?.data() ?: return - - val json = "\"sources\":\\s*\\[(.*)]".toRegex().find(script)?.groupValues?.get(1) - AppUtils.tryParseJson>("[$json]")?.map { - callback.invoke( - ExtractorLink( - "Getbk", - "Getbk", - it.file ?: return@map, - "$serverUrl/", - getQualityFromName(it.label), - INFER_TYPE, - ) - ) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - - val iframe = document.select("iframe[name=juraganfilm]").attr("src") - app.get(iframe, referer = "$mainUrl/").document.select("div#header-slider ul li") - .apmap { mLink -> - mLink.attr("onclick").substringAfter("frame('").substringBefore("')").let { iLink -> - val iMovie = iLink.substringAfter("movie=").substringBefore("&") - val mIframe = iLink.substringAfter("iframe=") - val iUrl = "$serverUrl/stream/$mIframe.php?movie=$iMovie" - if(mIframe == "getbk") { - invokeGetbk(iUrl, callback) - } else { - val link = app.get( - iUrl, - referer = "$serverUrl/" - ).document.selectFirst("iframe")?.attr("src") ?: return@apmap null - loadExtractor(fixUrl(link), "$serverUrl/", subtitleCallback, callback) - } - } - } - - return true - - } - - private data class Sources( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - ) - - -} - -class Bk21 : Filesim() { - override val name = "Bk21" - override var mainUrl = "https://bk21.net" -} - -class Lkc21 : Filesim() { - override val name = "Lkc21" - override var mainUrl = "https://lkc21.net" -} diff --git a/DramaSerial/src/main/kotlin/com/hexated/DramaSerialPlugin.kt b/DramaSerial/src/main/kotlin/com/hexated/DramaSerialPlugin.kt deleted file mode 100644 index afb43ef7..00000000 --- a/DramaSerial/src/main/kotlin/com/hexated/DramaSerialPlugin.kt +++ /dev/null @@ -1,16 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class DramaSerialPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(DramaSerial()) - registerExtractorAPI(Bk21()) - registerExtractorAPI(Lkc21()) - } -} \ No newline at end of file diff --git a/DramaidProvider/build.gradle.kts b/DramaidProvider/build.gradle.kts deleted file mode 100644 index 1f5c51de..00000000 --- a/DramaidProvider/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -// use an integer for version numbers -version = 10 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - description = "Include: Oppadrama" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=dramaid.asia&sz=%size%" -} \ No newline at end of file diff --git a/DramaidProvider/src/main/AndroidManifest.xml b/DramaidProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/DramaidProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt deleted file mode 100644 index a20c8136..00000000 --- a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt +++ /dev/null @@ -1,205 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.extractors.XStreamCdn -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.getQualityFromName -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -open class DramaidProvider : MainAPI() { - override var mainUrl = "https://dramaid.skin" - override var name = "DramaId" - override val hasMainPage = true - override var lang = "id" - override val supportedTypes = setOf(TvType.AsianDrama) - - companion object { - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - - fun getType(t: String?): TvType { - return when { - t?.contains("Movie", true) == true -> TvType.Movie - t?.contains("Anime", true) == true -> TvType.Anime - else -> TvType.AsianDrama - } - } - } - - override val mainPage = mainPageOf( - "&status=&type=&order=update" to "Drama Terbaru", - "&order=latest" to "Baru Ditambahkan", - "&status=&type=&order=popular" to "Drama Popular", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val document = app.get("$mainUrl/series/?page=$page${request.data}").document - val home = document.select("article[itemscope=itemscope]").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperDramaLink(uri: String): String { - return if (uri.contains("-episode-")) { - "$mainUrl/series/" + Regex("$mainUrl/(.+)-ep.+").find(uri)?.groupValues?.get(1) - } else { - uri - } - } - - private fun Element.toSearchResult(): SearchResponse? { - val href = getProperDramaLink(this.selectFirst("a.tip")!!.attr("href")) - val title = this.selectFirst("h2[itemprop=headline]")?.text()?.trim() ?: return null - val posterUrl = fixUrlNull(this.select("img:last-child").attr("src")) - - return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { - this.posterUrl = posterUrl - } - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/?s=$query").document - return document.select("article[itemscope=itemscope]").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("h1.entry-title")?.text()?.trim() ?: "" - val poster = fixUrlNull(document.select("div.thumb img:last-child").attr("src")) - val tags = document.select(".genxed > a").map { it.text() } - val type = document.selectFirst(".info-content .spe span:contains(Tipe:)")?.ownText() - val year = Regex("\\d, ([0-9]*)").find( - document.selectFirst(".info-content > .spe > span > time")!!.text().trim() - )?.groupValues?.get(1).toString().toIntOrNull() - val status = getStatus( - document.select(".info-content > .spe > span:nth-child(1)") - .text().trim().replace("Status: ", "") - ) - val description = document.select(".entry-content > p").text().trim() - - val episodes = document.select(".eplister > ul > li").mapNotNull { - val name = it.selectFirst("a > .epl-title")?.text() - val link = fixUrl(it.selectFirst("a")?.attr("href") ?: return@mapNotNull null) - Episode( - link, - name, - ) - }.reversed() - - val recommendations = - document.select(".listupd > article[itemscope=itemscope]").mapNotNull { rec -> - rec.toSearchResult() - } - - return newTvSeriesLoadResponse( - title, - url, - getType(type), - episodes = episodes - ) { - posterUrl = poster - this.year = year - showStatus = status - plot = description - this.tags = tags - this.recommendations = recommendations - } - - } - - private data class Sources( - @JsonProperty("file") val file: String, - @JsonProperty("label") val label: String, - @JsonProperty("type") val type: String, - @JsonProperty("default") val default: Boolean? - ) - - private data class Tracks( - @JsonProperty("file") val file: String, - @JsonProperty("label") val label: String, - @JsonProperty("kind") val type: String, - @JsonProperty("default") val default: Boolean? - ) - - private suspend fun invokeDriveSource( - url: String, - name: String, - subCallback: (SubtitleFile) -> Unit, - sourceCallback: (ExtractorLink) -> Unit - ) { - val server = app.get(url).document.selectFirst(".picasa")?.nextElementSibling()?.data() - - val source = "[${server!!.substringAfter("sources: [").substringBefore("],")}]".trimIndent() - val trackers = server.substringAfter("tracks:[").substringBefore("],") - .replace("//language", "") - .replace("file", "\"file\"") - .replace("label", "\"label\"") - .replace("kind", "\"kind\"").trimIndent() - - tryParseJson>(source)?.map { - sourceCallback( - ExtractorLink( - name, - "Drive", - fixUrl(it.file), - referer = "https://motonews.club/", - quality = getQualityFromName(it.label) - ) - ) - } - - tryParseJson(trackers)?.let { - subCallback.invoke( - SubtitleFile( - if (it.label.contains("Indonesia")) "${it.label}n" else it.label, - it.file - ) - ) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - val sources = document.select(".mobius > .mirror > option").mapNotNull { - fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src")) - } - - sources.map { - it.replace("https://ndrama.xyz", "https://www.fembed.com") - }.apmap { - when { - it.contains("motonews") -> invokeDriveSource( - it, - this.name, - subtitleCallback, - callback - ) - - else -> loadExtractor(it, "$mainUrl/", subtitleCallback, callback) - } - } - - return true - } - -} - diff --git a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt deleted file mode 100644 index 48444723..00000000 --- a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProviderPlugin.kt +++ /dev/null @@ -1,18 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class DramaidProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(DramaidProvider()) - registerMainAPI(Oppadrama()) - registerExtractorAPI(Vanfem()) - registerExtractorAPI(Filelions()) - registerExtractorAPI(Gcam()) - } -} \ No newline at end of file diff --git a/DramaidProvider/src/main/kotlin/com/hexated/Extractors.kt b/DramaidProvider/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index 7c37eced..00000000 --- a/DramaidProvider/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,71 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.APIHolder -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.extractors.XStreamCdn -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper - -open class Gcam : ExtractorApi() { - override val name = "Gcam" - override val mainUrl = "https://gdrive.cam" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val response = app.get(url, referer = referer).text - val kaken = "kaken\\s*=\\s*\"(.*)\"".toRegex().find(response)?.groupValues?.get(1) - val json = app.get("https://cdn2.gdrive.cam/api/?${kaken ?: return}=&_=${APIHolder.unixTimeMS}").parsedSafe() - - json?.sources?.map { - M3u8Helper.generateM3u8( - name, - it.file ?: return@map, - "" - ).forEach(callback) - } - - json?.tracks?.map { - subtitleCallback.invoke( - SubtitleFile( - it.label ?: return@map, - it.file ?: return@map - ) - ) - } - - } - - data class Tracks( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - ) - - data class Sources( - @JsonProperty("file") val file: String? = null, - ) - - data class Response( - @JsonProperty("sources") val sources: ArrayList? = arrayListOf(), - @JsonProperty("tracks") val tracks: ArrayList? = arrayListOf(), - ) - -} - -class Vanfem : XStreamCdn() { - override val name: String = "Vanfem" - override val mainUrl: String = "https://vanfem.com" -} - -class Filelions : Filesim() { - override val name = "Filelions" - override var mainUrl = "https://filelions.live" -} \ No newline at end of file diff --git a/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt b/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt deleted file mode 100644 index 856f3674..00000000 --- a/DramaidProvider/src/main/kotlin/com/hexated/Oppadrama.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.extractors.Filesim - -class Oppadrama : DramaidProvider() { - override var mainUrl = "http://185.217.95.30" - override var name = "Oppadrama" -} \ No newline at end of file diff --git a/Dubbindo/build.gradle.kts b/Dubbindo/build.gradle.kts deleted file mode 100644 index d92b972b..00000000 --- a/Dubbindo/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 1 - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "TvSeries", - "Movie", - "Cartoon", - "Anime", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=www.dubbindo.xyz&sz=%size%" -} \ No newline at end of file diff --git a/Dubbindo/src/main/AndroidManifest.xml b/Dubbindo/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Dubbindo/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt b/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt deleted file mode 100644 index 8ef0ac76..00000000 --- a/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt +++ /dev/null @@ -1,136 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element - -class Dubbindo : MainAPI() { - override var mainUrl = "https://www.dubbindo.site" - override var name = "Dubbindo" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.TvSeries, - TvType.Movie, - TvType.Cartoon, - TvType.Anime, - ) - - override val mainPage = mainPageOf( - "$mainUrl/videos/category/1" to "Movie", - "$mainUrl/videos/category/3" to "TV Series", - "$mainUrl/videos/category/5" to "Anime Series", - "$mainUrl/videos/category/4" to "Anime Movie", - "$mainUrl/videos/category/other" to "Other", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("${request.data}?page_id=$page").document - val home = document.select("div.videos-latest-list.pt_timeline_vids div.video-wrapper") - .mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = true - ), - hasNext = true - ) - } - - private fun Element.toSearchResult(): TvSeriesSearchResponse? { - val title = this.selectFirst("h4,div.video-title")?.text()?.trim() ?: "" - val href = this.selectFirst("a")?.attr("href") ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - } - } - - override suspend fun search(query: String): List { - val searchResponse = mutableListOf() - for (i in 1..10) { - val document = - app.get( - "$mainUrl/search?keyword=$query&page_id=$i", - ).document - val results = document.select("div.videos-latest-list.row div.video-wrapper") - .mapNotNull { - it.toSearchResult() - } - searchResponse.addAll(results) - if (results.isEmpty()) break - } - return searchResponse - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("div.video-big-title h1")?.text() ?: return null - val poster = document.selectFirst("meta[property=og:image]")?.attr("content") - val tags = document.select("div.pt_categories li a").map { it.text() } - val description = document.select("div.watch-video-description p").text() - val recommendations = document.select("div.related-video-wrapper").mapNotNull { - it.toSearchResult() - } - val video = document.select("video#my-video source").map { - Video( - it.attr("src"), - it.attr("size"), - it.attr("type"), - ) - } - - return newMovieLoadResponse(title, url, TvType.Movie, video.toJson()) { - posterUrl = poster - plot = description - this.tags = tags - this.recommendations = recommendations - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - tryParseJson>(data)?.map { video -> - if(video.type == "video/mp4" || video.type == "video/x-msvideo" || video.type == "video/x-matroska") { - callback.invoke( - ExtractorLink( - this.name, - this.name, - video.src ?: return@map, - "", - video.res?.toIntOrNull() ?: Qualities.Unknown.value, - ) - ) - } else { - loadExtractor(video.src ?: return@map, "", subtitleCallback, callback) - } - } - - return true - } - - data class Video( - val src: String? = null, - val res: String? = null, - val type: String? = null, - ) - -} diff --git a/Dubbindo/src/main/kotlin/com/hexated/DubbindoPlugin.kt b/Dubbindo/src/main/kotlin/com/hexated/DubbindoPlugin.kt deleted file mode 100644 index 22d3b82d..00000000 --- a/Dubbindo/src/main/kotlin/com/hexated/DubbindoPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class DubbindoPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Dubbindo()) - } -} \ No newline at end of file diff --git a/DubokuProvider/build.gradle.kts b/DubokuProvider/build.gradle.kts deleted file mode 100644 index c5826742..00000000 --- a/DubokuProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 1 - - -cloudstream { - language = "zh" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=www.duboku.tv&sz=%size%" -} \ No newline at end of file diff --git a/DubokuProvider/src/main/AndroidManifest.xml b/DubokuProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/DubokuProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/DubokuProvider/src/main/kotlin/com/hexated/DubokuProvider.kt b/DubokuProvider/src/main/kotlin/com/hexated/DubokuProvider.kt deleted file mode 100644 index 1262fb5d..00000000 --- a/DubokuProvider/src/main/kotlin/com/hexated/DubokuProvider.kt +++ /dev/null @@ -1,133 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import org.jsoup.nodes.Element - -class DubokuProvider : MainAPI() { - override var mainUrl = "https://www.duboku.tv" - override var name = "Duboku" - override val hasMainPage = true - override var lang = "zh" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.AsianDrama, - ) - - override val mainPage = mainPageOf( - "$mainUrl/vodshow/2--time------" to "连续剧 时间", - "$mainUrl/vodshow/2--hits------" to "连续剧 人气", - "$mainUrl/vodshow/13--time------" to "陆剧 时间", - "$mainUrl/vodshow/13--hits------" to "陆剧 人气", - "$mainUrl/vodshow/15--time------" to "日韩剧 时间", - "$mainUrl/vodshow/15--hits------" to "日韩剧 人气", - "$mainUrl/vodshow/21--time------" to "短剧 时间", - "$mainUrl/vodshow/21--hits------" to "短剧 人气", - "$mainUrl/vodshow/16--time------" to "英美剧 时间", - "$mainUrl/vodshow/16--hits------" to "英美剧 人气", - "$mainUrl/vodshow/14--time------" to "台泰剧 时间", - "$mainUrl/vodshow/14--hits------" to "台泰剧 人气", - "$mainUrl/vodshow/20--time------" to "港剧 时间", - "$mainUrl/vodshow/20--hits------" to "港剧 人气", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("${request.data}$page---.html").document - val home = document.select("ul.myui-vodlist.clearfix li").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("h4.title a")?.text()?.trim() ?: return null - val href = fixUrl(this.selectFirst("a")?.attr("href").toString()) - val posterUrl = fixUrlNull(this.selectFirst("a")?.attr("data-original")) - val episode = this.selectFirst("span.pic-text.text-right")?.text()?.filter { it.isDigit() } - ?.toIntOrNull() - - return newAnimeSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - addSub(episode) - } - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/vodsearch/-------------.html?wd=$query&submit=").document - - return document.select("ul#searchList li").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.title")?.text()?.trim() ?: return null - val tvType = if (document.select("ul.myui-content__list li").size == 1 - ) TvType.Movie else TvType.TvSeries - val actors = document.select("p.data")[2].select("a").map { it.text() } - - val episodes = document.select("ul.myui-content__list li").map { - val href = fixUrl(it.select("a").attr("href")) - val name = it.select("a").text().trim() - Episode( - data = href, - name = name, - ) - } - return newTvSeriesLoadResponse(title, url, tvType, episodes) { - this.posterUrl = fixUrlNull( - document.selectFirst("a.myui-vodlist__thumb.picture img")?.attr("data-original") - ) - this.year = - document.select("p.data")[0].select("a").last()?.text()?.trim()?.toIntOrNull() - this.plot = document.selectFirst("span.sketch.content")?.text()?.trim() - this.tags = document.select("p.data")[0].select("a").map { it.text() } - this.rating = document.select("div#rating span.branch").text().toRatingInt() - addActors(actors) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - app.get(data).document.select("script").map { script -> - if (script.data().contains("var player_data={")) { - val dataJson = - script.data().substringAfter("var player_data={").substringBefore("}") - tryParseJson("{$dataJson}")?.let { source -> - M3u8Helper.generateM3u8( - this.name, - source.url ?: return@map, - referer = "https://w.duboku.io/", - headers = mapOf("Origin" to "https://w.duboku.io") - ).forEach(callback) - } - } - } - - - return true - } - - data class Sources( - @JsonProperty("url") val url: String?, - ) - - -} \ No newline at end of file diff --git a/DubokuProvider/src/main/kotlin/com/hexated/DubokuProviderPlugin.kt b/DubokuProvider/src/main/kotlin/com/hexated/DubokuProviderPlugin.kt deleted file mode 100644 index b82c70b4..00000000 --- a/DubokuProvider/src/main/kotlin/com/hexated/DubokuProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class DubokuProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(DubokuProvider()) - } -} \ No newline at end of file diff --git a/FilmPalast/build.gradle.kts b/FilmPalast/build.gradle.kts deleted file mode 100644 index 6f3a4bdc..00000000 --- a/FilmPalast/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -// use an integer for version numbers -version = 1 - - -cloudstream { - // All of these properties are optional, you can safely remove them - - description = "German Filmpalast provider" - authors = listOf("Bnyro") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - - // List of video source types. Users are able to filter for extensions in a given category. - // You can find a list of avaliable types here: - // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html - tvTypes = listOf("TvSeries", "Movie") -} diff --git a/FilmPalast/src/main/AndroidManifest.xml b/FilmPalast/src/main/AndroidManifest.xml deleted file mode 100644 index 1863f02a..00000000 --- a/FilmPalast/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/FilmPalast/src/main/kotlin/com/example/FilmpalastExtractors.kt b/FilmPalast/src/main/kotlin/com/example/FilmpalastExtractors.kt deleted file mode 100644 index 11611566..00000000 --- a/FilmPalast/src/main/kotlin/com/example/FilmpalastExtractors.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.example - -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.extractors.StreamTape -import com.lagradost.cloudstream3.extractors.Streamhub -import com.lagradost.cloudstream3.extractors.Voe - -class StreamTapeTo : StreamTape() { - override var mainUrl = "https://streamtape.com" -} - -class StreamHubGg : Streamhub() { - override var name = "Streamhub Gg" - override var mainUrl = "https://streamhub.gg" -} - -class VoeSx: Voe() { - override val name = "Voe Sx" - override val mainUrl = "https://voe.sx" -} - -class MetaGnathTuggers : Voe() { - override val name = "Metagnathtuggers" - override val mainUrl = "https://metagnathtuggers.com" -} - -class FileLions : Filesim() { - override val name = "Filelions" - override var mainUrl = "https://filelions.to" -} diff --git a/FilmPalast/src/main/kotlin/com/example/FilmpalastPlugin.kt b/FilmPalast/src/main/kotlin/com/example/FilmpalastPlugin.kt deleted file mode 100644 index 023c0f59..00000000 --- a/FilmPalast/src/main/kotlin/com/example/FilmpalastPlugin.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.example - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class FilmpalastPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(FilmpalastProvider()) - registerExtractorAPI(StreamTapeTo()) - registerExtractorAPI(StreamHubGg()) - registerExtractorAPI(VoeSx()) - registerExtractorAPI(MetaGnathTuggers()) - registerExtractorAPI(FileLions()) - } -} \ No newline at end of file diff --git a/FilmPalast/src/main/kotlin/com/example/FilmpalastProvider.kt b/FilmPalast/src/main/kotlin/com/example/FilmpalastProvider.kt deleted file mode 100644 index 7c606967..00000000 --- a/FilmPalast/src/main/kotlin/com/example/FilmpalastProvider.kt +++ /dev/null @@ -1,82 +0,0 @@ -package com.example - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element -import org.jsoup.select.Elements - -class FilmpalastProvider : MainAPI() { - override var mainUrl = "https://filmpalast.to" - override var name = "Filmpalast" - override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) - - override var lang = "de" - override val hasMainPage = true - - private fun Element.toSearchResponse(): SearchResponse { - val title = select("cite a.rb").text() - val url = select("a.rb").attr("href") - val posterPath = select("img.cover-opacity").attr("src") - return newMovieSearchResponse(title, type = TvType.Movie, url = url).apply { - this.posterUrl = "$mainUrl$posterPath" - } - } - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val movies = app.get("$mainUrl/movies/top").document - val movieResults = movies.select("#content .liste.rb").mapNotNull { - it.toSearchResponse() - } - val series = app.get("$mainUrl/serien/view").document - val seriesResults = series.select("#content .liste.rb").mapNotNull { - it.toSearchResponse() - } - val homePageLists = listOf(HomePageList("Movies", movieResults), HomePageList("Series", seriesResults)) - return newHomePageResponse(homePageLists, hasNext = false) - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search/title/$query").document - return document.select("#content .glowliste").mapNotNull { - it.toSearchResponse() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document.select("#content") - - val title = document.select("h2.rb.bgDark").text() - val imagePath = document.select(".detail.rb img.cover2").attr("src") - val description = document.select("span[itemprop=description]").text() - val details = document.select("detail-content-list li") - val year = details.first()?.html()?.split("
")?.getOrNull(1)?.filter { it.isDigit() }?.toIntOrNull() - val duration = details.select("em").first()?.ownText()?.filter { it.isDigit() }?.toIntOrNull() - - val links = document.select(".currentStreamLinks a.iconPlay").mapNotNull { - it.attr("href") ?: it.attr("data-player-url") - } - return newMovieLoadResponse(title, url, TvType.Movie, links.toJson()).apply { - this.posterUrl = "$mainUrl$imagePath" - this.plot = description - this.duration = duration - this.year = year - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val links = parseJson>(data) - links.apmap { - val link = fixUrlNull(it) ?: return@apmap null - loadExtractor(link, "$mainUrl/", subtitleCallback, callback) - } - return links.isNotEmpty() - } -} diff --git a/Gomov/build.gradle.kts b/Gomov/build.gradle.kts deleted file mode 100644 index dd797cdd..00000000 --- a/Gomov/build.gradle.kts +++ /dev/null @@ -1,36 +0,0 @@ -import org.jetbrains.kotlin.konan.properties.Properties - -// use an integer for version numbers -version = 29 - -android { - defaultConfig { - val properties = Properties() - properties.load(project.rootProject.file("local.properties").inputStream()) - buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"") - } -} - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - description = "Includes: DutaMovie, Ngefilm, Nodrakorid, Multiplex, Pusatfilm" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=gomov.bio&sz=%size%" -} \ No newline at end of file diff --git a/Gomov/src/main/AndroidManifest.xml b/Gomov/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Gomov/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt deleted file mode 100644 index 0643ffe2..00000000 --- a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.httpsify -import com.lagradost.cloudstream3.utils.loadExtractor - -class DutaMovie : Gomov() { - override var mainUrl = "https://drama.dutamovie21.tech/" - override var name = "DutaMovie" - override val mainPage = mainPageOf( - "category/box-office/page/%d/" to "Box Office", - "category/serial-tv/page/%d/" to "Serial TV", - "category/animation/page/%d/" to "Animasi", - "country/korea/page/%d/" to "Serial TV Korea", - "country/indonesia/page/%d/" to "Serial TV Indonesia", - ) - -} diff --git a/Gomov/src/main/kotlin/com/hexated/Extractors.kt b/Gomov/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index 8cb8cc50..00000000 --- a/Gomov/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,90 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.apmap -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.base64Decode -import com.lagradost.cloudstream3.extractors.* -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.loadExtractor - -open class Uplayer : ExtractorApi() { - override val name = "Uplayer" - override val mainUrl = "https://uplayer.xyz" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val res = app.get(url,referer=referer).text - val m3u8 = Regex("file:\\s*\"(.*?m3u8.*?)\"").find(res)?.groupValues?.getOrNull(1) - M3u8Helper.generateM3u8( - name, - m3u8 ?: return, - mainUrl - ).forEach(callback) - } - -} - -open class Kotakajaib : ExtractorApi() { - override val name = "Kotakajaib" - override val mainUrl = "https://kotakajaib.me" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - app.get(url,referer=referer).document.select("ul#dropdown-server li a").apmap { - loadExtractor(base64Decode(it.attr("data-frame")), "$mainUrl/", subtitleCallback, callback) - } - } - -} - -class Doods : DoodLaExtractor() { - override var name = "Doods" - override var mainUrl = "https://doods.pro" -} - -class Dutamovie21 : StreamSB() { - override var name = "Dutamovie21" - override var mainUrl = "https://dutamovie21.xyz" -} - -class FilelionsTo : Filesim() { - override val name = "Filelions" - override var mainUrl = "https://filelions.to" -} - -class FilelionsOn : Filesim() { - override val name = "Filelions" - override var mainUrl = "https://filelions.online" -} - -class Lylxan : Filesim() { - override val name = "Lylxan" - override var mainUrl = "https://lylxan.com" -} - -class Embedwish : Filesim() { - override val name = "Embedwish" - override var mainUrl = "https://embedwish.com" -} - -class Likessb : StreamSB() { - override var name = "Likessb" - override var mainUrl = "https://likessb.com" -} - -class DbGdriveplayer : Gdriveplayer() { - override var mainUrl = "https://database.gdriveplayer.us" -} \ No newline at end of file diff --git a/Gomov/src/main/kotlin/com/hexated/Gomov.kt b/Gomov/src/main/kotlin/com/hexated/Gomov.kt deleted file mode 100644 index b3eadaf1..00000000 --- a/Gomov/src/main/kotlin/com/hexated/Gomov.kt +++ /dev/null @@ -1,204 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.httpsify -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element -import java.net.URI - -open class Gomov : MainAPI() { - override var mainUrl = "https://gomov.bio" - private var directUrl: String? = null - override var name = "Gomov" - override val hasMainPage = true - override var lang = "id" - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.AsianDrama - ) - - override val mainPage = mainPageOf( - "page/%d/?s&search=advanced&post_type=movie" to "Movies", - "category/western-series/page/%d/" to "Western Series", - "tv/page/%d/" to "Tv Shows", - "category/korean-series/page/%d/" to "Korean Series", - "category/chinese-series/page/%d/" to "Chinese Series", - "category/india-series/page/%d/" to "India Series", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val data = request.data.format(page) - val document = app.get("$mainUrl/$data").document - val home = document.select("article.item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("h2.entry-title > a")?.text()?.trim() ?: return null - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("a > img")?.getImageAttr()).fixImageQuality() - val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "") - return if (quality.isEmpty()) { - val episode = - Regex("Episode\\s?([0-9]+)").find(title)?.groupValues?.getOrNull(1)?.toIntOrNull() - ?: this.select("div.gmr-numbeps > span").text().toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addSub(episode) - } - } else { - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - addQuality(quality) - } - } - } - - private fun Element.toRecommendResult(): SearchResponse? { - val title = this.selectFirst("a > span.idmuvi-rp-title")?.text()?.trim() ?: return null - val href = this.selectFirst("a")!!.attr("href") - val posterUrl = fixUrlNull(this.selectFirst("a > img")?.getImageAttr().fixImageQuality()) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - } - - override suspend fun search(query: String): List { - return app.get("$mainUrl/?s=$query&post_type[]=post&post_type[]=tv").document.select("article.item") - .mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val fetch = app.get(url) - directUrl = getBaseUrl(fetch.url) - val document = fetch.document - - val title = - document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim() - .toString() - val poster = - fixUrlNull(document.selectFirst("figure.pull-left > img")?.getImageAttr())?.fixImageQuality() - val tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() } - - val year = - document.select("span.gmr-movie-genre:contains(Year:) > a").text().trim().toIntOrNull() - val tvType = if (url.contains("/tv/")) TvType.TvSeries else TvType.Movie - val description = document.selectFirst("div[itemprop=description] > p")?.text()?.trim() - val trailer = document.selectFirst("ul.gmr-player-nav li a.gmr-trailer-popup")?.attr("href") - val rating = - document.selectFirst("div.gmr-meta-rating > span[itemprop=ratingValue]")?.text() - ?.toRatingInt() - val actors = document.select("div.gmr-moviedata").last()?.select("span[itemprop=actors]") - ?.map { it.select("a").text() } - - val recommendations = document.select("div.idmuvi-rp ul li").mapNotNull { - it.toRecommendResult() - } - - return if (tvType == TvType.TvSeries) { - val episodes = document.select("div.vid-episodes a, div.gmr-listseries a").map { eps -> - val href = fixUrl(eps.attr("href")) - val name = eps.text() - val episode = name.split(" ").lastOrNull()?.filter { it.isDigit() }?.toIntOrNull() - val season = name.split(" ").firstOrNull()?.filter { it.isDigit() }?.toIntOrNull() - Episode( - href, - name, - season = if(name.contains(" ")) season else null, - episode = episode, - ) - }.filter { it.episode != null } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - val id = document.selectFirst("div#muvipro_player_content_id")?.attr("data-id") - - if(id.isNullOrEmpty()) { - document.select("ul.muvipro-player-tabs li a").apmap { ele -> - val iframe = app.get(fixUrl(ele.attr("href"))).document.selectFirst("div.gmr-embed-responsive iframe") - .getIframeAttr()?.let { httpsify(it) } ?: return@apmap - - loadExtractor(iframe, "$directUrl/", subtitleCallback, callback) - } - } else { - document.select("div.tab-content-ajax").apmap { ele -> - val server = app.post( - "$directUrl/wp-admin/admin-ajax.php", - data = mapOf("action" to "muvipro_player_content", "tab" to ele.attr("id"), "post_id" to "$id") - ).document.select("iframe").attr("src").let { httpsify(it) } - - loadExtractor(server, "$directUrl/", subtitleCallback, callback) - - } - } - - return true - - } - - private fun Element.getImageAttr(): String? { - return when { - this.hasAttr("data-src") -> this.attr("abs:data-src") - this.hasAttr("data-lazy-src") -> this.attr("abs:data-lazy-src") - this.hasAttr("srcset") -> this.attr("abs:srcset").substringBefore(" ") - else -> this.attr("abs:src") - } - } - - private fun Element?.getIframeAttr() : String? { - return this?.attr("data-litespeed-src").takeIf { it?.isNotEmpty() == true } ?: this?.attr("src") - } - - private fun String?.fixImageQuality(): String? { - if (this == null) return null - val regex = Regex("(-\\d*x\\d*)").find(this)?.groupValues?.get(0) ?: return this - return this.replace(regex, "") - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - -} \ No newline at end of file diff --git a/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt b/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt deleted file mode 100644 index a7b0c2b1..00000000 --- a/Gomov/src/main/kotlin/com/hexated/GomovPlugin.kt +++ /dev/null @@ -1,29 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class GomovPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Gomov()) - registerMainAPI(DutaMovie()) - registerMainAPI(Ngefilm()) - registerMainAPI(Nodrakorid()) - registerMainAPI(Multiplex()) - registerMainAPI(Pusatfilm()) - registerExtractorAPI(FilelionsTo()) - registerExtractorAPI(Likessb()) - registerExtractorAPI(DbGdriveplayer()) - registerExtractorAPI(Dutamovie21()) - registerExtractorAPI(Embedwish()) - registerExtractorAPI(Doods()) - registerExtractorAPI(Lylxan()) - registerExtractorAPI(FilelionsOn()) - registerExtractorAPI(Kotakajaib()) - registerExtractorAPI(Uplayer()) - } -} \ No newline at end of file diff --git a/Gomov/src/main/kotlin/com/hexated/Multiplex.kt b/Gomov/src/main/kotlin/com/hexated/Multiplex.kt deleted file mode 100644 index 1ea025f1..00000000 --- a/Gomov/src/main/kotlin/com/hexated/Multiplex.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.mainPageOf - -class Multiplex : Gomov() { - override var mainUrl = "http://5.189.181.147" - override var name = "Multiplex" - override val mainPage = mainPageOf( - "country/usa/page/%d/" to "Movie", - "west-series/page/%d/" to "West Series", - "nonton-drama-korea/page/%d/" to "Drama Korea", - ) - -} diff --git a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt deleted file mode 100644 index c70bebc8..00000000 --- a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.mainPageOf - -class Ngefilm : Gomov() { - override var mainUrl = "https://tv.ngefilm21.homes" - override var name = "Ngefilm" - override val mainPage = mainPageOf( - "/page/%d/?s&search=advanced&post_type=movie&index&orderby&genre&movieyear&country&quality=" to "Movies Terbaru", - "/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=&movieyear=&country=&quality=" to "Series Terbaru", - "/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=drakor&movieyear=&country=&quality=" to "Series Korea", - "/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=&movieyear=&country=indonesia&quality=" to "Series Indonesia", - ) - -} diff --git a/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt b/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt deleted file mode 100644 index c697f403..00000000 --- a/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt +++ /dev/null @@ -1,154 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import org.jsoup.nodes.Element -import java.net.URI - -class Nodrakorid : Gomov() { - override var mainUrl = "https://no-dra-kor-id.shop" - override var name = "Nodrakorid" - - override val mainPage = mainPageOf( - "genre/movie/page/%d/" to "Film Terbaru", - "genre/korean-movie/page/%d/" to "Film Korea", - "genre/drama/page/%d/" to "Drama Korea", - "genre/c-drama/c-drama-c-drama/page/%d/" to "Drama China", - "genre/thai-drama/page/%d/" to "Drama Thailand", - ) - - override suspend fun load(url: String): LoadResponse { - return super.load(url).apply { - when (this) { - is TvSeriesLoadResponse -> { - val doc = app.get(url).document - this.comingSoon = false - this.episodes = when { - doc.select("div.vid-episodes a, div.gmr-listseries a").isNotEmpty() -> this.episodes - doc.select("div#download").isEmpty() -> { - doc.select("div.entry-content p:contains(Episode)").distinctBy { - it.text() - }.mapNotNull { eps -> - val endSibling = eps.nextElementSiblings().select("p:contains(Episode)").firstOrNull() ?: eps.nextElementSiblings().select("div.content-moviedata").firstOrNull() - val siblings = eps.nextElementSiblingsUntil(endSibling).map { ele -> - ele.ownText().filter { it.isDigit() }.toIntOrNull() to ele.select("a") - .map { it.attr("href") to it.text() } - }.filter { it.first != null } - Episode(siblings.toJson(), episode = eps.text().toEpisode()) - } - } - else -> { - doc.select("div#download h3.title-download").mapNotNull { eps -> - val siblings = eps.nextElementSibling()?.select("li")?.map { ele -> - ele.text().filter { it.isDigit() }.toIntOrNull() to ele.select("a").map { - it.attr("href") to it.text().split(" ").first() - } - }?.filter { it.first != null } - Episode(siblings?.toJson() ?: return@mapNotNull null, episode = eps.text().toEpisode()) - } - } - } - } - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - return if (data.startsWith("[")) { - tryParseJson>(data)?.filter { it.first != 360 }?.map { - it.second.apmap { link -> - loadFixedExtractor( - fixEmbed(link.first, link.second), - it.first, - "$mainUrl/", - subtitleCallback, - callback - ) - } - } - true - } else { - super.loadLinks(data, isCasting, subtitleCallback, callback) - } - } - - private fun fixEmbed(url: String, server: String): String { - return when { - server.contains("streamsb", true) -> { - val host = getBaseUrl(url) - url.replace("$host/", "$host/e/") - } - - server.contains("hxfile", true) -> { - val host = getBaseUrl(url) - val id = url.substringAfterLast("/") - "$host/embed-$id.html" - } - - else -> url - } - } - - private fun String.toEpisode() : Int? { - return Regex("(?i)Episode\\s?([0-9]+)").find(this)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - private suspend fun loadFixedExtractor( - url: String, - quality: Int?, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - if(link.type == ExtractorLinkType.M3U8) link.quality else quality ?: Qualities.Unknown.value, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun Element.nextElementSiblingsUntil(untilElement: Element?): List { - val siblings = mutableListOf() - var currentElement = this.nextElementSibling() - - while (currentElement != null && currentElement != untilElement) { - siblings.add(currentElement) - currentElement = currentElement.nextElementSibling() - } - - return siblings - } - - data class LinkData( - @JsonProperty("first") var first: Int? = null, - @JsonProperty("second") var second: ArrayList = arrayListOf() - ) - - data class Second( - @JsonProperty("first") var first: String, - @JsonProperty("second") var second: String - ) -} diff --git a/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt b/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt deleted file mode 100644 index aabb0ecd..00000000 --- a/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt +++ /dev/null @@ -1,40 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.Episode -import com.lagradost.cloudstream3.LoadResponse -import com.lagradost.cloudstream3.TvSeriesLoadResponse -import com.lagradost.cloudstream3.* - -class Pusatfilm : Gomov() { - override var mainUrl = "https://tv2.pusatfilm21.art" - override var name = "Pusatfilm" - override val mainPage = mainPageOf( - "film-terbaru/page/%d/" to "Film Terbaru", - "series-terbaru/page/%d/" to "Series Terbaru", - "drama-korea/page/%d/" to "Drama Korea", - "drama-china/page/%d/" to "Drama China", - ) - - override suspend fun load(url: String): LoadResponse { - return super.load(url).apply { - when (this) { - is TvSeriesLoadResponse -> { - val document = app.get(url).document - this.episodes = document.select("div.vid-episodes a, div.gmr-listseries a").map { eps -> - val href = fixUrl(eps.attr("href")) - val name = eps.attr("title") - val episode = "Episode\\s*(\\d+)".toRegex().find(name)?.groupValues?.get(1) - val season = "Season\\s*(\\d+)".toRegex().find(name)?.groupValues?.get(1) - Episode( - href, - name, - season = season?.toIntOrNull(), - episode = episode?.toIntOrNull(), - ) - }.filter { it.episode != null } - } - } - } - } - -} diff --git a/GomunimeProvider/build.gradle.kts b/GomunimeProvider/build.gradle.kts deleted file mode 100644 index 96c05f73..00000000 --- a/GomunimeProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 2 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - -// description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 0 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=185.231.223.76&sz=%size%" -} \ No newline at end of file diff --git a/GomunimeProvider/src/main/AndroidManifest.xml b/GomunimeProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/GomunimeProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/GomunimeProvider/src/main/kotlin/com/hexated/GomunimeProvider.kt b/GomunimeProvider/src/main/kotlin/com/hexated/GomunimeProvider.kt deleted file mode 100644 index d9fa137b..00000000 --- a/GomunimeProvider/src/main/kotlin/com/hexated/GomunimeProvider.kt +++ /dev/null @@ -1,238 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup - -class GomunimeProvider : MainAPI() { - override var mainUrl = "https://185.231.223.76" - override var name = "Gomunime" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - - private const val mainServer = "https://path.onicdn.xyz/app/rapi.php" - - fun getType(t: String): TvType { - return if (t.contains("OVA") || t.contains("Special")) TvType.OVA - else if (t.contains("Movie")) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "e" to "Episode Baru", - "c" to "Completed", - "la" to "Live Action", - "t" to "Trending" - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val home = Jsoup.parse( - (app.post( - url = "$mainUrl/wp-admin/admin-ajax.php/wp-admin/admin-ajax.php", - headers = mapOf("Referer" to mainUrl), - data = mapOf( - "action" to "home_ajax", - "fungsi" to request.data, - "pag" to "$page" - ) - ).parsedSafe()?.html ?: throw ErrorLoadingException("Invalid Json reponse")) - ).select("li").mapNotNull { - val title = it.selectFirst("a.name")?.text()?.trim() ?: return@mapNotNull null - val href = getProperAnimeLink(it.selectFirst("a")!!.attr("href")) - val posterUrl = it.selectFirst("img")?.attr("src") - val type = getType(it.selectFirst(".taglist > span")!!.text().trim()) - val epNum = it.select(".tag.ep").text().replace(Regex("[^0-9]"), "").trim() - .toIntOrNull() - newAnimeSearchResponse(title, href, type) { - this.posterUrl = posterUrl - addSub(epNum) - } - } - - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("-episode")) { - val href = - "$mainUrl/anime/" + Regex("\\w\\d/(.*)-episode.*").find(uri)?.groupValues?.get(1) - .toString() - when { - href.contains("pokemon") -> href.replace(Regex("-[0-9]+"), "") - else -> href - } - } else { - uri - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query" - val document = app.get(link).document - - return document.select(".anime-list > li").map { - val title = it.selectFirst("a.name")!!.text() - val poster = it.selectFirst("img")!!.attr("src") - val tvType = getType(it.selectFirst(".taglist > span")?.text().toString()) - val href = fixUrl(it.selectFirst("a.name")!!.attr("href")) - - newAnimeSearchResponse(title, href, tvType) { - this.posterUrl = poster - addDubStatus(dubExist = false, subExist = true) - } - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst(".entry-title")?.text().toString() - val poster = document.selectFirst(".thumbposter > img")?.attr("data-lazy-src") - val tags = document.select(".genxed > a").map { it.text() } - - val year = Regex("\\d, ([0-9]*)").find( - document.select("time[itemprop = datePublished]").text() - )?.groupValues?.get(1)?.toIntOrNull() - val status = getStatus(document.selectFirst(".spe > span")!!.ownText()) - val description = document.select("div[itemprop = description] > p").text() - val trailer = document.selectFirst("div.embed-responsive noscript iframe")?.attr("src") - val episodes = parseJson>( - Regex("var episodelist = (\\[.*])").find( - document.select(".bixbox.bxcl.epcheck > script").toString().trim() - )?.groupValues?.get(1).toString().replace(Regex("""\\"""), "").trim() - ).map { - val name = - Regex("(Episode\\s?[0-9]+)").find(it.epTitle.toString())?.groupValues?.getOrNull(0) - ?: it.epTitle - val link = it.epLink - Episode(link, name) - }.reversed() - - return newAnimeLoadResponse(title, url, TvType.Anime) { - engName = title - posterUrl = poster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - addTrailer(trailer) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - val scriptData = document.select("aside.sidebar > script").dataNodes().toString() - val key = scriptData.substringAfter("var a_ray = '").substringBefore("';") - val title = scriptData.substringAfter("var judul_postingan = \"").substringBefore("\";") - .replace(" ", "+") - val image = document.select("img#tempvid").last()?.attr("src").toString() - - val sources: List> = app.post( - url = mainServer, - data = mapOf("data" to key, "gambar" to image, "judul" to title, "func" to "mirror"), - referer = "$mainUrl/" - ).document.select("div.gomunime-server-mirror").map { - Pair( - it.attr("data-vhash"), - it.attr("data-type") - ) - } - - sources.apmap { - safeApiCall { - when { - it.second.contains("frame") -> { - loadExtractor(it.first, mainUrl, subtitleCallback, callback) - } - // Skip for now -// it.second.contains("hls") -> { -// app.post( -// url = mainServer, -// data = mapOf("fid" to it.first, "func" to "hls") -// ).text.let { link -> -// M3u8Helper.generateM3u8( -// this.name, -// link, -// "$mainUrl/", -// headers = mapOf("Origin" to mainUrl) -// ).forEach(callback) -// } -// } - it.second.contains("mp4") -> { - app.post( - url = mainServer, - data = mapOf("data" to it.first, "func" to "blogs") - ).parsed>().map { - callback.invoke( - ExtractorLink( - source = name, - name = "Mobi SD", - url = it.file, - referer = "$mainUrl/", - quality = Qualities.P360.value - ) - ) - } - } - else -> null - } - } - } - - return true - } - - private data class Response( - @JsonProperty("status") val status: Boolean, - @JsonProperty("html") val html: String - ) - - data class MobiSource( - @JsonProperty("file") val file: String, - @JsonProperty("label") val label: String, - @JsonProperty("type") val type: String - ) - - private data class EpisodeElement( - @JsonProperty("data-index") val dataIndex: Long?, - @JsonProperty("ep-num") val epNum: String?, - @JsonProperty("ep-title") val epTitle: String?, - @JsonProperty("ep-link") val epLink: String, - @JsonProperty("ep-date") val epDate: String? - ) - -} \ No newline at end of file diff --git a/GomunimeProvider/src/main/kotlin/com/hexated/GomunimeProviderPlugin.kt b/GomunimeProvider/src/main/kotlin/com/hexated/GomunimeProviderPlugin.kt deleted file mode 100644 index 06fa91e8..00000000 --- a/GomunimeProvider/src/main/kotlin/com/hexated/GomunimeProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class GomunimeProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(GomunimeProvider()) - } -} \ No newline at end of file diff --git a/Gomunimeis/build.gradle.kts b/Gomunimeis/build.gradle.kts deleted file mode 100644 index 76ef54dd..00000000 --- a/Gomunimeis/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 6 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=gomunime.is&sz=%size%" -} \ No newline at end of file diff --git a/Gomunimeis/src/main/AndroidManifest.xml b/Gomunimeis/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Gomunimeis/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Gomunimeis/src/main/kotlin/com/hexated/Gomunimeis.kt b/Gomunimeis/src/main/kotlin/com/hexated/Gomunimeis.kt deleted file mode 100644 index afcfa844..00000000 --- a/Gomunimeis/src/main/kotlin/com/hexated/Gomunimeis.kt +++ /dev/null @@ -1,163 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.* -import java.util.ArrayList - - -class Gomunimeis : MainAPI() { - override var mainUrl = "https://anoboy.life" - override var name = "Gomunime.is" - override val hasMainPage = true - override var lang = "id" - override val hasQuickSearch = true - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - private const val mainImageUrl = "https://upload.anoboy.life" - - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special", true)) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "&limit=12&action=load_movie_last_update&status=Ongoing" to "Episode Baru", - "&limit=15&action=load_movie_last_update&status=Completed" to "Completed", - "&limit=15&action=load_movie_last_update&type=Live Action" to "Live Action", - "&limit=15&action=load_movie_trending" to "Trending" - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val home = app.get( - "$mainUrl/my-ajax?page=$page${request.data}", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ) - .parsedSafe()?.data - ?.mapNotNull { media -> - media.toSearchResponse() - } ?: throw ErrorLoadingException("Invalid Json reponse") - return newHomePageResponse(request.name, home) - } - - private fun Anime.toSearchResponse(): SearchResponse? { - - return newAnimeSearchResponse( - postTitle ?: return null, - "$mainUrl/anime/$postName", - TvType.TvSeries, - ) { - this.posterUrl = "$mainImageUrl/$image" - addSub(totalEpisode?.toIntOrNull()) - } - } - - override suspend fun quickSearch(query: String): List = search(query) - - override suspend fun search(query: String): List { - return app.get( - "$mainUrl/my-ajax?page=1&limit=10&action=load_search_movie&keyword=$query", - referer = "$mainUrl/search/?keyword=$query", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.data - ?.mapNotNull { media -> - media.toSearchResponse() - } ?: throw ErrorLoadingException("Invalid Json reponse") - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst(".entry-title")?.text().toString() - val poster = document.selectFirst(".thumbposter > img")?.attr("src") - val tags = document.select(".genxed > a").map { it.text() } - val type = document.selectFirst("div.info-content .spe span:last-child")?.ownText()?.lowercase() ?: "tv" - - val year = Regex("\\d, (\\d*)").find( - document.selectFirst("div.info-content .spe span.split")?.ownText().toString() - )?.groupValues?.get(1)?.toIntOrNull() - val status = getStatus(document.selectFirst(".spe > span")!!.ownText()) - val description = document.select("div[itemprop = description] > p").text() - val episodes = document.select(".eplister > ul > li").map { - val episode = Regex("Episode\\s?(\\d+)").find( - it.select(".epl-title").text() - )?.groupValues?.getOrNull(0) - val link = it.select("a").attr("href") - Episode(link, episode = episode?.toIntOrNull()) - }.reversed() - - return newAnimeLoadResponse(title, url, getType(type)) { - engName = title - posterUrl = poster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - document.select("div.player-container iframe").attr("src").substringAfter("html#") - .let { id -> - app.get("https://gomunimes.com/stream?id=$id") - .parsedSafe()?.server?.streamsb?.link?.let { link -> - loadExtractor(link.replace("vidgomunimesb.xyz", "watchsb.com"), mainUrl, subtitleCallback, callback) - } - } - - return true - } - - data class Streamsb( - @JsonProperty("link") val link: String?, - ) - - data class Server( - @JsonProperty("streamsb") val streamsb: Streamsb?, - ) - - data class Sources( - @JsonProperty("server") val server: Server?, - ) - - data class Responses( - @JsonProperty("data") val data: ArrayList? = arrayListOf(), - ) - - data class Anime( - @JsonProperty("post_title") val postTitle: String?, - @JsonProperty("post_name") val postName: String?, - @JsonProperty("image") val image: String?, - @JsonProperty("total_episode") val totalEpisode: String?, - @JsonProperty("salt") val salt: String?, - ) - -} \ No newline at end of file diff --git a/Gomunimeis/src/main/kotlin/com/hexated/GomunimeisPlugin.kt b/Gomunimeis/src/main/kotlin/com/hexated/GomunimeisPlugin.kt deleted file mode 100644 index 36a76324..00000000 --- a/Gomunimeis/src/main/kotlin/com/hexated/GomunimeisPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class GomunimeisPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Gomunimeis()) - } -} \ No newline at end of file diff --git a/GoodPorn/build.gradle.kts b/GoodPorn/build.gradle.kts deleted file mode 100644 index a40d91b2..00000000 --- a/GoodPorn/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 7 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - description = "Premium porn with 4K support (use VPN if links not working)" - authors = listOf("Sora") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "NSFW", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=goodporn.to&sz=%size%" -} \ No newline at end of file diff --git a/GoodPorn/src/main/AndroidManifest.xml b/GoodPorn/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/GoodPorn/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/GoodPorn/src/main/kotlin/com/hexated/GoodPorn.kt b/GoodPorn/src/main/kotlin/com/hexated/GoodPorn.kt deleted file mode 100644 index 9ed8cb62..00000000 --- a/GoodPorn/src/main/kotlin/com/hexated/GoodPorn.kt +++ /dev/null @@ -1,126 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element -import java.util.* - -class GoodPorn : MainAPI() { - override var mainUrl = "https://goodporn.to" - override var name = "GoodPorn" - override val hasMainPage = true - override val hasDownloadSupport = true - override val vpnStatus = VPNStatus.MightBeNeeded - override val supportedTypes = setOf(TvType.NSFW) - - override val mainPage = mainPageOf( - "$mainUrl/?mode=async&function=get_block&block_id=list_videos_most_recent_videos&sort_by=post_date&from=" to "New Videos", - "$mainUrl/?mode=async&function=get_block&block_id=list_videos_most_recent_videos&sort_by=video_viewed&from=" to "Most Viewed Videos", - "$mainUrl/?mode=async&function=get_block&block_id=list_videos_most_recent_videos&sort_by=rating&from=" to "Top Rated Videos ", - "$mainUrl/?mode=async&function=get_block&block_id=list_videos_most_recent_videos&sort_by=most_commented&from=" to "Most Commented Videos", - "$mainUrl/?mode=async&function=get_block&block_id=list_videos_most_recent_videos&sort_by=duration&from=" to "Longest Videos", - "$mainUrl/channels/brazzers/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=" to "Brazzers", - "$mainUrl/channels/digitalplayground/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=" to "Digital Playground", - "$mainUrl/channels/realitykings/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=" to "Realitykings", - "$mainUrl/channels/babes-network/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=" to "Babes Network", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = - document.select("div#list_videos_most_recent_videos_items div.item, div#list_videos_common_videos_list_items div.item") - .mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = true - ), - hasNext = true - ) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("strong.title")?.text() ?: return null - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.select("div.img > img").attr("data-original")) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - - } - - override suspend fun search(query: String): List { - val searchResponse = mutableListOf() - for (i in 1..15) { - val document = - app.get( - "$mainUrl/search/nikki-benz/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&q=$query&category_ids=&sort_by=&from_videos=$i&from_albums=$i", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).document - val results = - document.select("div#list_videos_videos_list_search_result_items div.item") - .mapNotNull { - it.toSearchResult() - } - searchResponse.addAll(results) - if (results.isEmpty()) break - } - return searchResponse - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("div.headline > h1")?.text()?.trim().toString() - val poster = - fixUrlNull(document.selectFirst("meta[property=og:image]")?.attr("content").toString()) - val tags = document.select("div.info div:nth-child(5) > a").map { it.text() } - val description = document.select("div.info div:nth-child(2)").text().trim() - val actors = document.select("div.info div:nth-child(6) > a").map { it.text() } - val recommendations = - document.select("div#list_videos_related_videos_items div.item").mapNotNull { - it.toSearchResult() - } - - return newMovieLoadResponse(title, url, TvType.NSFW, url) { - this.posterUrl = poster - this.plot = description - this.tags = tags - addActors(actors) - this.recommendations = recommendations - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - document.select("div.info div:last-child a").map { res -> - callback.invoke( - ExtractorLink( - this.name, - this.name, - res.attr("href") - .replace(Regex("\\?download\\S+.mp4&"), "?") + "&rnd=${Date().time}", - referer = data, - quality = Regex("([0-9]+p),").find(res.text())?.groupValues?.get(1) - .let { getQualityFromName(it) }, - headers = mapOf("Range" to "bytes=0-"), - ) - ) - } - - return true - } - -} \ No newline at end of file diff --git a/GoodPorn/src/main/kotlin/com/hexated/GoodPornPlugin.kt b/GoodPorn/src/main/kotlin/com/hexated/GoodPornPlugin.kt deleted file mode 100644 index cdb2d9fd..00000000 --- a/GoodPorn/src/main/kotlin/com/hexated/GoodPornPlugin.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class GoodPornPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(GoodPorn()) - } -} \ No newline at end of file diff --git a/HDrezkaProvider/build.gradle.kts b/HDrezkaProvider/build.gradle.kts deleted file mode 100644 index 2fc9aa63..00000000 --- a/HDrezkaProvider/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -// use an integer for version numbers -version = 3 - - -cloudstream { - language = "ru" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "Anime", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=hdrezka19139.org&sz=%size%" -} \ No newline at end of file diff --git a/HDrezkaProvider/src/main/AndroidManifest.xml b/HDrezkaProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/HDrezkaProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/HDrezkaProvider/src/main/kotlin/com/hexated/HDrezkaProvider.kt b/HDrezkaProvider/src/main/kotlin/com/hexated/HDrezkaProvider.kt deleted file mode 100644 index 9c119902..00000000 --- a/HDrezkaProvider/src/main/kotlin/com/hexated/HDrezkaProvider.kt +++ /dev/null @@ -1,395 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.getQualityFromName -import org.jsoup.Jsoup -import org.jsoup.nodes.Element -import java.util.* - -class HDrezkaProvider : MainAPI() { - override var mainUrl = "https://rezka.ag" - override var name = "HDrezka" - override val hasMainPage = true - override var lang = "ru" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.Anime, - TvType.AsianDrama - ) - - override val mainPage = mainPageOf( - "$mainUrl/films/?filter=watching" to "фильмы", - "$mainUrl/series/?filter=watching" to "сериалы", - "$mainUrl/cartoons/?filter=watching" to "мультфильмы", - "$mainUrl/animation/?filter=watching" to "аниме", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val url = request.data.split("?") - val home = app.get("${url.first()}page/$page/?${url.last()}").document.select( - "div.b-content__inline_items div.b-content__inline_item" - ).map { - it.toSearchResult() - } - - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse { - val title = - this.selectFirst("div.b-content__inline_item-link > a")?.text()?.trim().toString() - val href = this.selectFirst("a")?.attr("href").toString() - val posterUrl = this.select("img").attr("src") - val type = if (this.select("span.info").isNotEmpty()) TvType.TvSeries else TvType.Movie - return if (type == TvType.Movie) { - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - } else { - val episode = - this.select("span.info").text().substringAfter(",").replace(Regex("[^0-9]"), "") - .toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addDubStatus( - dubExist = true, - dubEpisodes = episode, - subExist = true, - subEpisodes = episode - ) - } - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/search/?do=search&subaction=search&q=$query" - val document = app.get(link).document - - return document.select("div.b-content__inline_items div.b-content__inline_item").map { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val id = url.split("/").last().split("-").first() - val title = (document.selectFirst("div.b-post__origtitle")?.text()?.trim() - ?: document.selectFirst("div.b-post__title h1")?.text()?.trim()).toString() - val poster = fixUrlNull(document.selectFirst("div.b-sidecover img")?.attr("src")) - val tags = - document.select("table.b-post__info > tbody > tr:contains(Жанр) span[itemprop=genre]") - .map { it.text() } - val year = document.select("div.film-info > div:nth-child(2) a").text().toIntOrNull() - val tvType = if (document.select("div#simple-episodes-tabs") - .isNullOrEmpty() - ) TvType.Movie else TvType.TvSeries - val description = document.selectFirst("div.b-post__description_text")?.text()?.trim() - val trailer = app.post( - "$mainUrl/engine/ajax/gettrailervideo.php", - data = mapOf("id" to id), - referer = url - ).parsedSafe()?.code.let { - Jsoup.parse(it.toString()).select("iframe").attr("src") - } - val rating = - document.selectFirst("table.b-post__info > tbody > tr:nth-child(1) span.bold")?.text() - .toRatingInt() - val actors = - document.select("table.b-post__info > tbody > tr:last-child span.item").mapNotNull { - Actor( - it.selectFirst("span[itemprop=name]")?.text() ?: return@mapNotNull null, - it.selectFirst("span[itemprop=actor]")?.attr("data-photo") - ) - } - - val recommendations = document.select("div.b-sidelist div.b-content__inline_item").map { - it.toSearchResult() - } - - val data = HashMap() - val server = ArrayList>() - - data["id"] = id - data["favs"] = document.selectFirst("input#ctrl_favs")?.attr("value").toString() - data["ref"] = url - - return if (tvType == TvType.TvSeries) { - document.select("ul#translators-list li").map { res -> - server.add( - mapOf( - "translator_name" to res.text(), - "translator_id" to res.attr("data-translator_id"), - ) - ) - } - val episodes = document.select("div#simple-episodes-tabs ul li").map { - val season = it.attr("data-season_id").toIntOrNull() - val episode = it.attr("data-episode_id").toIntOrNull() - val name = "Episode $episode" - - data["season"] = "$season" - data["episode"] = "$episode" - data["server"] = server - data["action"] = "get_stream" - - Episode( - data.toJson(), - name, - season, - episode, - ) - } - - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - document.select("ul#translators-list li").map { res -> - server.add( - mapOf( - "translator_name" to res.text(), - "translator_id" to res.attr("data-translator_id"), - "camrip" to res.attr("data-camrip"), - "ads" to res.attr("data-ads"), - "director" to res.attr("data-director") - ) - ) - } - - data["server"] = server - data["action"] = "get_movie" - - newMovieLoadResponse(title, url, TvType.Movie, data.toJson()) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - private fun decryptStreamUrl(data: String): String { - - fun getTrash(arr: List, item: Int): List { - val trash = ArrayList>() - for (i in 1..item) { - trash.add(arr) - } - return trash.reduce { acc, list -> - val temp = ArrayList() - acc.forEach { ac -> - list.forEach { li -> - temp.add(ac.plus(li)) - } - } - return@reduce temp - } - } - - val trashList = listOf("@", "#", "!", "^", "$") - val trashSet = getTrash(trashList, 2) + getTrash(trashList, 3) - var trashString = data.replace("#h", "").split("//_//").joinToString("") - - trashSet.forEach { - val temp = base64Encode(it.toByteArray()) - trashString = trashString.replace(temp, "") - } - - return base64Decode(trashString) - - } - - private fun cleanCallback( - source: String, - url: String, - quality: String, - isM3u8: Boolean, - sourceCallback: (ExtractorLink) -> Unit - ) { - sourceCallback.invoke( - ExtractorLink( - source, - source, - url, - "$mainUrl/", - getQuality(quality), - isM3u8, - headers = mapOf( - "Origin" to mainUrl - ) - ) - ) - } - - private fun getLanguage(str: String): String { - return when (str) { - "Русский" -> "Russian" - "Українська" -> "Ukrainian" - else -> str - } - } - - private fun getQuality(str: String): Int { - return when (str) { - "360p" -> Qualities.P240.value - "480p" -> Qualities.P360.value - "720p" -> Qualities.P480.value - "1080p" -> Qualities.P720.value - "1080p Ultra" -> Qualities.P1080.value - else -> getQualityFromName(str) - } - } - - private fun invokeSources( - source: String, - url: String, - subtitle: String, - subCallback: (SubtitleFile) -> Unit, - sourceCallback: (ExtractorLink) -> Unit - ) { - decryptStreamUrl(url).split(",").map { links -> - val quality = - Regex("\\[([0-9]{3,4}p\\s?\\w*?)]").find(links)?.groupValues?.getOrNull(1) - ?.trim() ?: return@map null - links.replace("[$quality]", "").split(" or ") - .map { - val link = it.trim() - val type = if(link.contains(".m3u8")) "(Main)" else "(Backup)" - cleanCallback( - "$source $type", - link, - quality, - link.contains(".m3u8"), - sourceCallback, - ) - } - } - - subtitle.split(",").map { sub -> - val language = - Regex("\\[(.*)]").find(sub)?.groupValues?.getOrNull(1) ?: return@map null - val link = sub.replace("[$language]", "").trim() - subCallback.invoke( - SubtitleFile( - getLanguage(language), - link - ) - ) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - tryParseJson(data)?.let { res -> - if (res.server?.isEmpty() == true) { - val document = app.get(res.ref ?: return@let).document - document.select("script").map { script -> - if (script.data().contains("sof.tv.initCDNMoviesEvents(")) { - val dataJson = - script.data().substringAfter("false, {").substringBefore("});") - tryParseJson("{$dataJson}")?.let { source -> - invokeSources( - this.name, - source.streams, - source.subtitle.toString(), - subtitleCallback, - callback - ) - } - } - } - } else { - res.server?.apmap { server -> - app.post( - url = "$mainUrl/ajax/get_cdn_series/?t=${Date().time}", - data = mapOf( - "id" to res.id, - "translator_id" to server.translator_id, - "favs" to res.favs, - "is_camrip" to server.camrip, - "is_ads" to server.ads, - "is_director" to server.director, - "season" to res.season, - "episode" to res.episode, - "action" to res.action, - ).filterValues { it != null }.mapValues { it.value as String }, - referer = res.ref - ).parsedSafe()?.let { source -> - invokeSources( - server.translator_name.toString(), - source.url, - source.subtitle.toString(), - subtitleCallback, - callback - ) - } - } - } - } - - return true - } - - data class LocalSources( - @JsonProperty("streams") val streams: String, - @JsonProperty("subtitle") val subtitle: Any?, - ) - - data class Sources( - @JsonProperty("url") val url: String, - @JsonProperty("subtitle") val subtitle: Any?, - ) - - data class Server( - @JsonProperty("translator_name") val translator_name: String?, - @JsonProperty("translator_id") val translator_id: String?, - @JsonProperty("camrip") val camrip: String?, - @JsonProperty("ads") val ads: String?, - @JsonProperty("director") val director: String?, - ) - - data class Data( - @JsonProperty("id") val id: String?, - @JsonProperty("favs") val favs: String?, - @JsonProperty("server") val server: List?, - @JsonProperty("season") val season: String?, - @JsonProperty("episode") val episode: String?, - @JsonProperty("action") val action: String?, - @JsonProperty("ref") val ref: String?, - ) - - data class Trailer( - @JsonProperty("success") val success: Boolean?, - @JsonProperty("code") val code: String?, - ) - -} \ No newline at end of file diff --git a/HDrezkaProvider/src/main/kotlin/com/hexated/HDrezkaProviderPlugin.kt b/HDrezkaProvider/src/main/kotlin/com/hexated/HDrezkaProviderPlugin.kt deleted file mode 100644 index 7b7f122c..00000000 --- a/HDrezkaProvider/src/main/kotlin/com/hexated/HDrezkaProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class HDrezkaProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(HDrezkaProvider()) - } -} \ No newline at end of file diff --git a/Hdfilmcehennemi/build.gradle.kts b/Hdfilmcehennemi/build.gradle.kts deleted file mode 100644 index 7eee328b..00000000 --- a/Hdfilmcehennemi/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -// use an integer for version numbers -version = 12 - - -cloudstream { - language = "tr" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=hdfilmcehennemi.live&sz=%size%" -} diff --git a/Hdfilmcehennemi/src/main/AndroidManifest.xml b/Hdfilmcehennemi/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Hdfilmcehennemi/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Hdfilmcehennemi/src/main/kotlin/com/hexated/Hdfilmcehennemi.kt b/Hdfilmcehennemi/src/main/kotlin/com/hexated/Hdfilmcehennemi.kt deleted file mode 100644 index 55719272..00000000 --- a/Hdfilmcehennemi/src/main/kotlin/com/hexated/Hdfilmcehennemi.kt +++ /dev/null @@ -1,245 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import org.jsoup.nodes.Element - -class Hdfilmcehennemi : MainAPI() { - override var mainUrl = "https://www.hdfilmcehennemi.de" - override var name = "hdfilmcehennemi" - override val hasMainPage = true - override var lang = "tr" - override val hasQuickSearch = true - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - ) - - override val mainPage = mainPageOf( - "$mainUrl/category/tavsiye-filmler-izle2/page/" to "Tavsiye Filmler Kategorisi", - "$mainUrl/yabancidiziizle-1/page/" to "Son Eklenen Yabancı Diziler", - "$mainUrl/imdb-7-puan-uzeri-filmler/page/" to "Imdb 7+ Filmler", - "$mainUrl/en-cok-yorumlananlar/page/" to "En Çok Yorumlananlar", - "$mainUrl/en-cok-begenilen-filmleri-izle/page/" to "En Çok Beğenilenler", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div.card-body div.row div.col-6.col-sm-3.poster-container") - .mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("h2.title")?.text() ?: return null - val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - - } - - private fun Media.toSearchResponse(): SearchResponse? { - return newMovieSearchResponse( - title ?: return null, - "$mainUrl/$slugPrefix$slug", - TvType.TvSeries, - ) { - this.posterUrl = "$mainUrl/uploads/poster/$poster" - } - } - - override suspend fun quickSearch(query: String): List = search(query) - - override suspend fun search(query: String): List { - return app.post( - "$mainUrl/search/", - data = mapOf("query" to query), - referer = "$mainUrl/", - headers = mapOf( - "Accept" to "application/json, text/javascript, */*; q=0.01", - "X-Requested-With" to "XMLHttpRequest" - ) - ).parsedSafe()?.result?.mapNotNull { media -> - media.toSearchResponse() - } ?: throw ErrorLoadingException("Invalid Json reponse") - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("div.card-header > h1, div.card-header > h2")?.text() - ?.removeSuffix("Filminin Bilgileri")?.trim() - ?: return null - val poster = fixUrlNull(document.select("img.img-fluid").lastOrNull()?.attr("src")) - val tags = document.select("div.mb-0.lh-lg div:nth-child(5) a").map { it.text() } - val year = - document.selectFirst("div.mb-0.lh-lg div:nth-child(4) a")?.text()?.trim()?.toIntOrNull() - val tvType = if (document.select("nav#seasonsTabs").isNullOrEmpty() - ) TvType.Movie else TvType.TvSeries - val description = document.selectFirst("article.text-white > p")?.text()?.trim() - val rating = document.selectFirst("div.rating-votes div.rate span")?.text()?.toRatingInt() - val actors = document.select("div.mb-0.lh-lg div:last-child a.chip").map { - Actor(it.text(), it.select("img").attr("src")) - } - val recommendations = - document.select("div.swiper-wrapper div.poster.poster-pop").mapNotNull { - val recName = it.selectFirst("h2.title")?.text() ?: return@mapNotNull null - val recHref = - fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null - val recPosterUrl = fixUrlNull(it.selectFirst("img")?.attr("data-src")) - newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { - this.posterUrl = recPosterUrl - } - } - - return if (tvType == TvType.TvSeries) { - val trailer = - document.selectFirst("button.btn.btn-fragman.btn-danger")?.attr("data-trailer") - ?.let { - "https://www.youtube.com/embed/$it" - } - val episodes = document.select("div#seasonsTabs-tabContent div.card-list-item").map { - val href = it.select("a").attr("href") - val name = it.select("h3").text().trim() - val episode = it.select("h3").text().let { num -> - Regex("Sezon\\s?([0-9]+).").find(num)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - val season = it.parents()[1].attr("id").substringAfter("-").toIntOrNull() - Episode( - href, - name, - season, - episode, - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - val trailer = - document.selectFirst("nav.nav.card-nav.nav-slider a[data-bs-toggle=\"modal\"]") - ?.attr("data-trailer")?.let { - "https://www.youtube.com/embed/$it" - } - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - private suspend fun invokeLocalSource( - source: String, - url: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val script = app.get( - url, - referer = "${mainUrl}/" - ).document.select("script") - .find { it.data().contains("sources:") }?.data() ?: return - val videoData = getAndUnpack(script).substringAfter("file_link=\"").substringBefore("\";") - val subData = script.substringAfter("tracks: [").substringBefore("]") - - callback.invoke( - ExtractorLink( - source, - source, - base64Decode(videoData), - "$mainUrl/", - Qualities.Unknown.value, - true - ) - ) - - tryParseJson>("[${subData}]") - ?.filter { it.kind == "captions" }?.map { - subtitleCallback.invoke( - SubtitleFile( - it.label.toString(), - fixUrl(it.file.toString()) - ) - ) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - app.get(data).document.select("nav.nav.card-nav.nav-slider a.nav-link").map { - Pair(it.attr("href"), it.text()) - }.apmap { (url, source) -> - safeApiCall { - app.get(url).document.select("div.card-video > iframe").attr("data-src") - .let { url -> - if (url.startsWith(mainUrl)) { - invokeLocalSource(source, url, subtitleCallback, callback) - } else { - loadExtractor(url, "$mainUrl/", subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - source, - source, - link.url, - link.referer, - link.quality, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - } - } - } - return true - } - - private data class SubSource( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - @JsonProperty("kind") val kind: String? = null, - ) - - data class Result( - @JsonProperty("result") val result: ArrayList? = arrayListOf(), - ) - - data class Media( - @JsonProperty("title") val title: String? = null, - @JsonProperty("poster") val poster: String? = null, - @JsonProperty("slug") val slug: String? = null, - @JsonProperty("slug_prefix") val slugPrefix: String? = null, - ) -} diff --git a/Hdfilmcehennemi/src/main/kotlin/com/hexated/HdfilmcehennemiPlugin.kt b/Hdfilmcehennemi/src/main/kotlin/com/hexated/HdfilmcehennemiPlugin.kt deleted file mode 100644 index 257679b0..00000000 --- a/Hdfilmcehennemi/src/main/kotlin/com/hexated/HdfilmcehennemiPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class HdfilmcehennemiPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Hdfilmcehennemi()) - } -} \ No newline at end of file diff --git a/Hentaiheaven/build.gradle.kts b/Hentaiheaven/build.gradle.kts deleted file mode 100644 index 017bc97a..00000000 --- a/Hentaiheaven/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 3 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Sora") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "NSFW", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=hentaihaven.xxx&sz=%size%" -} \ No newline at end of file diff --git a/Hentaiheaven/src/main/AndroidManifest.xml b/Hentaiheaven/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Hentaiheaven/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt b/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt deleted file mode 100644 index aea799a0..00000000 --- a/Hentaiheaven/src/main/kotlin/com/hexated/Hentaiheaven.kt +++ /dev/null @@ -1,166 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.* -import okhttp3.FormBody -import org.jsoup.nodes.Element - -class Hentaiheaven : MainAPI() { - override var mainUrl = "https://hentaihaven.xxx" - override var name = "Hentaiheaven" - override val hasMainPage = true - override var lang = "en" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.NSFW) - - override val mainPage = mainPageOf( - "?m_orderby=new-manga" to "New", - "?m_orderby=views" to "Most Views", - "?m_orderby=rating" to "Rating", - "?m_orderby=alphabet" to "A-Z", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("$mainUrl/page/$page/${request.data}").document - val home = - document.select("div.page-listing-item div.col-6.col-md-zarat.badge-pos-1").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val title = - this.selectFirst("h3 a, h5 a")?.text()?.trim() ?: this.selectFirst("a")?.attr("title") - ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val episode = this.selectFirst("span.chapter.font-meta a")?.text()?.filter { it.isDigit() } - ?.toIntOrNull() - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(episode) - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query&post_type=wp-manga" - val document = app.get(link).document - - return document.select("div.c-tabs-item div.row.c-tabs-item__content").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("div.post-title h1")?.text()?.trim() ?: return null - val poster = document.select("div.summary_image img").attr("src") - val tags = document.select("div.genres-content > a").map { it.text() } - - val description = document.select("div.description-summary p").text().trim() - val trailer = document.selectFirst("a.trailerbutton")?.attr("href") - - val episodes = document.select("div.listing-chapters_wrap ul li").mapNotNull { - val name = it.selectFirst("a")?.text() ?: return@mapNotNull null - val image = fixUrlNull(it.selectFirst("a img")?.attr("src")) - val link = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null - Episode(link, name, posterUrl = image) - }.reversed() - - val recommendations = - document.select("div.row div.col-6.col-md-zarat").mapNotNull { - it.toSearchResult() - } - - return newAnimeLoadResponse(title, url, TvType.NSFW) { - engName = title - posterUrl = poster - addEpisodes(DubStatus.Subbed, episodes) - plot = description - this.tags = tags - this.recommendations = recommendations - addTrailer(trailer) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val doc = app.get(data).document - val meta = doc.selectFirst("meta[itemprop=thumbnailUrl]")?.attr("content")?.substringAfter("/hh/")?.substringBefore("/") ?: return false - doc.select("div.player_logic_item iframe").attr("src").let { iframe -> - val document = app.get(iframe, referer = data).text - val en = Regex("var\\sen\\s=\\s'(\\S+)';").find(document)?.groupValues?.getOrNull(1) - val iv = Regex("var\\siv\\s=\\s'(\\S+)';").find(document)?.groupValues?.getOrNull(1) - - val body = FormBody.Builder() - .addEncoded("action", "zarat_get_data_player_ajax") - .addEncoded("a", "$en") - .addEncoded("b", "$iv") - .build() - - app.post( - "$mainUrl/wp-content/plugins/player-logic/api.php", -// data = mapOf( -// "action" to "zarat_get_data_player_ajax", -// "a" to "$en", -// "b" to "$iv" -// ), - requestBody = body, -// headers = mapOf("Sec-Fetch-Mode" to "cors") - ).parsedSafe()?.data?.sources?.map { res -> -// M3u8Helper.generateM3u8( -// this.name, -// res.src ?: return@map null, -// referer = "$mainUrl/", -// headers = mapOf( -// "Origin" to mainUrl, -// ) -// ).forEach(callback) - callback.invoke( - ExtractorLink( - this.name, - this.name, - res.src?.replace("/hh//", "/hh/$meta/") ?: return@map null, - referer = "", - quality = Qualities.Unknown.value, - isM3u8 = true - ) - ) - } - } - - return true - } - - data class Response( - @JsonProperty("data") val data: Data? = null, - ) - - data class Data( - @JsonProperty("sources") val sources: ArrayList? = arrayListOf(), - ) - - data class Sources( - @JsonProperty("src") val src: String? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("label") val label: String? = null, - ) - - -} \ No newline at end of file diff --git a/Hentaiheaven/src/main/kotlin/com/hexated/HentaiheavenPlugin.kt b/Hentaiheaven/src/main/kotlin/com/hexated/HentaiheavenPlugin.kt deleted file mode 100644 index d51b5849..00000000 --- a/Hentaiheaven/src/main/kotlin/com/hexated/HentaiheavenPlugin.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class HentaiheavenPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Hentaiheaven()) - } -} \ No newline at end of file diff --git a/IMoviehd/build.gradle.kts b/IMoviehd/build.gradle.kts deleted file mode 100644 index 54ae7e8d..00000000 --- a/IMoviehd/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -// use an integer for version numbers -version = 1 - - -cloudstream { - language = "th" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=www.i-moviehd.com&sz=%size%" -} \ No newline at end of file diff --git a/IMoviehd/src/main/AndroidManifest.xml b/IMoviehd/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/IMoviehd/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/IMoviehd/src/main/kotlin/com/hexated/IMoviehd.kt b/IMoviehd/src/main/kotlin/com/hexated/IMoviehd.kt deleted file mode 100644 index 314a4e33..00000000 --- a/IMoviehd/src/main/kotlin/com/hexated/IMoviehd.kt +++ /dev/null @@ -1,169 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import org.jsoup.nodes.Element -import java.net.URI - -class IMoviehd : MainAPI() { - override var mainUrl = "https://www.i-moviehd.com" - override var name = "I-Moviehd" - override val hasMainPage = true - override var lang = "th" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - ) - - override val mainPage = mainPageOf( - "$mainUrl/page/" to "RECOMMENDATION", - "$mainUrl/category/series-ซีรี่ส์/page/" to "NEW SERIES", - "$mainUrl/top-movie/page/" to "TOP MOVIES IMDB", - "$mainUrl/top-series/page/" to "TOP SERIES IMDB", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div.item-wrap.clearfix div.item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(fixTitle(request.name), home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.substringAfter("$mainUrl/").contains("-ep-")) { - val title = uri.substringAfter("$mainUrl/").replace(Regex("-ep-[0-9]+"), "") - "$mainUrl/$title" - } else { - uri - } - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("a")?.attr("title") ?: return null - val href = getProperAnimeLink(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.select("img").attr("src")) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/?s=$query").document - - return document.select("div.item-wrap.clearfix div.item").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.entry-title")?.text() ?: return null - val poster = document.selectFirst("table#imdbinfo td img")?.attr("src") - val tags = document.select("span.categories > a").map { it.text() } - - val tvType = if (document.select("table#Sequel").isNullOrEmpty() - ) TvType.Movie else TvType.TvSeries - val description = document.select("div.entry-content.post_content p").text().trim() - val trailer = document.selectFirst("div#tabt iframe")?.attr("sub_src") - val rating = document.selectFirst("div.imdb-rating-content span")?.text()?.toRatingInt() - - val recommendations = document.select("div.item-wrap.clearfix div.item").mapNotNull { - it.toSearchResult() - } - - return if (tvType == TvType.TvSeries) { - val episodes = document.select("table#Sequel tbody tr").mapNotNull { - val href = fixUrl(it.selectFirst("a")?.attr("href") ?: return null) - val name = it.selectFirst("a")?.text()?.trim() ?: return null - Episode( - href, - name, - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.plot = description - this.tags = tags - this.rating = rating - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.plot = description - this.tags = tags - this.rating = rating - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - - document.select("script").find { it.data().contains("\$.getJSON(") }?.data() - ?.substringAfter("\$.getJSON( \"")?.substringBefore("\"+")?.let { iframe -> - val server = app.get("$iframe\\0&b=", referer = "$mainUrl/") - .parsedSafe()?.link - val id = app.post( - "https://vlp.77player.xyz/initPlayer/${server?.substringAfter("key=")}", - referer = server, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.data?.substringAfter("id=") - -// M3u8Helper.generateM3u8( -// this.name, -// "https://xxx.77player.xyz/iosplaylist/$id/$id.m3u8", -// referer = "$mainUrl/", -// headers = mapOf( -//// "Origin" to "https://xxx.77player.xyz", -// ) -// ).forEach(callback) - - callback.invoke( - ExtractorLink( - this.name, - this.name, - "https://xxx.77player.xyz/iosplaylist/$id/$id.m3u8", - referer = "$mainUrl/", - quality = Qualities.Unknown.value, - isM3u8 = true - ) - ) - - } - - - return true - } - - data class Server( - @JsonProperty("ตัวเล่นไว") val link: String?, - ) - - data class Source( - @JsonProperty("data") val data: String?, - ) - - -} \ No newline at end of file diff --git a/IMoviehd/src/main/kotlin/com/hexated/IMoviehdPlugin.kt b/IMoviehd/src/main/kotlin/com/hexated/IMoviehdPlugin.kt deleted file mode 100644 index a416a029..00000000 --- a/IMoviehd/src/main/kotlin/com/hexated/IMoviehdPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class IMoviehdPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(IMoviehd()) - } -} \ No newline at end of file diff --git a/IdlixProvider/build.gradle.kts b/IdlixProvider/build.gradle.kts deleted file mode 100644 index d8c5c8ad..00000000 --- a/IdlixProvider/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -// use an integer for version numbers -version = 17 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 0 // will be 3 if unspecified - tvTypes = listOf( - "TvSeries", - "Movie", - "Anime", - "AsianDrama", - ) - - iconUrl = "https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://idlixian.com&size=16" -} \ No newline at end of file diff --git a/IdlixProvider/src/main/AndroidManifest.xml b/IdlixProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/IdlixProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/IdlixProvider/src/main/kotlin/com/hexated/IdlixProvider.kt b/IdlixProvider/src/main/kotlin/com/hexated/IdlixProvider.kt deleted file mode 100644 index aa2f9c76..00000000 --- a/IdlixProvider/src/main/kotlin/com/hexated/IdlixProvider.kt +++ /dev/null @@ -1,305 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.extractors.helper.AesHelper -import com.lagradost.cloudstream3.network.CloudflareKiller -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element -import java.net.URI - -class IdlixProvider : MainAPI() { - override var mainUrl = "https://tv.idlixplus.net" - private var directUrl = mainUrl - override var name = "Idlix" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - private val cloudflareKiller by lazy { CloudflareKiller() } - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.Anime, - TvType.AsianDrama - ) - - override val mainPage = mainPageOf( - "$mainUrl/" to "Featured", - "$mainUrl/trending/page/?get=movies" to "Trending Movies", - "$mainUrl/trending/page/?get=tv" to "Trending TV Series", - "$mainUrl/movie/page/" to "Movie Terbaru", - "$mainUrl/tvseries/page/" to "TV Series Terbaru", -// "$mainUrl/network/netflix/page/" to "Netflix", -// "$mainUrl/genre/anime/page/" to "Anime", -// "$mainUrl/genre/drama-korea/page/" to "Drama Korea", - ) - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val url = request.data.split("?") - val nonPaged = request.name == "Featured" && page <= 1 - val req = if (nonPaged) { - app.get(request.data) - } else { - app.get("${url.first()}$page/?${url.lastOrNull()}") - } - mainUrl = getBaseUrl(req.url) - val document = req.document - val home = (if (nonPaged) { - document.select("div.items.featured article") - } else { - document.select("div.items.full article, div#archive-content article") - }).mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperLink(uri: String): String { - return when { - uri.contains("/episode/") -> { - var title = uri.substringAfter("$mainUrl/episode/") - title = Regex("(.+?)-season").find(title)?.groupValues?.get(1).toString() - "$mainUrl/tvseries/$title" - } - - uri.contains("/season/") -> { - var title = uri.substringAfter("$mainUrl/season/") - title = Regex("(.+?)-season").find(title)?.groupValues?.get(1).toString() - "$mainUrl/tvseries/$title" - } - - else -> { - uri - } - } - } - - private fun Element.toSearchResult(): SearchResponse { - val title = this.selectFirst("h3 > a")!!.text().replace(Regex("\\(\\d{4}\\)"), "").trim() - val href = getProperLink(this.selectFirst("h3 > a")!!.attr("href")) - val posterUrl = this.select("div.poster > img").attr("src").toString() - val quality = getQualityFromString(this.select("span.quality").text()) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - this.quality = quality - } - - } - - override suspend fun search(query: String): List { - val req = app.get("$mainUrl/search/$query") - mainUrl = getBaseUrl(req.url) - val document = req.document - return document.select("div.result-item").map { - val title = - it.selectFirst("div.title > a")!!.text().replace(Regex("\\(\\d{4}\\)"), "").trim() - val href = getProperLink(it.selectFirst("div.title > a")!!.attr("href")) - val posterUrl = it.selectFirst("img")!!.attr("src").toString() - newMovieSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - } - } - } - - override suspend fun load(url: String): LoadResponse { - val request = app.get(url) - directUrl = getBaseUrl(request.url) - val document = request.document - val title = - document.selectFirst("div.data > h1")?.text()?.replace(Regex("\\(\\d{4}\\)"), "") - ?.trim().toString() - val poster = document.select("div.poster > img").attr("src").toString() - val tags = document.select("div.sgeneros > a").map { it.text() } - - val year = Regex(",\\s?(\\d+)").find( - document.select("span.date").text().trim() - )?.groupValues?.get(1).toString().toIntOrNull() - val tvType = if (document.select("ul#section > li:nth-child(1)").text().contains("Episodes") - ) TvType.TvSeries else TvType.Movie - val description = document.select("div.wp-content > p").text().trim() - val trailer = document.selectFirst("div.embed iframe")?.attr("src") - val rating = - document.selectFirst("span.dt_rating_vgs")?.text()?.toRatingInt() - val actors = document.select("div.persons > div[itemprop=actor]").map { - Actor(it.select("meta[itemprop=name]").attr("content"), it.select("img").attr("src")) - } - - val recommendations = document.select("div.owl-item").map { - val recName = - it.selectFirst("a")!!.attr("href").toString().removeSuffix("/").split("/").last() - val recHref = it.selectFirst("a")!!.attr("href") - val recPosterUrl = it.selectFirst("img")?.attr("src").toString() - newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { - this.posterUrl = recPosterUrl - } - } - - return if (tvType == TvType.TvSeries) { - val episodes = document.select("ul.episodios > li").map { - val href = it.select("a").attr("href") - val name = fixTitle(it.select("div.episodiotitle > a").text().trim()) - val image = it.select("div.imagen > img").attr("src") - val episode = it.select("div.numerando").text().replace(" ", "").split("-").last() - .toIntOrNull() - val season = it.select("div.numerando").text().replace(" ", "").split("-").first() - .toIntOrNull() - Episode( - href, - name, - season, - episode, - image - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - document.select("ul#playeroptionsul > li").map { - Triple( - it.attr("data-post"), - it.attr("data-nume"), - it.attr("data-type") - ) - }.apmap { (id, nume, type) -> - val json = app.post( - url = "$directUrl/wp-admin/admin-ajax.php", data = mapOf( - "action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type - ), referer = data, headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest") - ).parsedSafe() ?: return@apmap - val metrix = AppUtils.parseJson(json.embed_url).m - val password = createKey(json.key, metrix) - val decrypted = AesHelper.cryptoAESHandler(json.embed_url, password.toByteArray(), false)?.fixBloat() ?: return@apmap - - when { - !decrypted.contains("youtube") -> getUrl(decrypted, "$directUrl/", subtitleCallback, callback) - else -> return@apmap - } - } - - return true - } - - private fun createKey(r: String, m: String): String { - val rList = r.split("\\x").toTypedArray() - var n = "" - val decodedM = String(base64Decode(m.split("").reversed().joinToString("")).toCharArray()) - for (s in decodedM.split("|")) { - n += "\\x" + rList[Integer.parseInt(s) + 1] - } - return n - } - - private fun String.fixBloat(): String { - return this.replace("\"", "").replace("\\", "") - } - - private suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val document = app.get(url, referer = referer).document - val hash = url.split("/").last().substringAfter("data=") - - val m3uLink = app.post( - url = "https://jeniusplay.com/player/index.php?data=$hash&do=getVideo", - data = mapOf("hash" to hash, "r" to "$referer"), - referer = referer, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsed().videoSource - - M3u8Helper.generateM3u8( - this.name, - m3uLink, - "$referer", - ).forEach(callback) - - - document.select("script").map { script -> - if (script.data().contains("eval(function(p,a,c,k,e,d)")) { - val subData = - getAndUnpack(script.data()).substringAfter("\"tracks\":[").substringBefore("],") - AppUtils.tryParseJson>("[$subData]")?.map { subtitle -> - subtitleCallback.invoke( - SubtitleFile( - getLanguage(subtitle.label ?: ""), - subtitle.file - ) - ) - } - } - } - } - - private fun getLanguage(str: String): String { - return when { - str.contains("indonesia", true) || str - .contains("bahasa", true) -> "Indonesian" - else -> str - } - } - - data class ResponseSource( - @JsonProperty("hls") val hls: Boolean, - @JsonProperty("videoSource") val videoSource: String, - @JsonProperty("securedLink") val securedLink: String?, - ) - - data class Tracks( - @JsonProperty("kind") val kind: String?, - @JsonProperty("file") val file: String, - @JsonProperty("label") val label: String?, - ) - - data class ResponseHash( - @JsonProperty("embed_url") val embed_url: String, - @JsonProperty("key") val key: String, - ) - - data class AesData( - @JsonProperty("m") val m: String, - ) - - -} \ No newline at end of file diff --git a/IdlixProvider/src/main/kotlin/com/hexated/IdlixProviderPlugin.kt b/IdlixProvider/src/main/kotlin/com/hexated/IdlixProviderPlugin.kt deleted file mode 100644 index 115b22a6..00000000 --- a/IdlixProvider/src/main/kotlin/com/hexated/IdlixProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class IdlixProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(IdlixProvider()) - } -} \ No newline at end of file diff --git a/IdlixProvider/src/main/kotlin/com/hexated/Utils.kt b/IdlixProvider/src/main/kotlin/com/hexated/Utils.kt deleted file mode 100644 index 96bb5a14..00000000 --- a/IdlixProvider/src/main/kotlin/com/hexated/Utils.kt +++ /dev/null @@ -1,95 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.ErrorLoadingException -import com.lagradost.cloudstream3.base64DecodeArray -import com.lagradost.cloudstream3.base64Encode -import com.lagradost.cloudstream3.utils.AppUtils -import java.security.DigestException -import java.security.MessageDigest -import javax.crypto.Cipher -import javax.crypto.spec.IvParameterSpec -import javax.crypto.spec.SecretKeySpec - -object AesHelper { - - fun cryptoAESHandler( - data: String, - pass: ByteArray, - encrypt: Boolean = true, - padding: String = "AES/CBC/PKCS5PADDING", - ): String? { - val parse = AppUtils.tryParseJson(data) ?: return null - val (key, iv) = generateKeyAndIv(pass, parse.s.hexToByteArray()) ?: throw ErrorLoadingException("failed to generate key") - val cipher = Cipher.getInstance(padding) - return if (!encrypt) { - cipher.init(Cipher.DECRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) - String(cipher.doFinal(base64DecodeArray(parse.ct))) - } else { - cipher.init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES"), IvParameterSpec(iv)) - base64Encode(cipher.doFinal(parse.ct.toByteArray())) - } - } - - // https://stackoverflow.com/a/41434590/8166854 - private fun generateKeyAndIv( - password: ByteArray, - salt: ByteArray, - hashAlgorithm: String = "MD5", - keyLength: Int = 32, - ivLength: Int = 16, - iterations: Int = 1 - ): List? { - - val md = MessageDigest.getInstance(hashAlgorithm) - val digestLength = md.digestLength - val targetKeySize = keyLength + ivLength - val requiredLength = (targetKeySize + digestLength - 1) / digestLength * digestLength - val generatedData = ByteArray(requiredLength) - var generatedLength = 0 - - try { - md.reset() - - while (generatedLength < targetKeySize) { - if (generatedLength > 0) - md.update( - generatedData, - generatedLength - digestLength, - digestLength - ) - - md.update(password) - md.update(salt, 0, 8) - md.digest(generatedData, generatedLength, digestLength) - - for (i in 1 until iterations) { - md.update(generatedData, generatedLength, digestLength) - md.digest(generatedData, generatedLength, digestLength) - } - - generatedLength += digestLength - } - return listOf( - generatedData.copyOfRange(0, keyLength), - generatedData.copyOfRange(keyLength, targetKeySize) - ) - } catch (e: DigestException) { - return null - } - } - - private fun String.hexToByteArray(): ByteArray { - check(length % 2 == 0) { "Must have an even length" } - return chunked(2) - .map { it.toInt(16).toByte() } - .toByteArray() - } - - private data class AesData( - @JsonProperty("ct") val ct: String, - @JsonProperty("iv") val iv: String, - @JsonProperty("s") val s: String - ) - -} \ No newline at end of file diff --git a/Kickassanime/build.gradle.kts b/Kickassanime/build.gradle.kts deleted file mode 100644 index 562899be..00000000 --- a/Kickassanime/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 10 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=www2.kickassanime.ro&sz=%size%" -} \ No newline at end of file diff --git a/Kickassanime/src/main/AndroidManifest.xml b/Kickassanime/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/Kickassanime/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Kickassanime/src/main/kotlin/com/hexated/GogoExtractor.kt b/Kickassanime/src/main/kotlin/com/hexated/GogoExtractor.kt deleted file mode 100644 index ed19fd25..00000000 --- a/Kickassanime/src/main/kotlin/com/hexated/GogoExtractor.kt +++ /dev/null @@ -1,166 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.base64Decode -import com.lagradost.cloudstream3.base64DecodeArray -import com.lagradost.cloudstream3.base64Encode -import com.lagradost.cloudstream3.mvvm.normalSafeApiCall -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.getQualityFromName -import org.jsoup.nodes.Document -import java.net.URI -import javax.crypto.Cipher -import javax.crypto.spec.IvParameterSpec -import javax.crypto.spec.SecretKeySpec - -object GogoExtractor { - - /** - * @param id base64Decode(show_id) + IV - * @return the encryption key - * */ - private fun getKey(id: String): String? { - return normalSafeApiCall { - id.map { - it.code.toString(16) - }.joinToString("").substring(0, 32) - } - } - - // https://github.com/saikou-app/saikou/blob/3e756bd8e876ad7a9318b17110526880525a5cd3/app/src/main/java/ani/saikou/anime/source/extractors/GogoCDN.kt#L60 - // No Licence on the function - private fun cryptoHandler( - string: String, - iv: String, - secretKeyString: String, - encrypt: Boolean = true - ): String { - //println("IV: $iv, Key: $secretKeyString, encrypt: $encrypt, Message: $string") - val ivParameterSpec = IvParameterSpec(iv.toByteArray()) - val secretKey = SecretKeySpec(secretKeyString.toByteArray(), "AES") - val cipher = Cipher.getInstance("AES/CBC/PKCS5Padding") - return if (!encrypt) { - cipher.init(Cipher.DECRYPT_MODE, secretKey, ivParameterSpec) - String(cipher.doFinal(base64DecodeArray(string))) - } else { - cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivParameterSpec) - base64Encode(cipher.doFinal(string.toByteArray())) - } - } - - /** - * @param iframeUrl something like https://gogoplay4.com/streaming.php?id=XXXXXX - * @param mainApiName used for ExtractorLink names and source - * @param iv secret iv from site, required non-null if isUsingAdaptiveKeys is off - * @param secretKey secret key for decryption from site, required non-null if isUsingAdaptiveKeys is off - * @param secretDecryptKey secret key to decrypt the response json, required non-null if isUsingAdaptiveKeys is off - * @param isUsingAdaptiveKeys generates keys from IV and ID, see getKey() - * @param isUsingAdaptiveData generate encrypt-ajax data based on $("script[data-name='episode']")[0].dataset.value - * */ - suspend fun extractVidstream( - iframeUrl: String, - mainApiName: String, - callback: (ExtractorLink) -> Unit, - iv: String?, - secretKey: String?, - secretDecryptKey: String?, - // This could be removed, but i prefer it verbose - isUsingAdaptiveKeys: Boolean, - isUsingAdaptiveData: Boolean, - // If you don't want to re-fetch the document - iframeDocument: Document? = null - ) = safeApiCall { - // https://github.com/saikou-app/saikou/blob/3e756bd8e876ad7a9318b17110526880525a5cd3/app/src/main/java/ani/saikou/anime/source/extractors/GogoCDN.kt - // No Licence on the following code - // Also modified of https://github.com/jmir1/aniyomi-extensions/blob/master/src/en/gogoanime/src/eu/kanade/tachiyomi/animeextension/en/gogoanime/extractors/GogoCdnExtractor.kt - // License on the code above https://github.com/jmir1/aniyomi-extensions/blob/master/LICENSE - - if ((iv == null || secretKey == null || secretDecryptKey == null) && !isUsingAdaptiveKeys) - return@safeApiCall - - val id = Regex("id=([^&]+)").find(iframeUrl)!!.value.removePrefix("id=") - - var document: Document? = iframeDocument - val foundIv = - iv ?: (document ?: app.get(iframeUrl).document.also { document = it }) - .select("""div.wrapper[class*=container]""") - .attr("class").split("-").lastOrNull() ?: return@safeApiCall - val foundKey = secretKey ?: getKey(base64Decode(id) + foundIv) ?: return@safeApiCall - val foundDecryptKey = secretDecryptKey ?: foundKey - - val uri = URI(iframeUrl) - val mainUrl = "https://" + uri.host - - val encryptedId = cryptoHandler(id, foundIv, foundKey) - val encryptRequestData = if (isUsingAdaptiveData) { - // Only fetch the document if necessary - val realDocument = document ?: app.get(iframeUrl).document - val dataEncrypted = - realDocument.select("script[data-name='episode']").attr("data-value") - val headers = cryptoHandler(dataEncrypted, foundIv, foundKey, false) - "id=$encryptedId&alias=$id&" + headers.substringAfter("&") - } else { - "id=$encryptedId&alias=$id" - } - - val jsonResponse = - app.get( - "$mainUrl/encrypt-ajax.php?$encryptRequestData", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ) - val dataencrypted = - jsonResponse.text.substringAfter("{\"data\":\"").substringBefore("\"}") - val datadecrypted = cryptoHandler(dataencrypted, foundIv, foundDecryptKey, false) - val sources = AppUtils.parseJson(datadecrypted) - - suspend fun invokeGogoSource( - source: GogoSource, - sourceCallback: (ExtractorLink) -> Unit - ) { - if (source.file.contains(".m3u8")) { - M3u8Helper.generateM3u8( - mainApiName, - source.file, - mainUrl, - headers = mapOf("Origin" to "https://plyr.link") - ).forEach(sourceCallback) - } else { - sourceCallback.invoke( - ExtractorLink( - mainApiName, - mainApiName, - source.file, - mainUrl, - getQualityFromName(source.label), - ) - ) - } - } - - sources.source?.forEach { - invokeGogoSource(it, callback) - } - sources.sourceBk?.forEach { - invokeGogoSource(it, callback) - } - } - - data class GogoSources( - @JsonProperty("source") val source: List?, - @JsonProperty("sourceBk") val sourceBk: List?, - //val track: List, - //val advertising: List, - //val linkiframe: String - ) - - data class GogoSource( - @JsonProperty("file") val file: String, - @JsonProperty("label") val label: String?, - @JsonProperty("type") val type: String?, - @JsonProperty("default") val default: String? = null - ) -} diff --git a/Kickassanime/src/main/kotlin/com/hexated/Kickassanime.kt b/Kickassanime/src/main/kotlin/com/hexated/Kickassanime.kt deleted file mode 100644 index 75184a6e..00000000 --- a/Kickassanime/src/main/kotlin/com/hexated/Kickassanime.kt +++ /dev/null @@ -1,382 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.hexated.KickassanimeExtractor.invokeAlpha -import com.hexated.KickassanimeExtractor.invokeBeta -import com.hexated.KickassanimeExtractor.invokeDailymotion -import com.hexated.KickassanimeExtractor.invokeGogo -import com.hexated.KickassanimeExtractor.invokeMave -import com.hexated.KickassanimeExtractor.invokePinkbird -import com.hexated.KickassanimeExtractor.invokeSapphire -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.syncproviders.SyncIdName -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson - -open class Kickassanime : MainAPI() { - final override var mainUrl = "https://www2.kickassanime.ro" - override var name = "Kickassanime" - override val hasMainPage = true - override var lang = "en" - override val hasDownloadSupport = true - - override val supportedSyncNames = setOf( - SyncIdName.MyAnimeList, - SyncIdName.Anilist - ) - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - const val kaast = "https://kaast1.com" - private const val consumetAnilist = "https://api.consumet.org/meta/anilist" - private const val consumetMal = "https://api.consumet.org/meta/mal" - fun getType(t: String): TvType { - return when { - t.contains("Ova", true) -> TvType.OVA - t.contains("Movie", true) -> TvType.AnimeMovie - else -> TvType.Anime - } - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Finished Airing" -> ShowStatus.Completed - "Currently Airing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/api/get_anime_list/all/" to "All", - "$mainUrl/api/get_anime_list/sub/" to "Sub", - "$mainUrl/api/get_anime_list/dub/" to "Dub", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val home = app.get(request.data + page).parsedSafe()?.data?.mapNotNull { media -> - media.toSearchResponse() - } ?: throw ErrorLoadingException() - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return when { - uri.contains("/episode") -> fixUrl(uri.substringBeforeLast("/")) - else -> fixUrl(uri) - } - } - - private fun Animes.toSearchResponse(): AnimeSearchResponse? { - val href = getProperAnimeLink(this.slug ?: return null) - val title = this.name ?: return null - val posterUrl = getImageUrl(this.poster) - val episode = this.episode?.toIntOrNull() - val isDub = this.name.contains("(Dub)") - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addDubStatus(isDub, episode) - } - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search?q=$query").document - val data = document.selectFirst("script:containsData(appData)")?.data() - ?.substringAfter("\"animes\":[")?.substringBefore("],") - return tryParseJson>("[$data]")?.mapNotNull { media -> media.toSearchResponse() } - ?: throw ErrorLoadingException() - } - - override suspend fun getLoadUrl(name: SyncIdName, id: String): String { - val syncId = id.split("/").last() - val url = if (name == SyncIdName.Anilist) { - "$consumetAnilist/info/$syncId" - } else { - "$consumetMal/info/$syncId" - } - - val res = app.get(url).parsedSafe()?.title - - val romanjiUrl = "$mainUrl/anime/${res?.romaji?.createSlug()}" - val englishUrl = "$mainUrl/anime/${res?.english?.createSlug()}" - - return if (app.get(romanjiUrl).url != "$mainUrl/") romanjiUrl else englishUrl - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val res = document.selectFirst("script:containsData(appData)")?.data() - ?.substringAfter("\"anime\":{")?.substringBefore("},\"wkl\"")?.let { - tryParseJson("{$it}") - } ?: throw ErrorLoadingException() - - val title = res.name ?: return null - val trackerTitle = res.en_title.orEmpty().ifEmpty { res.name }.getTrackerTitle() - val poster = getImageUrl(res.image) - val tags = res.genres?.map { it.name ?: return null } - val year = res.startdate?.substringBefore("-")?.toIntOrNull() - val status = getStatus(res.status ?: return null) - val description = res.description - - val episodes = res.episodes?.mapNotNull { eps -> - Episode(fixUrl(eps.slug ?: return@mapNotNull null), episode = eps.num?.toIntOrNull()) - }?.reversed() ?: emptyList() - - val type = res.type?.substringBefore(",")?.trim()?.let { - when (it) { - "TV Series" -> "tv" - "Ova" -> "ova" - "ONA" -> "ona" - "Movie" -> "movie" - else -> "tv" - } - } ?: if (episodes.size == 1) "movie" else "tv" - - val (malId, anilistId, image, cover) = getTracker( - trackerTitle, - title.getTrackerTitle(), - type, - year - ) - - return newAnimeLoadResponse(title, url, getType(type)) { - engName = title - posterUrl = image ?: poster - backgroundPosterUrl = cover ?: image ?: poster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - addMalId(malId) - addAniListId(anilistId?.toIntOrNull()) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - val sources = document.selectFirst("script:containsData(appData)")?.data()?.let { - tryParseJson("{${Regex("(\"episode\":.*),\"wkl").find(it)?.groupValues?.get(1)}}") - }?.let { server -> - listOf( - server.episode?.link1.orEmpty().ifEmpty { server.episode?.link4 }, - server.ext_servers?.find { it.name == "Vidstreaming" }?.link - ) - }?.filterNotNull() - val isDub = data.contains("-dub-") - sources?.flatMap { - httpsify(it).fixIframe() - }?.apmap { (name, iframe) -> - val sourceName = fixTitle(name ?: this.name) - val link = httpsify(iframe ?: return@apmap null) - when { - link.startsWith("https://www.dailymotion.com") -> { - invokeDailymotion(link, subtitleCallback, callback) - } - name?.contains(Regex("(?i)(KICKASSANIMEV2|ORIGINAL-QUALITY-V2|BETA-SERVER|DAILYMOTION)")) == true -> { - invokeAlpha(sourceName, link, subtitleCallback, callback) - } - name?.contains(Regex("(?i)(BETAPLAYER)")) == true -> { - invokeBeta(sourceName, link, callback) - } - name?.contains(Regex("(?i)(MAVERICKKI)")) == true -> { - invokeMave(sourceName, link, subtitleCallback, callback) - } - name?.contains(Regex("(?i)(gogo)")) == true -> { - invokeGogo(link, subtitleCallback, callback) - } - name?.contains(Regex("(?i)(SAPPHIRE-DUCK)")) == true -> { - invokeSapphire(link, isDub, subtitleCallback, callback) - } - name?.contains(Regex("(?i)(PINK-BIRD)")) == true -> { - invokePinkbird(sourceName, link, callback) - } - else -> return@apmap null - } - } - - return true - } - - private suspend fun getTracker( - title: String?, - romajiTitle: String?, - type: String?, - year: Int? - ): Tracker { - val res = searchAnime(title).orEmpty().ifEmpty { searchAnime(romajiTitle) } - val media = res?.find { media -> - (media.title?.english.equals(title, true) || media.title?.romaji.equals( - title, - true - )) || (media.type.equals(type, true) && media.releaseDate == year) - } - return Tracker(media?.malId, media?.aniId, media?.image, media?.cover) - } - - private suspend fun searchAnime(title: String?): ArrayList? { - return app.get("$consumetAnilist/$title") - .parsedSafe()?.results - } - - data class Tracker( - val malId: Int? = null, - val aniId: String? = null, - val image: String? = null, - val cover: String? = null, - ) - - data class Title( - @JsonProperty("romaji") val romaji: String? = null, - @JsonProperty("english") val english: String? = null, - ) - - data class Results( - @JsonProperty("id") val aniId: String? = null, - @JsonProperty("malId") val malId: Int? = null, - @JsonProperty("title") val title: Title? = null, - @JsonProperty("releaseDate") val releaseDate: Int? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("image") val image: String? = null, - @JsonProperty("cover") val cover: String? = null, - ) - - data class AniSearch( - @JsonProperty("results") val results: ArrayList? = arrayListOf(), - ) - - data class Genres( - @JsonProperty("name") val name: String? = null, - @JsonProperty("slug") val slug: String? = null, - ) - - data class Episodes( - @JsonProperty("epnum") val epnum: String? = null, - @JsonProperty("name") val name: String? = null, - @JsonProperty("slug") val slug: String? = null, - @JsonProperty("createddate") val createddate: String? = null, - @JsonProperty("num") val num: String? = null, - ) - - data class DetailAnime( - @JsonProperty("name") val name: String? = null, - @JsonProperty("en_title") val en_title: String? = null, - @JsonProperty("slug") val slug: String? = null, - @JsonProperty("description") val description: String? = null, - @JsonProperty("status") val status: String? = null, - @JsonProperty("image") val image: String? = null, - @JsonProperty("startdate") val startdate: String? = null, - @JsonProperty("broadcast_day") val broadcast_day: String? = null, - @JsonProperty("broadcast_time") val broadcast_time: String? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("episodes") val episodes: ArrayList? = null, - @JsonProperty("genres") val genres: ArrayList? = null, - ) - - data class Animes( - @JsonProperty("episode") val episode: String? = null, - @JsonProperty("slug") val slug: String? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("episode_date") val episode_date: String? = null, - @JsonProperty("name") val name: String? = null, - @JsonProperty("poster") val poster: String? = null, - ) - - data class Responses( - @JsonProperty("data") val data: ArrayList? = arrayListOf(), - ) - - data class Iframe( - @JsonProperty("name") val name: String? = null, - @JsonProperty("src") val src: String? = null, - ) - - data class ExtServers( - @JsonProperty("name") val name: String? = null, - @JsonProperty("link") val link: String? = null, - ) - - data class Eps( - @JsonProperty("link1") val link1: String? = null, - @JsonProperty("link4") val link4: String? = null, - ) - - data class Resources( - @JsonProperty("episode") val episode: Eps? = null, - @JsonProperty("ext_servers") val ext_servers: ArrayList? = arrayListOf(), - ) - - data class BetaSources( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - ) - - data class AlphaSources( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - ) - - data class MaveSubtitles( - @JsonProperty("name") val name: String? = null, - @JsonProperty("src") val src: String? = null, - ) - - data class MaveSources( - @JsonProperty("hls") val hls: String? = null, - @JsonProperty("subtitles") val subtitles: ArrayList? = arrayListOf(), - ) - - data class SapphireSubtitles( - @JsonProperty("language") val language: String? = null, - @JsonProperty("url") val url: String? = null, - ) - - data class SapphireStreams( - @JsonProperty("format") val format: String? = null, - @JsonProperty("audio_lang") val audio_lang: String? = null, - @JsonProperty("hardsub_lang") val hardsub_lang: String? = null, - @JsonProperty("url") val url: String? = null, - ) - - data class SapphireSources( - @JsonProperty("streams") val streams: ArrayList? = arrayListOf(), - @JsonProperty("subtitles") val subtitles: ArrayList? = arrayListOf(), - ) - - data class PinkbirdSources( - @JsonProperty("data") val data: ArrayList? = arrayListOf(), - ) - - data class PinkbirdData( - @JsonProperty("eid") val eid: String? = null, - @JsonProperty("lh") val lh: String? = null, - ) - - data class SyncTitle( - @JsonProperty("romaji") val romaji: String? = null, - @JsonProperty("english") val english: String? = null, - ) - - data class SyncInfo( - @JsonProperty("title") val title: SyncTitle? = null, - ) - -} \ No newline at end of file diff --git a/Kickassanime/src/main/kotlin/com/hexated/KickassanimeExtractor.kt b/Kickassanime/src/main/kotlin/com/hexated/KickassanimeExtractor.kt deleted file mode 100644 index 255ecb24..00000000 --- a/Kickassanime/src/main/kotlin/com/hexated/KickassanimeExtractor.kt +++ /dev/null @@ -1,201 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.argamap -import com.lagradost.cloudstream3.base64Decode -import com.lagradost.cloudstream3.utils.* -import org.jsoup.Jsoup - -object KickassanimeExtractor : Kickassanime() { - - suspend fun invokePinkbird( - name: String, - url: String? = null, - callback: (ExtractorLink) -> Unit - ) { - val fixUrl = url?.replace(Regex("(player|embed)\\.php"), "pref.php") - app.get(fixUrl ?: return, - ).parsedSafe()?.data?.map { source -> - val eid = base64Decode(source.eid ?: return@map null) - callback.invoke( - ExtractorLink( - name, - name, - "https://pb.kaast1.com/manifest/$eid/master.m3u8", - "$kaast/", - Qualities.P1080.value, - true - ) - ) - } - } - - suspend fun invokeAlpha( - name: String, - url: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val fixUrl = url?.replace(Regex("(player|embed)\\.php"), "pref.php") - val data = app.get( - fixUrl ?: return, - referer = kaast - ).document.selectFirst("script:containsData(Base64.decode)")?.data() - ?.substringAfter("Base64.decode(\"")?.substringBefore("\")")?.let { base64Decode(it) } ?: return - - if (name == "Dailymotion") { - val iframe = Jsoup.parse(data).select("iframe").attr("src") - invokeDailymotion(iframe, subtitleCallback, callback) - } else { - val json = data.substringAfter("sources: [").substringBefore("],") - AppUtils.tryParseJson>("[$json]")?.map { - callback.invoke( - ExtractorLink( - name, - name, - it.file ?: return@map null, - url, - getQualityFromName(it.label) - ) - ) - } - } - - } - - suspend fun invokeBeta( - name: String, - url: String? = null, - callback: (ExtractorLink) -> Unit - ) { - app.get( - url ?: return, - referer = kaast - ).document.selectFirst("script:containsData(JSON.parse)")?.data() - ?.substringAfter("JSON.parse('")?.substringBeforeLast("')") - ?.let { AppUtils.tryParseJson>(it) }?.map { - callback.invoke( - ExtractorLink( - name, - name, - it.file ?: return@map null, - getBaseUrl(url), - getQualityFromName(it.label) - ) - ) - } - } - - suspend fun invokeMave( - name: String, - url: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - ) { - val fixUrl = url?.replace("/embed/", "/api/source/") ?: return - val base = getBaseUrl(url) - val data = app.get(fixUrl, referer = url).parsedSafe() - - M3u8Helper.generateM3u8( - if(data?.subtitles.isNullOrEmpty()) "$name [Hardsub]" else "$name [Softsub]", - fixUrl(data?.hls ?: return, base), - url - ).forEach(callback) - - data.subtitles?.map { sub -> - subtitleCallback.invoke( - SubtitleFile( - sub.name ?: "", - fixUrl(sub.src ?: return@map null, base) - ) - ) - } - - } - - suspend fun invokeSapphire( - url: String? = null, - isDub: Boolean = false, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - ) { - var data = app.get("$url&action=config", referer = url).text - while(true) { - if(data.startsWith("{") || data == "null") break - data = data.base64Decode() - } - AppUtils.tryParseJson(data).let { res -> - res?.streams?.filter { it.format == "adaptive_hls" }?.reversed()?.map { source -> - val name = if(isDub) source.audio_lang else source.hardsub_lang.orEmpty().ifEmpty { "raw" } - M3u8Helper.generateM3u8( - "Crunchyroll [$name]", - source.url ?: return@map null, - "https://static.crunchyroll.com/", - ).forEach(callback) - } - res?.subtitles?.map { sub -> - subtitleCallback.invoke( - SubtitleFile( - getLanguage(sub.language ?: return@map null) ?: sub.language, - sub.url ?: return@map null - ) - ) - } - } - } - - suspend fun invokeGogo( - link: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val iframe = app.get(link) - val iframeDoc = iframe.document - argamap({ - iframeDoc.select(".list-server-items > .linkserver") - .forEach { element -> - val status = element.attr("data-status") ?: return@forEach - if (status != "1") return@forEach - val extractorData = element.attr("data-video") ?: return@forEach - loadExtractor(extractorData, iframe.url, subtitleCallback, callback) - } - }, { - val iv = "3134003223491201" - val secretKey = "37911490979715163134003223491201" - val secretDecryptKey = "54674138327930866480207815084989" - GogoExtractor.extractVidstream( - iframe.url, - "Gogoanime", - callback, - iv, - secretKey, - secretDecryptKey, - isUsingAdaptiveKeys = false, - isUsingAdaptiveData = true, - iframeDocument = iframeDoc - ) - }) - } - - suspend fun invokeDailymotion( - link: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(link, mainUrl, subtitleCallback) { video -> - callback.invoke( - ExtractorLink( - video.name, - video.name, - video.url, - video.referer, - Qualities.P1080.value, - video.isM3u8, - video.headers, - video.extractorData - ) - ) - } - } -} \ No newline at end of file diff --git a/Kickassanime/src/main/kotlin/com/hexated/KickassanimePlugin.kt b/Kickassanime/src/main/kotlin/com/hexated/KickassanimePlugin.kt deleted file mode 100644 index 5565d18d..00000000 --- a/Kickassanime/src/main/kotlin/com/hexated/KickassanimePlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class KickassanimePlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Kickassanime()) - } -} \ No newline at end of file diff --git a/Kickassanime/src/main/kotlin/com/hexated/KickassanimeUtils.kt b/Kickassanime/src/main/kotlin/com/hexated/KickassanimeUtils.kt deleted file mode 100644 index e51df458..00000000 --- a/Kickassanime/src/main/kotlin/com/hexated/KickassanimeUtils.kt +++ /dev/null @@ -1,90 +0,0 @@ -package com.hexated - -import android.util.Base64 -import com.hexated.KickassanimeExtractor.mainUrl -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.utils.AppUtils -import com.lagradost.cloudstream3.utils.SubtitleHelper -import java.net.URI -import java.net.URLDecoder - -suspend fun String.fixIframe(): List> { - return when { - this.startsWith("${Kickassanime.kaast}/dust/") -> { - val document = app.get(this).document - document.selectFirst("script:containsData(sources =)")?.data() - ?.substringAfter("sources = [")?.substringBefore("];")?.let { - AppUtils.tryParseJson>("[$it]")?.map { source -> - source.name to source.src - } - } ?: emptyList() - } - this.startsWith("${Kickassanime.kaast}/axplayer/") -> { - val source = decode( - this.substringAfter("&data=").substringBefore("&vref=") - ) - listOf("gogo" to source) - } - else -> { - emptyList() - } - } -} - -fun String.base64Decode(): String { - return Base64.decode(this, Base64.DEFAULT).toString(Charsets.UTF_8) -} - -fun decode(input: String): String = - URLDecoder.decode(input, "utf-8").replace(" ", "%20") - -fun String.createSlug(): String { - return this.replace(Regex("[^\\w ]+"), "").replace(" ", "-").lowercase() -} - -fun String.getTrackerTitle(): String { - val blacklist = arrayOf( - "Dub", - "Uncensored", - "TV", - "JPN DUB", - "Uncensored" - ).joinToString("|") { "\\($it\\)" } - return this.replace(Regex(blacklist), "").trim() -} - -fun getImageUrl(link: String?): String? { - if (link == null) return null - return if (link.startsWith(mainUrl)) link else "$mainUrl/uploads/$link" -} - -fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } -} - - -fun getLanguage(language: String?): String? { - return SubtitleHelper.fromTwoLettersToLanguage(language ?: return null) - ?: SubtitleHelper.fromTwoLettersToLanguage(language.substringBefore("-")) -} - -fun fixUrl(url: String, domain: String): String { - if (url.startsWith("http")) { - return url - } - if (url.isEmpty()) { - return "" - } - - val startsWithNoHttp = url.startsWith("//") - if (startsWithNoHttp) { - return "https:$url" - } else { - if (url.startsWith('/')) { - return domain + url - } - return "$domain/$url" - } -} \ No newline at end of file diff --git a/Kissasian/build.gradle.kts b/Kissasian/build.gradle.kts deleted file mode 100644 index 03d38561..00000000 --- a/Kissasian/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -// use an integer for version numbers -version = 3 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - description = "Include: KissasianMx" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf("AsianDrama",) - - iconUrl = "https://www.google.com/s2/favicons?domain=kissasian.pe&sz=%size%" -} \ No newline at end of file diff --git a/Kissasian/src/main/AndroidManifest.xml b/Kissasian/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Kissasian/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Kissasian/src/main/kotlin/com/hexated/Kissasian.kt b/Kissasian/src/main/kotlin/com/hexated/Kissasian.kt deleted file mode 100644 index 0d70fda2..00000000 --- a/Kissasian/src/main/kotlin/com/hexated/Kissasian.kt +++ /dev/null @@ -1,146 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.extractors.helper.GogoHelper -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.httpsify -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element - -open class Kissasian : MainAPI() { - override var mainUrl = "https://kissasian.pe" - override var name = "Kissasian" - override val hasMainPage = true - override val hasDownloadSupport = true - override val supportedTypes = setOf(TvType.AsianDrama) - - companion object { - fun getStatus(t: String?): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "drama-list/ongoing.html?page=" to "Drama Ongoing", - "drama-list/completed.html?page=" to "Drama Completed", - "genre/variety/?page=" to "Variety Show", - "genre/romance/?page=" to "Romance", - "genre/action/?page=" to "Action", - "genre/mystery/?page=" to "Mystery", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val document = app.get("$mainUrl/${request.data}$page").document - val home = document.select("div.list-drama div.item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null) - val title = this.selectFirst("span.title")?.text()?.trim() ?: return null - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { - this.posterUrl = posterUrl - } - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search.html?keyword=$query").document - return document.select("div.list-drama div.item").mapNotNull { - it.toSearchResult() - } - } - - open val contentInfoClass = "barContentInfo" - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("div.$contentInfoClass a")?.text()?.trim() ?: return null - val poster = fixUrlNull(document.select("div.$contentInfoClass img").last()?.attr("src")) - val tags = document.select("div.$contentInfoClass p:contains(Genres:) a").map { it.text().removePrefix(",").trim() } - - val year = document.selectFirst("div.$contentInfoClass p.type.Releasea")?.text()?.trim()?.toIntOrNull() - val status = getStatus(document.selectFirst("div.$contentInfoClass p:contains(Status:)")?.ownText()?.trim()) - val description = document.selectFirst("div.$contentInfoClass p.des, div.$contentInfoClass p:last-child")?.nextElementSiblings()?.select("p")?.text() - - val episodes = document.select("ul.listing li, table.listing td.episodeSub").map { - val name = it.selectFirst("a")?.attr("title") - val link = fixUrlNull(it.selectFirst("a")?.attr("href")) - val epNum = Regex("Episode\\s(\\d+)").find("$name")?.groupValues?.getOrNull(1)?.toIntOrNull() - newEpisode(link) { - this.name = name - this.episode = epNum - } - }.reversed() - - if (episodes.size == 1) { - return newMovieLoadResponse(title, url, TvType.Movie, episodes[0].data) { - posterUrl = poster - this.year = year - plot = description - this.tags = tags - } - } else { - return newTvSeriesLoadResponse(title, url, TvType.AsianDrama, episodes = episodes) { - posterUrl = poster - this.year = year - showStatus = status - plot = description - this.tags = tags - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - val server = document.selectFirst("select#selectServer option")?.attr("value") - val iframe = app.get(httpsify(server ?: return false)) - val iframeDoc = iframe.document - - argamap({ - iframeDoc.select(".list-server-items > .linkserver") - .forEach { element -> - val status = element.attr("data-status") ?: return@forEach - if (status != "1") return@forEach - val extractorData = element.attr("data-video") ?: return@forEach - loadExtractor(extractorData, iframe.url, subtitleCallback, callback) - } - }, { - val iv = "9262859232435825" - val secretKey = "93422192433952489752342908585752" - val secretDecryptKey = secretKey - GogoHelper.extractVidstream( - iframe.url, - this.name, - callback, - iv, - secretKey, - secretDecryptKey, - isUsingAdaptiveKeys = false, - isUsingAdaptiveData = true, - iframeDocument = iframeDoc - ) - }) - - return true - } - -} - -class Kswplayer : Filesim() { - override val name = "Kswplayer" - override var mainUrl = "https://kswplayer.info" -} diff --git a/Kissasian/src/main/kotlin/com/hexated/KissasianMx.kt b/Kissasian/src/main/kotlin/com/hexated/KissasianMx.kt deleted file mode 100644 index ede3dd86..00000000 --- a/Kissasian/src/main/kotlin/com/hexated/KissasianMx.kt +++ /dev/null @@ -1,58 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SearchResponse -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.TvType -import com.lagradost.cloudstream3.apmap -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.fixUrl -import com.lagradost.cloudstream3.mainPageOf -import com.lagradost.cloudstream3.newTvSeriesSearchResponse -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor - -class KissasianMx : Kissasian() { - override var mainUrl = "https://kissasian.mx" - override var name = "KissasianMx" - override val contentInfoClass = "barContent" - override val mainPage = mainPageOf( - "Status/Ongoing?page=" to "Drama Ongoing", - "Status/Completed?page=" to "Drama Completed", - "Status/Completed?page=" to "Drama Completed", - "Genre/Romance?page=" to "Drama Romance", - "Genre/Reality-TV?page=" to "Reality-TV", - "Genre/Mystery?page=" to "Drama Mystery", - "Genre/Movie?page=" to "Movie", - ) - - override suspend fun search(query: String): List { - val document = app.post( - "$mainUrl/Search/SearchSuggest", data = mapOf( - "type" to "Drama", - "keyword" to query, - ), headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).document - return document.select("a").mapNotNull { - val href = fixUrl(it.attr("href")) - val title = it.text() - newTvSeriesSearchResponse(title, href, TvType.AsianDrama) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - document.select("select#selectServer option").apmap { - val server = it.attr("value") - val iframe = app.get(fixUrl(server ?: return@apmap)).document.selectFirst("div#centerDivVideo iframe")?.attr("src") - loadExtractor(iframe ?: return@apmap, "$mainUrl/", subtitleCallback, callback) - } - - return true - } -} \ No newline at end of file diff --git a/Kissasian/src/main/kotlin/com/hexated/KissasianPlugin.kt b/Kissasian/src/main/kotlin/com/hexated/KissasianPlugin.kt deleted file mode 100644 index 0fd3e446..00000000 --- a/Kissasian/src/main/kotlin/com/hexated/KissasianPlugin.kt +++ /dev/null @@ -1,16 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class KissasianPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Kissasian()) - registerMainAPI(KissasianMx()) - registerExtractorAPI(Kswplayer()) - } -} \ No newline at end of file diff --git a/KisskhProvider/build.gradle.kts b/KisskhProvider/build.gradle.kts deleted file mode 100644 index d2bcff25..00000000 --- a/KisskhProvider/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -// use an integer for version numbers -version = 4 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "TvSeries", - "Anime", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=kisskh.me&sz=%size%" -} \ No newline at end of file diff --git a/KisskhProvider/src/main/AndroidManifest.xml b/KisskhProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/KisskhProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/KisskhProvider/src/main/kotlin/com/hexated/KisskhProvider.kt b/KisskhProvider/src/main/kotlin/com/hexated/KisskhProvider.kt deleted file mode 100644 index 4fd4ed77..00000000 --- a/KisskhProvider/src/main/kotlin/com/hexated/KisskhProvider.kt +++ /dev/null @@ -1,217 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.loadExtractor -import java.util.ArrayList - -class KisskhProvider : MainAPI() { - override var mainUrl = "https://kisskh.co" - override var name = "Kisskh" - override val hasMainPage = true - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.AsianDrama, - TvType.Anime - ) - - override val mainPage = mainPageOf( - "&type=2&sub=0&country=2&status=0&order=1" to "Movie Popular", - "&type=2&sub=0&country=2&status=0&order=2" to "Movie Last Update", - "&type=1&sub=0&country=2&status=0&order=1" to "TVSeries Popular", - "&type=1&sub=0&country=2&status=0&order=2" to "TVSeries Last Update", - "&type=3&sub=0&country=0&status=0&order=1" to "Anime Popular", - "&type=3&sub=0&country=0&status=0&order=2" to "Anime Last Update", - "&type=4&sub=0&country=0&status=0&order=1" to "Hollywood Popular", - "&type=4&sub=0&country=0&status=0&order=2" to "Hollywood Last Update", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val home = app.get("$mainUrl/api/DramaList/List?page=$page${request.data}") - .parsedSafe()?.data - ?.mapNotNull { media -> - media.toSearchResponse() - } ?: throw ErrorLoadingException("Invalid Json reponse") - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = true - ), - hasNext = true - ) - } - - private fun Media.toSearchResponse(): SearchResponse? { - - return newAnimeSearchResponse( - title ?: return null, - "$title/$id", - TvType.TvSeries, - ) { - this.posterUrl = thumbnail - addSub(episodesCount) - } - } - - override suspend fun search(query: String): List { - val searchResponse = - app.get("$mainUrl/api/DramaList/Search?q=$query&type=0", referer = "$mainUrl/").text - return tryParseJson>(searchResponse)?.mapNotNull { media -> - media.toSearchResponse() - } ?: throw ErrorLoadingException("Invalid Json reponse") - } - - private fun getTitle(str: String): String { - return str.replace(Regex("[^a-zA-Z0-9]"), "-") - } - - override suspend fun load(url: String): LoadResponse? { - val id = url.split("/") - val res = app.get( - "$mainUrl/api/DramaList/Drama/${id.last()}?isq=false", - referer = "$mainUrl/Drama/${ - getTitle(id.first()) - }?id=${id.last()}" - ).parsedSafe() - ?: throw ErrorLoadingException("Invalid Json reponse") - - val episodes = res.episodes?.map { eps -> - Episode( - data = Data(res.title, eps.number, res.id, eps.id).toJson(), - episode = eps.number - ) - } ?: throw ErrorLoadingException("No Episode") - - return newTvSeriesLoadResponse( - res.title ?: return null, - url, - if (res.type == "Movie" || episodes.size == 1) TvType.Movie else TvType.TvSeries, - episodes - ) { - this.posterUrl = res.thumbnail - this.year = res.releaseDate?.split("-")?.first()?.toIntOrNull() - this.plot = res.description - this.tags = listOf("${res.country}", "${res.status}", "${res.type}") - this.showStatus = when (res.status) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> null - } - } - - } - - private fun getLanguage(str: String): String { - return when (str) { - "Indonesia" -> "Indonesian" - else -> str - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val loadData = parseJson(data) - - app.get( - "$mainUrl/api/DramaList/Episode/${loadData.epsId}.png?err=false&ts=&time=", - referer = "$mainUrl/Drama/${getTitle("${loadData.title}")}/Episode-${loadData.eps}?id=${loadData.id}&ep=${loadData.epsId}&page=0&pageSize=100" - ).parsedSafe()?.let { source -> - listOf(source.video, source.thirdParty).apmap { link -> - safeApiCall { - if (link?.contains(".m3u8") == true) { - M3u8Helper.generateM3u8( - this.name, - link, - referer = "$mainUrl/", - headers = mapOf("Origin" to mainUrl) - ).forEach(callback) - } else { - loadExtractor( - link?.substringBefore("=http") ?: return@safeApiCall, - "$mainUrl/", - subtitleCallback, - callback - ) - } - } - } - } - - // parsedSafe doesn't work in > - app.get("$mainUrl/api/Sub/${loadData.epsId}").text.let { res -> - tryParseJson>(res)?.map { sub -> - subtitleCallback.invoke( - SubtitleFile( - getLanguage(sub.label ?: return@map), - sub.src ?: return@map - ) - ) - } - } - - return true - - } - - data class Data( - val title: String?, - val eps: Int?, - val id: Int?, - val epsId: Int?, - ) - - data class Sources( - @JsonProperty("Video") val video: String?, - @JsonProperty("ThirdParty") val thirdParty: String?, - ) - - data class Subtitle( - @JsonProperty("src") val src: String?, - @JsonProperty("label") val label: String?, - ) - - data class Responses( - @JsonProperty("data") val data: ArrayList? = arrayListOf(), - ) - - data class Media( - @JsonProperty("episodesCount") val episodesCount: Int?, - @JsonProperty("thumbnail") val thumbnail: String?, - @JsonProperty("id") val id: Int?, - @JsonProperty("title") val title: String?, - ) - - data class Episodes( - @JsonProperty("id") val id: Int?, - @JsonProperty("number") val number: Int?, - @JsonProperty("sub") val sub: Int?, - ) - - data class MediaDetail( - @JsonProperty("description") val description: String?, - @JsonProperty("releaseDate") val releaseDate: String?, - @JsonProperty("status") val status: String?, - @JsonProperty("type") val type: String?, - @JsonProperty("country") val country: String?, - @JsonProperty("episodes") val episodes: ArrayList? = arrayListOf(), - @JsonProperty("thumbnail") val thumbnail: String?, - @JsonProperty("id") val id: Int?, - @JsonProperty("title") val title: String?, - ) - -} diff --git a/KisskhProvider/src/main/kotlin/com/hexated/KisskhProviderPlugin.kt b/KisskhProvider/src/main/kotlin/com/hexated/KisskhProviderPlugin.kt deleted file mode 100644 index 70f05e71..00000000 --- a/KisskhProvider/src/main/kotlin/com/hexated/KisskhProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class KisskhProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(KisskhProvider()) - } -} \ No newline at end of file diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts deleted file mode 100644 index fac8e2b3..00000000 --- a/KuramanimeProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 34 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=kuramanime.com&sz=%size%" -} \ No newline at end of file diff --git a/KuramanimeProvider/src/main/AndroidManifest.xml b/KuramanimeProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/KuramanimeProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index 2b55fd0d..00000000 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,118 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.extractors.StreamSB -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.getQualityFromName - -class Nyomo : StreamSB() { - override var name: String = "Nyomo" - override var mainUrl = "https://nyomo.my.id" -} - -class Streamhide : Filesim() { - override var name: String = "Streamhide" - override var mainUrl: String = "https://streamhide.to" -} - -open class Lbx : ExtractorApi() { - override val name = "Linkbox" - override val mainUrl = "https://lbx.to" - private val realUrl = "https://www.linkbox.to" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val token = Regex("""(?:/f/|/file/|\?id=)(\w+)""").find(url)?.groupValues?.get(1) - val id = app.get("$realUrl/api/file/share_out_list/?sortField=utime&sortAsc=0&pageNo=1&pageSize=50&shareToken=$token").parsedSafe()?.data?.itemId - app.get("$realUrl/api/file/detail?itemId=$id", referer = url) - .parsedSafe()?.data?.itemInfo?.resolutionList?.map { link -> - callback.invoke( - ExtractorLink( - name, - name, - link.url ?: return@map null, - "$realUrl/", - getQualityFromName(link.resolution) - ) - ) - } - } - - data class Resolutions( - @JsonProperty("url") val url: String? = null, - @JsonProperty("resolution") val resolution: String? = null, - ) - - data class ItemInfo( - @JsonProperty("resolutionList") val resolutionList: ArrayList? = arrayListOf(), - ) - - data class Data( - @JsonProperty("itemInfo") val itemInfo: ItemInfo? = null, - @JsonProperty("itemId") val itemId: String? = null, - ) - - data class Responses( - @JsonProperty("data") val data: Data? = null, - ) - -} - -open class Kuramadrive : ExtractorApi() { - override val name = "DriveKurama" - override val mainUrl = "https://kuramadrive.com" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val req = app.get(url, referer = referer) - val doc = req.document - - val title = doc.select("title").text() - val token = doc.select("meta[name=csrf-token]").attr("content") - val routeCheckAvl = doc.select("input#routeCheckAvl").attr("value") - - val json = app.get( - routeCheckAvl, headers = mapOf( - "X-Requested-With" to "XMLHttpRequest", - "X-CSRF-TOKEN" to token - ), - referer = url, - cookies = req.cookies - ).parsedSafe() - - callback.invoke( - ExtractorLink( - name, - name, - json?.url ?: return, - "$mainUrl/", - getIndexQuality(title), - ) - ) - } - - private fun getIndexQuality(str: String?): Int { - return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull() - ?: Qualities.Unknown.value - } - - private data class Source( - @JsonProperty("url") val url: String, - ) - -} \ No newline at end of file diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt deleted file mode 100644 index 82d488e4..00000000 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ /dev/null @@ -1,270 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.network.WebViewResolver -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.loadExtractor -import com.lagradost.nicehttp.requestCreator -import okhttp3.Headers -import okhttp3.HttpUrl -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -class KuramanimeProvider : MainAPI() { - override var mainUrl = "https://kuramanime.pro" - override var name = "Kuramanime" - override val hasQuickSearch = false - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - private var params: AuthParams? = null - private var headers: Map = mapOf() - private var cookies: Map = mapOf() - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String, s: Int): TvType { - return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA - else if (t.contains("Movie", true) && s == 1) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Selesai Tayang" -> ShowStatus.Completed - "Sedang Tayang" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/anime/ongoing?order_by=updated&page=" to "Sedang Tayang", - "$mainUrl/anime/finished?order_by=updated&page=" to "Selesai Tayang", - "$mainUrl/properties/season/summer-2022?order_by=most_viewed&page=" to "Dilihat Terbanyak Musim Ini", - "$mainUrl/anime/movie?order_by=updated&page=" to "Film Layar Lebar", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - - val home = document.select("div.col-lg-4.col-md-6.col-sm-6").mapNotNull { - it.toSearchResult() - } - - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("/episode")) { - Regex("(.*)/episode/.+").find(uri)?.groupValues?.get(1).toString() + "/" - } else { - uri - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = getProperAnimeLink(fixUrl(this.selectFirst("a")!!.attr("href"))) - val title = this.selectFirst("h5 a")?.text() ?: return null - val posterUrl = fixUrl(this.select("div.product__item__pic.set-bg").attr("data-setbg")) - val episode = this.select("div.ep span").text().let { - Regex("Ep\\s(\\d+)\\s/").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(episode) - } - - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/anime?search=$query&order_by=latest" - val document = app.get(link).document - - return document.select("div#animeList div.product__item").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst(".anime__details__title > h3")!!.text().trim() - val poster = document.selectFirst(".anime__details__pic")?.attr("data-setbg") - val tags = document.select("div.anime__details__widget > div > div:nth-child(2) > ul > li:nth-child(1)") - .text().trim().replace("Genre: ", "").split(", ") - - val year = Regex("\\D").replace( - document.select("div.anime__details__widget > div > div:nth-child(1) > ul > li:nth-child(5)") - .text().trim().replace("Musim: ", ""), "" - ).toIntOrNull() - val status = getStatus( - document.select("div.anime__details__widget > div > div:nth-child(1) > ul > li:nth-child(3)") - .text().trim().replace("Status: ", "") - ) - val description = document.select(".anime__details__text > p").text().trim() - - val episodes = mutableListOf() - - for (i in 1..6) { - val doc = app.get("$url?page=$i").document - val eps = Jsoup.parse(doc.select("#episodeLists").attr("data-content")).select("a.btn.btn-sm.btn-danger") - .mapNotNull { - val name = it.text().trim() - val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0) - ?.toIntOrNull() - val link = it.attr("href") - Episode(link, episode = episode) - } - if(eps.isEmpty()) break else episodes.addAll(eps) - } - - val type = getType(document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()?.lowercase() ?: "tv", episodes.size) - val recommendations = document.select("div#randomList > a").mapNotNull { - val epHref = it.attr("href") - val epTitle = it.select("h5.sidebar-title-h5.px-2.py-2").text() - val epPoster = it.select(".product__sidebar__view__item.set-bg").attr("data-setbg") - newAnimeSearchResponse(epTitle, epHref, TvType.Anime) { - this.posterUrl = epPoster - addDubStatus(dubExist = false, subExist = true) - } - } - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - this.recommendations = recommendations - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - - } - - private suspend fun invokeLocalSource( - url: String, - server: String, - ref: String, - callback: (ExtractorLink) -> Unit - ) { - val document = app.get( - url, - referer = ref, - headers = headers, - cookies = cookies - ).document - document.select("video#player > source").map { - val link = fixUrl(it.attr("src")) - val quality = it.attr("size").toIntOrNull() - callback.invoke( - ExtractorLink( - fixTitle(server), - fixTitle(server), - link, - referer = "", - quality = quality ?: Qualities.Unknown.value, - headers = mapOf( - "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", - "Range" to "bytes=0-", - "Sec-Fetch-Dest" to "video", - "Sec-Fetch-Mode" to "no-cors", - ), - ) - ) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val req = app.get(data) - val res = req.document - - argamap( - { - val auth = getAuth(data) - headers = auth.authHeader?.associate { it.first to it.second }?.filter { it.key != "Cookie" }!! - cookies = req.cookies - res.select("select#changeServer option").apmap { source -> - val server = source.attr("value") - val query = auth.serverUrl?.queryParameterNames?.map { it } ?: return@apmap - val link = "$data?${query[0]}=${getMisc(auth.authUrl)}&${query[1]}=$server" - if (server.contains(Regex("(?i)kuramadrive|archive"))) { - invokeLocalSource(link, server, data, callback) - } else { - app.get( - link, - referer = data, - headers = headers, - cookies = cookies - ).document.select("div.iframe-container iframe").attr("src").let { videoUrl -> - loadExtractor(fixUrl(videoUrl), "$mainUrl/", subtitleCallback, callback) - } - } - } - }, - { - res.select("div#animeDownloadLink a").apmap { - loadExtractor(it.attr("href"), "$mainUrl/", subtitleCallback, callback) - } - } - ) - - return true - } - - private suspend fun fetchAuth(url: String) : AuthParams { - val regex = Regex("""$mainUrl/\S+""") - val found = WebViewResolver( - Regex("""$url(?!\?page=)\?"""), - additionalUrls = listOf(regex) - ).resolveUsingWebView( - requestCreator( - "GET", url - ) - ) - val addition = found.second.findLast { it.headers["X-Requested-With"] == "XMLHttpRequest" } - return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers) - } - - private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it } - - private suspend fun getMisc(url: String?): String { - val misc = app.get( - "$url", - headers = headers, - cookies = cookies - ) - cookies = misc.cookies - return misc.parsed() - } - - data class AuthParams ( - val serverUrl: HttpUrl?, - val authUrl: String?, - val authHeader: Headers?, - ) - -} \ No newline at end of file diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt deleted file mode 100644 index 77db0c6e..00000000 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt +++ /dev/null @@ -1,18 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class KuramanimeProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(KuramanimeProvider()) - registerExtractorAPI(Nyomo()) - registerExtractorAPI(Streamhide()) - registerExtractorAPI(Kuramadrive()) - registerExtractorAPI(Lbx()) - } -} \ No newline at end of file diff --git a/KuronimeProvider/build.gradle.kts b/KuronimeProvider/build.gradle.kts deleted file mode 100644 index d68a2267..00000000 --- a/KuronimeProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 20 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=45.12.2.2&sz=%size%" -} \ No newline at end of file diff --git a/KuronimeProvider/src/main/AndroidManifest.xml b/KuronimeProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/KuronimeProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/KuronimeProvider/src/main/kotlin/com/hexated/KuronimeProvider.kt b/KuronimeProvider/src/main/kotlin/com/hexated/KuronimeProvider.kt deleted file mode 100644 index 57eccd6e..00000000 --- a/KuronimeProvider/src/main/kotlin/com/hexated/KuronimeProvider.kt +++ /dev/null @@ -1,299 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.extractors.helper.AesHelper -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.getQualityFromName -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element -import java.net.URI -import java.util.ArrayList - -class KuronimeProvider : MainAPI() { - override var mainUrl = "https://tv1.kuronime.vip" - private var animekuUrl = "https://animeku.org" - override var name = "Kuronime" - override val hasQuickSearch = true - override val hasMainPage = true - override var lang = "id" - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - const val KEY = "3&!Z0M,VIZ;dZW==" - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special", true)) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/page/" to "New Episodes", - "$mainUrl/popular-anime/page/" to "Popular Anime", - "$mainUrl/movies/page/" to "Movies", -// "$mainUrl/genres/donghua/page/" to "Donghua", -// "$mainUrl/live-action/page/" to "Live Action", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val req = app.get(request.data + page) - mainUrl = getBaseUrl(req.url) - val document = req.document - val home = document.select("article").map { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("/anime/")) { - uri - } else { - var title = uri.substringAfter("$mainUrl/") - title = when { - (title.contains("-episode")) && !(title.contains("-movie")) -> Regex("nonton-(.+)-episode").find( - title - )?.groupValues?.get(1).toString() - - (title.contains("-movie")) -> Regex("nonton-(.+)-movie").find(title)?.groupValues?.get( - 1 - ).toString() - - else -> title - } - - "$mainUrl/anime/$title" - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse { - val href = getProperAnimeLink(fixUrlNull(this.selectFirst("a")?.attr("href")).toString()) - val title = this.select(".bsuxtt, .tt > h4").text().trim() - val posterUrl = fixUrlNull( - this.selectFirst("div.view,div.bt")?.nextElementSibling()?.select("img") - ?.attr("data-src") - ) - val epNum = this.select(".ep").text().replace(Regex("\\D"), "").trim().toIntOrNull() - val tvType = getType(this.selectFirst(".bt > span")?.text().toString()) - return newAnimeSearchResponse(title, href, tvType) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun quickSearch(query: String): List? = search(query) - - override suspend fun search(query: String): List? { - mainUrl = app.get(mainUrl).url - return app.post( - "$mainUrl/wp-admin/admin-ajax.php", data = mapOf( - "action" to "ajaxy_sf", - "sf_value" to query, - "search" to "false" - ), headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.anime?.firstOrNull()?.all?.mapNotNull { - newAnimeSearchResponse( - it.postTitle ?: "", - it.postLink ?: return@mapNotNull null, - TvType.Anime - ) { - this.posterUrl = it.postImage - addSub(it.postLatest?.toIntOrNull()) - } - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst(".entry-title")?.text().toString().trim() - val poster = document.selectFirst("div.l[itemprop=image] > img")?.attr("data-src") - val tags = document.select(".infodetail > ul > li:nth-child(2) > a").map { it.text() } - val type = - getType(document.selectFirst(".infodetail > ul > li:nth-child(7)")?.ownText()?.removePrefix(":") - ?.lowercase()?.trim() ?: "tv") - - val trailer = document.selectFirst("div.tply iframe")?.attr("data-src") - val year = Regex("\\d, (\\d*)").find( - document.select(".infodetail > ul > li:nth-child(5)").text() - )?.groupValues?.get(1)?.toIntOrNull() - val status = getStatus( - document.selectFirst(".infodetail > ul > li:nth-child(3)")!!.ownText() - .replace(Regex("\\W"), "") - ) - val description = document.select("span.const > p").text() - - val episodes = document.select("div.bixbox.bxcl > ul > li").mapNotNull { - val link = it.selectFirst("a")?.attr("href") ?: return@mapNotNull null - val name = it.selectFirst("a")?.text() ?: return@mapNotNull null - val episode = - Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull() - Episode(link, episode = episode) - }.reversed() - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - addTrailer(trailer) - this.tags = tags - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - val id = document.selectFirst("div#content script:containsData(is_singular)")?.data() - ?.substringAfter("\"")?.substringBefore("\";") - ?: throw ErrorLoadingException("No id found") - val servers = app.post( - "$animekuUrl/afi.php", data = mapOf( - "id" to id - ), referer = "$mainUrl/" - ).parsedSafe() - - argamap( - { - val decrypt = AesHelper.cryptoAESHandler( - base64Decode(servers?.src ?: return@argamap), - KEY.toByteArray(), - false, - "AES/CBC/NoPadding" - ) - val source = - tryParseJson(decrypt?.toJsonFormat())?.src?.replace("\\", "") - M3u8Helper.generateM3u8( - this.name, - source ?: return@argamap, - "$animekuUrl/", - headers = mapOf("Origin" to animekuUrl) - ).forEach(callback) - }, - { - val decrypt = AesHelper.cryptoAESHandler( - base64Decode(servers?.mirror ?: return@argamap), - KEY.toByteArray(), - false, - "AES/CBC/NoPadding" - ) - tryParseJson(decrypt)?.embed?.map { embed -> - embed.value.apmap { - loadFixedExtractor( - it.value, - embed.key.removePrefix("v"), - "$mainUrl/", - subtitleCallback, - callback - ) - } - } - - } - ) - - return true - } - - private fun String.toJsonFormat(): String { - return if (this.startsWith("\"")) this.substringAfter("\"").substringBeforeLast("\"") - .replace("\\\"", "\"") else this - } - - private suspend fun loadFixedExtractor( - url: String? = null, - quality: String? = null, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url ?: return, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - getQualityFromName(quality), - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - data class Mirrors( - @JsonProperty("embed") val embed: Map> = emptyMap(), - ) - - data class Sources( - @JsonProperty("src") var src: String? = null, - ) - - data class Servers( - @JsonProperty("src") var src: String? = null, - @JsonProperty("mirror") var mirror: String? = null, - ) - - data class All( - @JsonProperty("post_image") var postImage: String? = null, - @JsonProperty("post_image_html") var postImageHtml: String? = null, - @JsonProperty("ID") var ID: Int? = null, - @JsonProperty("post_title") var postTitle: String? = null, - @JsonProperty("post_genres") var postGenres: String? = null, - @JsonProperty("post_type") var postType: String? = null, - @JsonProperty("post_latest") var postLatest: String? = null, - @JsonProperty("post_sub") var postSub: String? = null, - @JsonProperty("post_link") var postLink: String? = null - ) - - data class Anime( - @JsonProperty("all") var all: ArrayList = arrayListOf(), - ) - - data class Search( - @JsonProperty("anime") var anime: ArrayList = arrayListOf() - ) - -} diff --git a/KuronimeProvider/src/main/kotlin/com/hexated/KuronimeProviderPlugin.kt b/KuronimeProvider/src/main/kotlin/com/hexated/KuronimeProviderPlugin.kt deleted file mode 100644 index acbc54ef..00000000 --- a/KuronimeProvider/src/main/kotlin/com/hexated/KuronimeProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class KuronimeProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(KuronimeProvider()) - } -} \ No newline at end of file diff --git a/LayarKacaProvider/build.gradle.kts b/LayarKacaProvider/build.gradle.kts deleted file mode 100644 index 85bf1cb9..00000000 --- a/LayarKacaProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 18 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=tv6.lk21official.wiki&sz=%size%" -} diff --git a/LayarKacaProvider/src/main/AndroidManifest.xml b/LayarKacaProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/LayarKacaProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt b/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt deleted file mode 100644 index 552e412e..00000000 --- a/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt +++ /dev/null @@ -1,202 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.extractors.Filesim -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element - -class LayarKacaProvider : MainAPI() { - override var mainUrl = "https://tv6.lk21official.wiki" - private var seriesUrl = "https://tv8.nontondrama.click" - override var name = "LayarKaca" - override val hasMainPage = true - override var lang = "id" - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.AsianDrama - ) - - override val mainPage = mainPageOf( - "$mainUrl/populer/page/" to "Film Terplopuler", - "$mainUrl/rating/page/" to "Film Berdasarkan IMDb Rating", - "$mainUrl/most-commented/page/" to "Film Dengan Komentar Terbanyak", - "$seriesUrl/latest/page/" to "Series Terbaru", - "$seriesUrl/series/asian/page/" to "Film Asian Terbaru", - "$mainUrl/latest/page/" to "Film Upload Terbaru", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("article.mega-item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private suspend fun getProperLink(url: String): String? { - if(url.startsWith(seriesUrl)) return url - val res = app.get(url).document - return if (res.select("title").text().contains("- Nontondrama", true)) { - res.selectFirst("div#content a")?.attr("href") - } else { - url - } - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("h1.grid-title > a")?.ownText()?.trim() ?: return null - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val type = - if (this.selectFirst("div.last-episode") == null) TvType.Movie else TvType.TvSeries - return if (type == TvType.TvSeries) { - val episode = this.selectFirst("div.last-episode span")?.text()?.filter { it.isDigit() } - ?.toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addSub(episode) - } - } else { - val quality = this.select("div.quality").text().trim() - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - addQuality(quality) - } - } - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search.php?s=$query").document - return document.select("div.search-item").mapNotNull { - val title = it.selectFirst("a")?.attr("title") ?: "" - val href = fixUrl(it.selectFirst("a")?.attr("href") ?: return@mapNotNull null) - val posterUrl = fixUrlNull(it.selectFirst("img.img-thumbnail")?.attr("src")) - newTvSeriesSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - } - } - } - - override suspend fun load(url: String): LoadResponse? { - val fixUrl = getProperLink(url) - val document = app.get(fixUrl ?: return null).document - - val title = document.selectFirst("li.last > span[itemprop=name]")?.text()?.trim().toString() - val poster = fixUrl(document.select("img.img-thumbnail").attr("src").toString()) - val tags = document.select("div.content > div:nth-child(5) > h3 > a").map { it.text() } - - val year = Regex("\\d, (\\d+)").find( - document.select("div.content > div:nth-child(7) > h3").text().trim() - )?.groupValues?.get(1).toString().toIntOrNull() - val tvType = if (document.select("div.serial-wrapper") - .isNotEmpty() - ) TvType.TvSeries else TvType.Movie - val description = document.select("div.content > blockquote").text().trim() - val trailer = document.selectFirst("div.action-player li > a.fancybox")?.attr("href") - val rating = - document.selectFirst("div.content > div:nth-child(6) > h3")?.text()?.toRatingInt() - val actors = - document.select("div.col-xs-9.content > div:nth-child(3) > h3 > a").map { it.text() } - - val recommendations = document.select("div.row.item-media").map { - val recName = it.selectFirst("h3")?.text()?.trim().toString() - val recHref = it.selectFirst(".content-media > a")!!.attr("href") - val recPosterUrl = - fixUrl(it.selectFirst(".poster-media > a > img")?.attr("src").toString()) - newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { - this.posterUrl = recPosterUrl - } - } - - return if (tvType == TvType.TvSeries) { - val episodes = document.select("div.episode-list > a:matches(\\d+)").map { - val href = fixUrl(it.attr("href")) - val episode = it.text().toIntOrNull() - val season = - it.attr("href").substringAfter("season-").substringBefore("-").toIntOrNull() - Episode( - href, - "Episode $episode", - season, - episode, - ) - }.reversed() - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - document.select("ul#loadProviders > li").map { - fixUrl(it.select("a").attr("href")) - }.apmap { - loadExtractor(it.getIframe(), "https://nganunganu.sbs", subtitleCallback, callback) - } - - return true - } - - private suspend fun String.getIframe() : String { - return app.get(this, referer = "$seriesUrl/").document.select("div.embed iframe").attr("src") - } - -} - -open class Emturbovid : ExtractorApi() { - override val name = "Emturbovid" - override val mainUrl = "https://emturbovid.com" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val response = app.get(url, referer = referer) - val m3u8 = Regex("[\"'](.*?master\\.m3u8.*?)[\"']").find(response.text)?.groupValues?.getOrNull(1) - M3u8Helper.generateM3u8( - name, - m3u8 ?: return, - mainUrl - ).forEach(callback) - } - -} - -class Furher : Filesim() { - override val name = "Furher" - override var mainUrl = "https://furher.in" -} diff --git a/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProviderPlugin.kt b/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProviderPlugin.kt deleted file mode 100644 index 9a73cdc1..00000000 --- a/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProviderPlugin.kt +++ /dev/null @@ -1,16 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class LayarKacaProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(LayarKacaProvider()) - registerExtractorAPI(Emturbovid()) - registerExtractorAPI(Furher()) - } -} \ No newline at end of file diff --git a/Loklok/build.gradle.kts b/Loklok/build.gradle.kts deleted file mode 100644 index 2d502600..00000000 --- a/Loklok/build.gradle.kts +++ /dev/null @@ -1,29 +0,0 @@ -// use an integer for version numbers -version = 26 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - description = "#2 best extension based on Loklok API" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 0 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "Anime", - "TvSeries", - "Movie", - ) - - - iconUrl = "https://www.google.com/s2/favicons?domain=loklok.com&sz=%size%" -} \ No newline at end of file diff --git a/Loklok/src/main/AndroidManifest.xml b/Loklok/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Loklok/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Loklok/src/main/kotlin/com/hexated/Loklok.kt b/Loklok/src/main/kotlin/com/hexated/Loklok.kt deleted file mode 100644 index 5e8c8ca5..00000000 --- a/Loklok/src/main/kotlin/com/hexated/Loklok.kt +++ /dev/null @@ -1,428 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.nicehttp.RequestBodyTypes -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.RequestBody.Companion.toRequestBody - -class Loklok : MainAPI() { - override var name = "Loklok" - override val hasMainPage = true - override val hasChromecastSupport = true - override val instantLinkLoading = true - override val hasQuickSearch = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.Anime, - TvType.AsianDrama, - ) - companion object { - private const val geoblockError = "Loklok is Geoblock, use vpn or give up" - private val api = base64DecodeAPI("dg==LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=") - private val apiUrl = "$api/${base64Decode("Y21zL2FwcA==")}" - private val pcApiUrl = base64DecodeAPI("cGM=Yi8=d2U=cy8=Y20=di8=LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=") - private val searchApi = base64Decode("aHR0cHM6Ly9sb2tsb2suY29t") - private const val mainImageUrl = "https://images.weserv.nl" - private val headers = mutableMapOf( - "lang" to "en", - "versioncode" to "999999999", - "clienttype" to "ios17", - "deviceid" to getDeviceId(), - ) - - private fun base64DecodeAPI(api: String): String { - return api.chunked(4).map { base64Decode(it) }.reversed().joinToString("") - } - - } - - private fun encode(input: String): String = - java.net.URLEncoder.encode(input, "utf-8").replace("+", "%20") - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val home = ArrayList() - for (i in 0..6) { - app.get("$apiUrl/homePage/getHome?page=$i", headers = headers) - .parsedSafe()?.data?.recommendItems.orEmpty().ifEmpty { throw ErrorLoadingException(geoblockError) } - .filterNot { it.homeSectionType == "BLOCK_GROUP" } - .filterNot { it.homeSectionType == "BANNER" } - .mapNotNull { res -> - val header = res.homeSectionName ?: return@mapNotNull null - val media = res.media?.mapNotNull { media -> media.toSearchResponse() } - .orEmpty().ifEmpty { throw ErrorLoadingException(geoblockError) } - home.add(HomePageList(header, media)) - } - } - return HomePageResponse(home) - } - - private fun Media.toSearchResponse(): SearchResponse? { - - return newMovieSearchResponse( - title ?: name ?: return null, - UrlData(id, category ?: domainType).toJson(), - TvType.Movie, - ) { - this.posterUrl = (imageUrl ?: coverVerticalUrl)?.let { - "$mainImageUrl/?url=${encode(it)}&w=175&h=246&fit=cover&output=webp" - } - } - } - - override suspend fun quickSearch(query: String): List? { - val body = mapOf( - "searchKeyWord" to query, - "size" to "50", - "sort" to "", - "searchType" to "", - ).toJson().toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) - - return app.post( - "$apiUrl/search/v1/searchWithKeyWord", - requestBody = body, - headers = headers - ).parsedSafe()?.data?.searchResults?.mapNotNull { media -> - media.toSearchResponse() - } - } - - override suspend fun search(query: String): List? = quickSearch(query) - -// override suspend fun search(query: String): List { -// val res = app.get( -// "$searchApi/search?keyword=$query", -// ).document -// -// val script = res.select("script").find { it.data().contains("function(a,b,c,d,e") }?.data() -// ?.substringAfter("searchResults:[")?.substringBefore("]}],fetch") -// -// return res.select("div.search-list div.search-video-card").mapIndexed { num, block -> -// val name = block.selectFirst("h2.title")?.text() -// val data = block.selectFirst("a")?.attr("href")?.split("/") -// val id = data?.last() -// val type = data?.get(2)?.toInt() -// val image = Regex("coverVerticalUrl:\"(.*?)\",").findAll(script.toString()) -// .map { it.groupValues[1] }.toList().getOrNull(num)?.replace("\\u002F", "/") -// -// -// newMovieSearchResponse( -// "$name", -// UrlData(id, type).toJson(), -// TvType.Movie, -// ) { -// this.posterUrl = image -// } -// -// } -// -// } - - override suspend fun load(url: String): LoadResponse? { - val data = parseJson(url) - val res = app.get( - "$apiUrl/movieDrama/get?id=${data.id}&category=${data.category}", - headers = headers - ).parsedSafe()?.data ?: throw ErrorLoadingException(geoblockError) - - val actors = res.starList?.mapNotNull { - Actor( - it.localName ?: return@mapNotNull null, it.image - ) - } - - val episodes = res.episodeVo?.map { eps -> - val definition = eps.definitionList?.map { - Definition( - it.code, - it.description, - ) - } - val subtitling = eps.subtitlingList?.map { - Subtitling( - it.languageAbbr, - it.language, - it.subtitlingUrl - ) - } - Episode( - data = UrlEpisode( - data.id.toString(), - data.category, - eps.id, - definition, - subtitling - ).toJson(), - episode = eps.seriesNo - ) - } ?: throw ErrorLoadingException("No Episode Found") - val recommendations = res.likeList?.mapNotNull { rec -> - rec.toSearchResponse() - } - - val type = when { - res.areaList?.firstOrNull()?.id == 44 && res.tagNameList?.contains("Anime") == true -> { - TvType.Anime - } - data.category == 0 -> { - TvType.Movie - } - else -> { - TvType.TvSeries - } - } - - val animeType = if(type == TvType.Anime && data.category == 0) "movie" else "tv" - val (malId, anilistId) = if (type == TvType.Anime) getTracker( - res.name, - animeType, - res.year - ) else Tracker() - - return newTvSeriesLoadResponse( - res.name ?: return null, - url, - if(data.category == 0) TvType.Movie else type, - episodes - ) { - this.posterUrl = res.coverVerticalUrl - this.backgroundPosterUrl = res.coverHorizontalUrl - this.year = res.year - this.plot = res.introduction - this.tags = res.tagNameList - this.rating = res.score.toRatingInt() - addActors(actors) - addMalId(malId) - addAniListId(anilistId?.toIntOrNull()) - this.recommendations = recommendations - } - - } - - private fun getLanguage(str: String): String { - return when (str) { - "in_ID" -> "Indonesian" - "pt" -> "Portuguese" - else -> str.split("_").first().let { - SubtitleHelper.fromTwoLettersToLanguage(it).toString() - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val res = parseJson(data) - - res.definitionList?.apmap { video -> - val body = - """[{"category":${res.category},"contentId":"${res.id}","episodeId":${res.epId},"definition":"${video.code}"}]""".toRequestBody( - RequestBodyTypes.JSON.toMediaTypeOrNull() - ) - val json = app.get( - "$apiUrl/media/previewInfo?category=${res.category}&contentId=${res.id}&episodeId=${res.epId}&definition=${video.code}", - headers = headers, - ).parsedSafe()?.data - callback.invoke( - ExtractorLink( - this.name, - this.name, - json?.mediaUrl ?: return@apmap null, - "", - getQuality(json.currentDefinition ?: ""), - isM3u8 = true, - ) - ) - } - - res.subtitlingList?.map { sub -> - subtitleCallback.invoke( - SubtitleFile( - getLanguage(sub.languageAbbr ?: return@map), - sub.subtitlingUrl ?: return@map - ) - ) - } - - return true - } - - private fun getQuality(quality: String): Int { - return when (quality) { - "GROOT_FD" -> Qualities.P360.value - "GROOT_LD" -> Qualities.P480.value - "GROOT_SD" -> Qualities.P720.value - "GROOT_HD" -> Qualities.P1080.value - else -> Qualities.Unknown.value - } - } - - private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker { - val res = app.get("https://api.consumet.org/meta/anilist/$title") - .parsedSafe()?.results?.find { media -> - (media.title?.english.equals(title, true) || media.title?.romaji.equals( - title, - true - )) || (media.type.equals(type, true) && media.releaseDate == year) - } - return Tracker(res?.malId, res?.aniId, res?.image, res?.cover) - } - - data class Tracker( - val malId: Int? = null, - val aniId: String? = null, - val image: String? = null, - val cover: String? = null, - ) - - data class UrlData( - val id: Any? = null, - val category: Int? = null, - ) - - data class Subtitling( - val languageAbbr: String? = null, - val language: String? = null, - val subtitlingUrl: String? = null, - ) - - data class Definition( - val code: String? = null, - val description: String? = null, - ) - - data class UrlEpisode( - val id: String? = null, - val category: Int? = null, - val epId: Int? = null, - val definitionList: List? = arrayListOf(), - val subtitlingList: List? = arrayListOf(), - ) - - data class Title( - @JsonProperty("romaji") val romaji: String? = null, - @JsonProperty("english") val english: String? = null, - ) - - data class Results( - @JsonProperty("id") val aniId: String? = null, - @JsonProperty("malId") val malId: Int? = null, - @JsonProperty("title") val title: Title? = null, - @JsonProperty("releaseDate") val releaseDate: Int? = null, - @JsonProperty("type") val type: String? = null, - @JsonProperty("image") val image: String? = null, - @JsonProperty("cover") val cover: String? = null, - ) - - data class AniSearch( - @JsonProperty("results") val results: java.util.ArrayList? = arrayListOf(), - ) - - data class QuickSearchData( - @JsonProperty("searchResults") val searchResults: ArrayList? = arrayListOf(), - ) - - data class QuickSearchRes( - @JsonProperty("data") val data: QuickSearchData? = null, - ) - - data class PreviewResponse( - @JsonProperty("data") val data: PreviewVideos? = null, - ) - - data class PreviewVideos( - @JsonProperty("mediaUrl") val mediaUrl: String? = null, - @JsonProperty("currentDefinition") val currentDefinition: String? = null, - ) - - data class SubtitlingList( - @JsonProperty("languageAbbr") val languageAbbr: String? = null, - @JsonProperty("language") val language: String? = null, - @JsonProperty("subtitlingUrl") val subtitlingUrl: String? = null, - ) - - data class DefinitionList( - @JsonProperty("code") val code: String? = null, - @JsonProperty("description") val description: String? = null, - ) - - data class EpisodeVo( - @JsonProperty("id") val id: Int? = null, - @JsonProperty("seriesNo") val seriesNo: Int? = null, - @JsonProperty("definitionList") val definitionList: ArrayList? = arrayListOf(), - @JsonProperty("subtitlingList") val subtitlingList: ArrayList? = arrayListOf(), - ) - - data class Region( - @JsonProperty("id") val id: Int? = null, - @JsonProperty("name") val name: String? = null, - ) - - data class StarList( - @JsonProperty("image") val image: String? = null, - @JsonProperty("localName") val localName: String? = null, - ) - - data class MediaDetail( - @JsonProperty("name") val name: String? = null, - @JsonProperty("introduction") val introduction: String? = null, - @JsonProperty("year") val year: Int? = null, - @JsonProperty("category") val category: String? = null, - @JsonProperty("coverVerticalUrl") val coverVerticalUrl: String? = null, - @JsonProperty("coverHorizontalUrl") val coverHorizontalUrl: String? = null, - @JsonProperty("score") val score: String? = null, - @JsonProperty("starList") val starList: ArrayList? = arrayListOf(), - @JsonProperty("areaList") val areaList: ArrayList? = arrayListOf(), - @JsonProperty("episodeVo") val episodeVo: ArrayList? = arrayListOf(), - @JsonProperty("likeList") val likeList: ArrayList? = arrayListOf(), - @JsonProperty("tagNameList") val tagNameList: ArrayList? = arrayListOf(), - ) - - data class Load( - @JsonProperty("data") val data: MediaDetail? = null, - ) - - data class Media( - @JsonProperty("id") val id: Any? = null, - @JsonProperty("category") val category: Int? = null, - @JsonProperty("domainType") val domainType: Int? = null, - @JsonProperty("imageUrl") val imageUrl: String? = null, - @JsonProperty("coverVerticalUrl") val coverVerticalUrl: String? = null, - @JsonProperty("title") val title: String? = null, - @JsonProperty("name") val name: String? = null, - @JsonProperty("jumpAddress") val jumpAddress: String? = null, - ) - - data class RecommendItems( - @JsonProperty("homeSectionName") val homeSectionName: String? = null, - @JsonProperty("homeSectionType") val homeSectionType: String? = null, - @JsonProperty("recommendContentVOList") val media: ArrayList? = arrayListOf(), - ) - - data class Data( - @JsonProperty("recommendItems") val recommendItems: ArrayList? = arrayListOf(), - ) - - data class Home( - @JsonProperty("data") val data: Data? = null, - ) - -} - -fun getDeviceId(length: Int = 16): String { - val allowedChars = ('a'..'f') + ('0'..'9') - return (1..length) - .map { allowedChars.random() } - .joinToString("") -} - diff --git a/Loklok/src/main/kotlin/com/hexated/LoklokPlugin.kt b/Loklok/src/main/kotlin/com/hexated/LoklokPlugin.kt deleted file mode 100644 index 1d8e807a..00000000 --- a/Loklok/src/main/kotlin/com/hexated/LoklokPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class LoklokPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Loklok()) - } -} \ No newline at end of file diff --git a/Minioppai/build.gradle.kts b/Minioppai/build.gradle.kts deleted file mode 100644 index 87203b16..00000000 --- a/Minioppai/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 9 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Sora") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "NSFW", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=minioppai.org&sz=%size%" -} \ No newline at end of file diff --git a/Minioppai/src/main/AndroidManifest.xml b/Minioppai/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Minioppai/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Minioppai/src/main/kotlin/com/hexated/Extractors.kt b/Minioppai/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index 3e172453..00000000 --- a/Minioppai/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,77 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.fixTitle -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.fixUrl -import com.lagradost.cloudstream3.utils.getAndUnpack -import com.lagradost.cloudstream3.utils.getQualityFromName - -class Paistream : Streampai() { - override val name = "Paistream" - override val mainUrl = "https://paistream.my.id" -} - -class TvMinioppai : Streampai() { - override val name = "Minioppai" - override val mainUrl = "https://tv.minioppai.org" -} - -open class Streampai : ExtractorApi() { - override val name = "Streampai" - override val mainUrl = "https://streampai.my.id" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val res = app.get(url, referer = referer).text - val data = getAndUnpack(res) - - val sources = data.substringAfter("sources:[").substringBefore("]").replace("\'", "\"") - val tracks = data.substringAfter("\"tracks\":[").substringBefore("]") - - tryParseJson>("[$sources]")?.forEach { - callback.invoke( - ExtractorLink( - this.name, - this.name, - fixUrl(it.file), - url, - getQualityFromName(it.label), - headers = mapOf( - "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", - "Accept-Language" to "en-US,en;q=0.5", - "DNT" to "1", - "Range" to "bytes=0-", - "Sec-Fetch-Dest" to "video", - "Sec-Fetch-Mode" to "no-cors", - ) - ) - ) - } - - tryParseJson>("[$tracks]")?.forEach { - subtitleCallback.invoke( - SubtitleFile( - fixTitle(it.label ?: ""), - fixUrl(it.file), - ) - ) - } - } - - data class Responses( - @JsonProperty("file") val file: String, - @JsonProperty("type") val type: String?, - @JsonProperty("label") val label: String? - ) - -} \ No newline at end of file diff --git a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt deleted file mode 100644 index b7a2a906..00000000 --- a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt +++ /dev/null @@ -1,161 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.* -import org.jsoup.Jsoup -import org.jsoup.nodes.Element -import java.net.URLDecoder - -class Minioppai : MainAPI() { - override var mainUrl = "https://minioppai.org" - override var name = "Minioppai" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - override val hasQuickSearch = true - override val supportedTypes = setOf( - TvType.NSFW, - ) - - companion object { - fun getStatus(t: String?): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/watch" to "New Episode", - "$mainUrl/populars" to "Popular Hentai", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("${request.data}/page/$page").document - val home = document.select("div.latest a").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = request.name == "New Episode" - ), - hasNext = true - ) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("-episode-")) { - uri.substringBefore("-episode-") - } else { - uri - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("h2.entry-title")?.text()?.trim() ?: return null - val href = getProperAnimeLink(this.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val epNum = this.selectFirst("i.dot")?.text()?.filter { it.isDigit() }?.toIntOrNull() - return newAnimeSearchResponse(title, href, TvType.NSFW) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun quickSearch(query: String): List? = search(query) - - override suspend fun search(query: String): List? { - return app.post( - "$mainUrl/wp-admin/admin-ajax.php", data = mapOf( - "action" to "ts_ac_do_search", - "ts_ac_query" to query, - ), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), - ).parsedSafe()?.post?.firstOrNull()?.all?.mapNotNull { item -> - newAnimeSearchResponse( - item.postTitle ?: "", - item.postLink ?: return@mapNotNull null, - TvType.NSFW - ) { - this.posterUrl = item.postImage - } - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.entry-title")?.text()?.trim() ?: return null - val poster = fixUrlNull(document.selectFirst("div.limage img")?.attr("src")) - val table = document.select("ul.data") - val tags = table.select("ul.data li:nth-child(1) a").map { it.text() } - val year = - document.selectFirst("ul.data time[itemprop=dateCreated]")?.text()?.substringBefore("-") - ?.toIntOrNull() - val status = getStatus(document.selectFirst("ul.data li:nth-child(2) span")?.text()?.trim()) - val description = document.select("div[itemprop=description] > p").text() - - val episodes = document.select("div.epsdlist ul li").mapNotNull { - val name = it.selectFirst("div.epl-num")?.text() - val link = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null - Episode(link, name = name) - } - - return newAnimeLoadResponse(title, url, TvType.NSFW) { - engName = title - posterUrl = poster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - document.select("div.server ul.mirror li a").mapNotNull { - Jsoup.parse(base64Decode(it.attr("data-em"))).select("iframe").attr("src") - }.apmap { link -> - loadExtractor( - fixUrl(decode(link.substringAfter("data="))), - mainUrl, - subtitleCallback, - callback - ) - } - - return true - } - - private fun decode(input: String): String = URLDecoder.decode(input, "utf-8") - - data class SearchResponses( - @JsonProperty("post") var post: ArrayList = arrayListOf() - ) - - data class All( - @JsonProperty("ID") var ID: Int? = null, - @JsonProperty("post_image") var postImage: String? = null, - @JsonProperty("post_title") var postTitle: String? = null, - @JsonProperty("post_link") var postLink: String? = null, - ) - - data class Post( - @JsonProperty("all") var all: ArrayList = arrayListOf(), - ) - -} \ No newline at end of file diff --git a/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt b/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt deleted file mode 100644 index 5832d055..00000000 --- a/Minioppai/src/main/kotlin/com/hexated/MinioppaiPlugin.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class MinioppaiPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Minioppai()) - registerExtractorAPI(Streampai()) - registerExtractorAPI(Paistream()) - registerExtractorAPI(TvMinioppai()) - } -} \ No newline at end of file diff --git a/Moviehab/build.gradle.kts b/Moviehab/build.gradle.kts deleted file mode 100644 index 29b7c042..00000000 --- a/Moviehab/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -// use an integer for version numbers -version = 3 - - -cloudstream { - language = "tl" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=moviehab.com&sz=%size%" -} diff --git a/Moviehab/src/main/AndroidManifest.xml b/Moviehab/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Moviehab/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt b/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt deleted file mode 100644 index 21f27395..00000000 --- a/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt +++ /dev/null @@ -1,202 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element - -class Moviehab : MainAPI() { - override var mainUrl = "https://nowshowing.to" - override var name = "Moviehab" - override val hasMainPage = true - override var lang = "tl" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - ) - - companion object { - private const val mainServer = "https://nowshowing.to" - } - - override val mainPage = mainPageOf( - "$mainUrl/category/movies/" to "New Movies", - "$mainUrl/category/tv-series/" to "New TV Shows", - "$mainUrl/category/coming-soon/" to "Coming Soon", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div.row div.col-6.col-md-4.col-lg-3").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("p.title")?.text() ?: return null - val href = this.selectFirst("div.btn-list a")!!.attr("href") - val posterUrl = fixUrlNull( - this.select("div.poster-img").attr("data-bg-multi").substringAfter("url(") - .substringBefore(")") - ) - val quality = getQualityFromString(this.select("span.badge.bg-dark-dm").text()) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - this.quality = quality - } - } - - override suspend fun search(query: String): List { - val document = app.get( - "$mainUrl/search?term=$query", - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).document - return document.select("div.col-6.col-md-4.col-lg-3").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.content-title")?.text() ?: return null - val poster = fixUrlNull(document.selectFirst("img.img-fluid.w-full")?.attr("src")) - val tags = document.select("div.content div:nth-child(2) a").map { it.text() } - - val year = document.select("div.content div:nth-child(3) a").text().trim().toIntOrNull() - val tvType = if (document.select("div.card.seasons-list") - .isNullOrEmpty() - ) TvType.Movie else TvType.TvSeries - val description = document.select("div.card:contains(Storyline) p").text().trim() - val trailer = document.selectFirst("div#trailer-modal iframe")?.attr("data-src") - val rating = document.select("div.content div:nth-child(1) span").text().toRatingInt() - - return if (tvType == TvType.TvSeries) { - val episodes = - document.select("div.card.seasons-list select.episodes-select option").map { ele -> - val id = ele.attr("data-id") - val name = ele.text() - val episode = ele.attr("value").toIntOrNull() - val season = ele.parent()?.attr("id")?.filter { it.isDigit() }?.toIntOrNull() - Episode( - Episodes("$episode", "$season", id).toJson(), - name, - season, - episode, - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addTrailer(trailer) - } - } else { - val link = - document.select("div#direct-links-content input#link-1").attr("value").split("/") - .last() - newMovieLoadResponse(title, url, TvType.Movie, Episodes(id = link).toJson()) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addTrailer(trailer) - } - } - } - - private suspend fun invokeLokalSource( - url: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val res = app.get(url) - res.document.select("video#player source").attr("src").let { - val link = app.get("$mainServer/$it", referer = url).url - M3u8Helper.generateM3u8( - this.name, - link, - url - ).forEach(callback) - } - - Regex("src[\"|'],\\s[\"|'](\\S+)[\"|']\\)").find(res.text)?.groupValues?.get(1).let {sub -> - subtitleCallback.invoke( - SubtitleFile( - "English", - "$mainServer/$sub" - ) - ) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val res = parseJson(data) - val url = if (res.season.isNullOrBlank()) { - "$mainUrl/embed/movie?id=${res.id}" - } else { - "$mainUrl/embed/series?id=${res.id}&sea=${res.season}&epi=${res.episode}" - } - - app.get(url).document.select("div.dropdown-menu a.server").apmap { iframe -> - safeApiCall { - app.get( - "$mainUrl/ajax/get_stream_link?id=${iframe.attr("data-id")}&movie=${res.id}&is_init=false&captcha=&ref=", - referer = url, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.data?.link?.let { link -> - if (link.startsWith(mainServer)) { - invokeLokalSource(link, subtitleCallback, callback) - } else { - loadExtractor( - link, - "$mainUrl/", - subtitleCallback, - callback - ) - } - } - } - } - - return true - } - - private data class Source( - @JsonProperty("link") val link: String? = null, - @JsonProperty("_played") val _played: String? = null, - @JsonProperty("token") val token: String? = null, - ) - - private data class Data( - @JsonProperty("data") val data: Source? = null, - ) - - data class Episodes( - val episode: String? = null, - val season: String? = null, - val id: String? = null, - ) - -} diff --git a/Moviehab/src/main/kotlin/com/hexated/MoviehabPlugin.kt b/Moviehab/src/main/kotlin/com/hexated/MoviehabPlugin.kt deleted file mode 100644 index 35ca2e25..00000000 --- a/Moviehab/src/main/kotlin/com/hexated/MoviehabPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class MoviehabPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Moviehab()) - } -} \ No newline at end of file diff --git a/Movierulzhd/build.gradle.kts b/Movierulzhd/build.gradle.kts deleted file mode 100644 index 08c2a426..00000000 --- a/Movierulzhd/build.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -// use an integer for version numbers -version = 55 - - -cloudstream { - language = "hi" - // All of these properties are optional, you can safely remove them - - description = "Includes: Hdmovie2, Animesaga" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=movierulzhd.best&sz=%size%" -} diff --git a/Movierulzhd/src/main/AndroidManifest.xml b/Movierulzhd/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Movierulzhd/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt deleted file mode 100644 index 524ac176..00000000 --- a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.TvType -import com.lagradost.cloudstream3.mainPageOf - -class Animesaga : Movierulzhd() { - - override var mainUrl = "https://www.animesaga.in" - override var name = "Animesaga" - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - override val mainPage = mainPageOf( - "movies" to "Movies", - "tvshows" to "TV-Shows", - "genre/hindi-dub" to "Hindi Dub", - ) - - -} \ No newline at end of file diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt b/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index c3a84b83..00000000 --- a/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,72 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.extractors.Chillx -import com.lagradost.cloudstream3.utils.* - -class Sbnmp : ExtractorApi() { - override val name = "Sbnmp" - override var mainUrl = "https://sbnmp.bar" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val response = app.get(url, referer = referer) - val script = if (!getPacked(response.text).isNullOrEmpty()) { - getAndUnpack(response.text) - } else { - response.document.selectFirst("script:containsData(sources:)")?.data() - } - val m3u8 = - Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1) - - callback.invoke( - ExtractorLink( - this.name, - this.name, - m3u8 ?: return, - mainUrl, - Qualities.Unknown.value, - INFER_TYPE, - ) - ) - } -} - -open class Akamaicdn : ExtractorApi() { - override val name = "Akamaicdn" - override val mainUrl = "https://akamaicdn.life" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val res = app.get(url, referer = referer).document - val mappers = res.selectFirst("script:containsData(sniff\\()")?.data()?.substringAfter("sniff(") - ?.substringBefore(");") ?: return - val ids = mappers.split(",").map { it.replace("\"", "") } - callback.invoke( - ExtractorLink( - this.name, - this.name, - "$mainUrl/m3u8/${ids[1]}/${ids[2]}/master.txt?s=1&cache=1", - url, - Qualities.Unknown.value, - isM3u8 = true, - ) - ) - } -} - -class AnimesagaStream : Chillx() { - override val name = "AnimesagaStream" - override val mainUrl = "https://stream.animesaga.in" -} diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt deleted file mode 100644 index 4e0f12b7..00000000 --- a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt +++ /dev/null @@ -1,85 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.apmap -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.mainPageOf -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup - -class Hdmovie2 : Movierulzhd() { - - override var mainUrl = "https://hdmovie2.li" - override var name = "Hdmovie2" - override val mainPage = mainPageOf( - "trending" to "Trending", - "movies" to "Movies", - "genre/tv-series" to "TV-Series", - "genre/netflix" to "Netflix", - "genre/zee5-tv-series" to "Zee5 TV Series", - ) - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - if (data.startsWith("{")) { - val loadData = tryParseJson(data) - val source = app.post( - url = "$directUrl/wp-admin/admin-ajax.php", data = mapOf( - "action" to "doo_player_ajax", "post" to "${loadData?.post}", "nume" to "${loadData?.nume}", "type" to "${loadData?.type}" - ), referer = data, headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest" - )).parsed().embed_url.getIframe() - if (!source.contains("youtube")) loadExtractor( - source, - "$directUrl/", - subtitleCallback, - callback - ) - } else { - val document = app.get(data).document - val id = document.select("meta#dooplay-ajax-counter").attr("data-postid") - val type = if (data.contains("/movies/")) "movie" else "tv" - - document.select("ul#playeroptionsul > li").map { - it.attr("data-nume") - }.apmap { nume -> - val source = app.post( - url = "$directUrl/wp-admin/admin-ajax.php", data = mapOf( - "action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type - ), referer = data, headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest") - ).parsed().embed_url.getIframe() - when { - !source.contains("youtube") -> loadExtractor( - source, - "$directUrl/", - subtitleCallback, - callback - ) - else -> return@apmap - } - } - } - return true - } - - private fun String.getIframe(): String { - return Jsoup.parse(this).select("iframe").attr("src") - } - - data class LinkData( - val type: String? = null, - val post: String? = null, - val nume: String? = null, - ) - - data class ResponseHash( - @JsonProperty("embed_url") val embed_url: String, - @JsonProperty("type") val type: String?, - ) -} diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt deleted file mode 100644 index 77260037..00000000 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ /dev/null @@ -1,300 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.toJson -import org.jsoup.nodes.Element -import java.net.URI - -open class Movierulzhd : MainAPI() { - - override var mainUrl = "https://movierulzhd.bet" - var directUrl = "" - override var name = "Movierulzhd" - override val hasMainPage = true - override var lang = "hi" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - ) - - override val mainPage = mainPageOf( - "trending" to "Trending", - "movies" to "Movies", - "tvshows" to "TV Shows", - "genre/netflix" to "Netflix", - "genre/amazon-prime" to "Amazon Prime", - "genre/Zee5" to "Zee5", - "seasons" to "Season", - "episodes" to "Episode", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("$mainUrl/${request.data}/page/$page").document - val home = - document.select("div.items.normal article, div#archive-content article, div.items.full article").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperLink(uri: String): String { - return when { - uri.contains("/episodes/") -> { - var title = uri.substringAfter("$mainUrl/episodes/") - title = Regex("(.+?)-season").find(title)?.groupValues?.get(1).toString() - "$mainUrl/tvshows/$title" - } - - uri.contains("/seasons/") -> { - var title = uri.substringAfter("$mainUrl/seasons/") - title = Regex("(.+?)-season").find(title)?.groupValues?.get(1).toString() - "$mainUrl/tvshows/$title" - } - - else -> { - uri - } - } - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("h3 > a")?.text() ?: return null - val href = getProperLink(fixUrl(this.selectFirst("h3 > a")!!.attr("href"))) - val posterUrl = fixUrlNull(this.select("div.poster img").last()?.getImageAttr()) - val quality = getQualityFromString(this.select("span.quality").text()) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - this.quality = quality - } - - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search/$query").document - return document.select("div.result-item").map { - val title = - it.selectFirst("div.title > a")!!.text().replace(Regex("\\(\\d{4}\\)"), "").trim() - val href = getProperLink(it.selectFirst("div.title > a")!!.attr("href")) - val posterUrl = it.selectFirst("img")!!.attr("src").toString() - newMovieSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - } - } - } - - override suspend fun load(url: String): LoadResponse { - val request = app.get(url) - val document = request.document - directUrl = getBaseUrl(request.url) - val title = - document.selectFirst("div.data > h1")?.text()?.trim().toString() - val poster = fixUrlNull(document.selectFirst("div.poster img:last-child")?.getImageAttr()) - val tags = document.select("div.sgeneros > a").map { it.text() } - - val year = Regex(",\\s?(\\d+)").find( - document.select("span.date").text().trim() - )?.groupValues?.get(1).toString().toIntOrNull() - val tvType = if (document.select("ul#section > li:nth-child(1)").text() - .contains("Episodes") || document.select("ul#playeroptionsul li span.title") - .text().contains( - Regex("Episode\\s+\\d+|EP\\d+|PE\\d+") - ) - ) TvType.TvSeries else TvType.Movie - val description = document.select("div.wp-content > p").text().trim() - val trailer = document.selectFirst("div.embed iframe")?.attr("src") - val rating = - document.selectFirst("span.dt_rating_vgs")?.text()?.toRatingInt() - val actors = document.select("div.persons > div[itemprop=actor]").map { - Actor( - it.select("meta[itemprop=name]").attr("content"), - it.select("img:last-child").attr("src") - ) - } - - val recommendations = document.select("div.owl-item").map { - val recName = - it.selectFirst("a")!!.attr("href").toString().removeSuffix("/").split("/").last() - val recHref = it.selectFirst("a")!!.attr("href") - val recPosterUrl = it.selectFirst("img")?.getImageAttr() - newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { - this.posterUrl = recPosterUrl - } - } - - return if (tvType == TvType.TvSeries) { - val episodes = if (document.select("ul.episodios > li").isNotEmpty()) { - document.select("ul.episodios > li").map { - val href = it.select("a").attr("href") - val name = fixTitle(it.select("div.episodiotitle > a").text().trim()) - val image = it.selectFirst("div.imagen > img")?.getImageAttr() - val episode = - it.select("div.numerando").text().replace(" ", "").split("-").last() - .toIntOrNull() - val season = - it.select("div.numerando").text().replace(" ", "").split("-").first() - .toIntOrNull() - Episode( - href, - name, - season, - episode, - image - ) - } - } else { - document.select("ul#playeroptionsul > li").map { - val name = it.selectFirst("span.title")?.text() - val type = it.attr("data-type") - val post = it.attr("data-post") - val nume = it.attr("data-nume") - Episode( - LinkData(name, type, post, nume).toJson(), - name, - ) - } - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, url) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - if (data.startsWith("{")) { - val loadData = AppUtils.tryParseJson(data) - val source = app.post( - url = "$directUrl/wp-admin/admin-ajax.php", - data = mapOf( - "action" to "doo_player_ajax", - "post" to "${loadData?.post}", - "nume" to "${loadData?.nume}", - "type" to "${loadData?.type}" - ), - referer = data, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsed().embed_url - if (!source.contains("youtube")) loadCustomExtractor(source, "$directUrl/", subtitleCallback, callback) - } else { - val document = app.get(data).document - - document.select("ul#playeroptionsul > li").map { - Triple( - it.attr("data-post"), - it.attr("data-nume"), - it.attr("data-type") - ) - }.apmap { (id, nume, type) -> - val source = app.post( - url = "$directUrl/wp-admin/admin-ajax.php", - data = mapOf( - "action" to "doo_player_ajax", - "post" to id, - "nume" to nume, - "type" to type - ), - referer = data, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsed().embed_url - - when { - !source.contains("youtube") -> loadCustomExtractor( - source, - "$directUrl/", - subtitleCallback, - callback - ) - else -> return@apmap - } - } - } - return true - } - - private fun Element.getImageAttr(): String? { - return when { - this.hasAttr("data-src") -> this.attr("abs:data-src") - this.hasAttr("data-lazy-src") -> this.attr("abs:data-lazy-src") - this.hasAttr("srcset") -> this.attr("abs:srcset").substringBefore(" ") - else -> this.attr("abs:src") - } - } - - private suspend fun loadCustomExtractor( - url: String, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - quality: Int? = null, - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - if(link.quality == Qualities.Unknown.value) { - callback.invoke( - ExtractorLink( - link.source, - link.name, - link.url, - link.referer, - when (link.type) { - ExtractorLinkType.M3U8 -> link.quality - else -> quality ?: link.quality - }, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - } - - data class LinkData( - val tag: String? = null, - val type: String? = null, - val post: String? = null, - val nume: String? = null, - ) - - data class ResponseHash( - @JsonProperty("embed_url") val embed_url: String, - @JsonProperty("type") val type: String?, - ) - -} diff --git a/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt b/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt deleted file mode 100644 index 680b49a0..00000000 --- a/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt +++ /dev/null @@ -1,19 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class MovierulzhdPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Movierulzhd()) - registerMainAPI(Hdmovie2()) - registerMainAPI(Animesaga()) - registerExtractorAPI(Sbnmp()) - registerExtractorAPI(Akamaicdn()) - registerExtractorAPI(AnimesagaStream()) - } -} \ No newline at end of file diff --git a/Nekopoi/build.gradle.kts b/Nekopoi/build.gradle.kts deleted file mode 100644 index 809c2b60..00000000 --- a/Nekopoi/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 6 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Sora") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "NSFW", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=nekopoi.care&sz=%size%" -} \ No newline at end of file diff --git a/Nekopoi/src/main/AndroidManifest.xml b/Nekopoi/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Nekopoi/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Nekopoi/src/main/kotlin/com/hexated/Extractors.kt b/Nekopoi/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index 47e90c61..00000000 --- a/Nekopoi/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities - -open class ZippyShare : ExtractorApi() { - override val name = "ZippyShare" - override val mainUrl = "https://zippysha.re" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val res = app.get(url, referer = referer).document - val video = res.selectFirst("a#download-url")?.attr("href") - callback.invoke( - ExtractorLink( - this.name, - this.name, - video ?: return, - "$mainUrl/", - Qualities.Unknown.value - ) - ) - } -} \ No newline at end of file diff --git a/Nekopoi/src/main/kotlin/com/hexated/Nekopoi.kt b/Nekopoi/src/main/kotlin/com/hexated/Nekopoi.kt deleted file mode 100644 index 124595b6..00000000 --- a/Nekopoi/src/main/kotlin/com/hexated/Nekopoi.kt +++ /dev/null @@ -1,292 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.* -import com.lagradost.nicehttp.NiceResponse -import com.lagradost.nicehttp.Requests -import com.lagradost.nicehttp.Session -import kotlinx.coroutines.delay -import org.jsoup.nodes.Element -import java.net.URI - -class Nekopoi : MainAPI() { - override var mainUrl = "https://nekopoi.care" - override var name = "Nekopoi" - override val hasMainPage = true - override var lang = "id" - private val fetch by lazy { Session(app.baseClient) } - override val supportedTypes = setOf( - TvType.NSFW, - ) - - companion object { - val session = Session(Requests().baseClient) - val mirrorBlackList = arrayOf( - "MegaupNet", - "DropApk", - "Racaty", - "ZippyShare", - "VideobinCo", - "DropApk", - "SendCm", - "GoogleDrive", - ) - const val mirroredHost = "https://www.mirrored.to" - - fun getStatus(t: String?): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - - } - - override val mainPage = mainPageOf( - "$mainUrl/category/hentai/" to "Hentai", - "$mainUrl/category/jav/" to "Jav", - "$mainUrl/category/3d-hentai/" to "3D Hentai", - "$mainUrl/category/jav-cosplay/" to "Jav Cosplay", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = fetch.get("${request.data}/page/$page").document - val home = document.select("div.result ul li").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = true - ), - hasNext = true - ) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("-episode-")) { - val title = uri.substringAfter("$mainUrl/").substringBefore("-episode-") - .removePrefix("new-release-").removePrefix("uncensored-") - "$mainUrl/hentai/$title" - } else { - uri - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("h2 a")?.text()?.trim() ?: return null - val href = getProperAnimeLink(this.selectFirst("a")?.attr("href") ?: return null) - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - val epNum = this.selectFirst("i.dot")?.text()?.filter { it.isDigit() }?.toIntOrNull() - return newAnimeSearchResponse(title, href, TvType.NSFW) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - return fetch.get("$mainUrl/search/$query").document.select("div.result ul li") - .mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = fetch.get(url).document - - val title = document.selectFirst("span.desc b, div.eroinfo h1")?.text()?.trim() ?: "" - val poster = fixUrlNull(document.selectFirst("div.imgdesc img, div.thm img")?.attr("src")) - val table = document.select("div.listinfo ul, div.konten") - val tags = - table.select("li:contains(Genres) a").map { it.text() }.takeIf { it.isNotEmpty() } - ?: table.select("p:contains(Genre)").text().substringAfter(":").split(",") - .map { it.trim() } - val year = - document.selectFirst("li:contains(Tayang)")?.text()?.substringAfterLast(",") - ?.filter { it.isDigit() }?.toIntOrNull() - val status = getStatus( - document.selectFirst("li:contains(Status)")?.text()?.substringAfter(":")?.trim() - ) - val duration = document.selectFirst("li:contains(Durasi)")?.text()?.substringAfterLast(":") - ?.filter { it.isDigit() }?.toIntOrNull() - val description = document.selectFirst("span.desc p")?.text() - - val episodes = document.select("div.episodelist ul li").mapNotNull { - val name = it.selectFirst("a")?.text() - val link = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null - Episode(link, name = name) - }.takeIf { it.isNotEmpty() } ?: listOf(Episode(url, title)) - - return newAnimeLoadResponse(title, url, TvType.NSFW) { - engName = title - posterUrl = poster - this.year = year - this.duration = duration - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val res = fetch.get(data).document - - argamap( - { - res.select("div#show-stream iframe").apmap { iframe -> - loadExtractor(iframe.attr("src"), "$mainUrl/", subtitleCallback, callback) - } - }, - { - res.select("div.boxdownload div.liner").map { ele -> - getIndexQuality( - ele.select("div.name").text() - ) to ele.selectFirst("a:contains(ouo)") - ?.attr("href") - }.filter { it.first != Qualities.P360.value }.map { - val bypassedAds = bypassMirrored(bypassOuo(it.second)) - bypassedAds.apmap ads@{ adsLink -> - loadExtractor( - fixEmbed(adsLink) ?: return@ads, - "$mainUrl/", - subtitleCallback, - ) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - if (link.type == ExtractorLinkType.M3U8) link.quality else it.first, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - } - } - ) - - return true - } - - private fun fixEmbed(url: String?): String? { - if (url == null) return null - val host = getBaseUrl(url) - return when { - url.contains("streamsb", true) -> url.replace("$host/", "$host/e/") - else -> url - } - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - private suspend fun bypassOuo(url: String?): String? { - var res = session.get(url ?: return null) - run lit@{ - (1..2).forEach { _ -> - if (res.headers["location"] != null) return@lit - val document = res.document - val nextUrl = document.select("form").attr("action") - val data = document.select("form input").mapNotNull { - it.attr("name") to it.attr("value") - }.toMap().toMutableMap() - val captchaKey = - document.select("script[src*=https://www.google.com/recaptcha/api.js?render=]") - .attr("src").substringAfter("render=") - val token = APIHolder.getCaptchaToken(url, captchaKey) - data["x-token"] = token ?: "" - res = session.post( - nextUrl, - data = data, - headers = mapOf("content-type" to "application/x-www-form-urlencoded"), - allowRedirects = false - ) - } - } - - return res.headers["location"] - } - - private fun NiceResponse.selectMirror(): String? { - return this.document.selectFirst("script:containsData(#passcheck)")?.data() - ?.substringAfter("\"GET\", \"")?.substringBefore("\"") - } - - private suspend fun bypassMirrored(url: String?): List { - val request = session.get(url ?: return emptyList()) - delay(2000) - val mirrorUrl = request.selectMirror() ?: run { - val nextUrl = request.document.select("div.col-sm.centered.extra-top a").attr("href") - app.get(nextUrl).selectMirror() - } - return session.get( - fixUrl( - mirrorUrl ?: return emptyList(), - mirroredHost - ) - ).document.select("table.hoverable tbody tr") - .filter { mirror -> - !mirrorIsBlackList(mirror.selectFirst("img")?.attr("alt")) - }.apmap { - val fileLink = it.selectFirst("a")?.attr("href") - session.get( - fixUrl( - fileLink ?: return@apmap null, - mirroredHost - ) - ).document.selectFirst("div.code_wrap code")?.text() - } - } - - private fun mirrorIsBlackList(host: String?): Boolean { - return mirrorBlackList.any { it.equals(host, true) } - } - - private fun fixUrl(url: String, domain: String): String { - if (url.startsWith("http")) { - return url - } - if (url.isEmpty()) { - return "" - } - - val startsWithNoHttp = url.startsWith("//") - if (startsWithNoHttp) { - return "https:$url" - } else { - if (url.startsWith('/')) { - return domain + url - } - return "$domain/$url" - } - } - - private fun getIndexQuality(str: String?): Int { - return when (val quality = - Regex("""(?i)\[(\d+[pk])]""").find(str ?: "")?.groupValues?.getOrNull(1)?.lowercase()) { - "2k" -> Qualities.P1440.value - else -> getQualityFromName(quality) - } - } - -} \ No newline at end of file diff --git a/Nekopoi/src/main/kotlin/com/hexated/NekopoiPlugin.kt b/Nekopoi/src/main/kotlin/com/hexated/NekopoiPlugin.kt deleted file mode 100644 index 62dea5a4..00000000 --- a/Nekopoi/src/main/kotlin/com/hexated/NekopoiPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class NekopoiPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Nekopoi()) - registerExtractorAPI(ZippyShare()) - } -} \ No newline at end of file diff --git a/NeonimeProvider/build.gradle.kts b/NeonimeProvider/build.gradle.kts deleted file mode 100644 index bfa7a96c..00000000 --- a/NeonimeProvider/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -// use an integer for version numbers -version = 8 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "Movie", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=neonime.watch&sz=%size%" -} \ No newline at end of file diff --git a/NeonimeProvider/src/main/AndroidManifest.xml b/NeonimeProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/NeonimeProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/NeonimeProvider/src/main/kotlin/com/hexated/NeonimeProvider.kt b/NeonimeProvider/src/main/kotlin/com/hexated/NeonimeProvider.kt deleted file mode 100644 index f6e2d83c..00000000 --- a/NeonimeProvider/src/main/kotlin/com/hexated/NeonimeProvider.kt +++ /dev/null @@ -1,195 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element -import java.net.URI - -class NeonimeProvider : MainAPI() { - override var mainUrl = "https://neonime.ink" - private var baseUrl = mainUrl - override var name = "Neonime" - override val hasQuickSearch = false - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special", true)) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Ended" -> ShowStatus.Completed - "OnGoing" -> ShowStatus.Ongoing - "Ongoing" -> ShowStatus.Ongoing - "In Production" -> ShowStatus.Ongoing - "Returning Series" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/episode/page/" to "Episode Terbaru", - "$mainUrl/tvshows/page/" to "Anime Terbaru", - "$mainUrl/movies/page/" to "Movie", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val req = app.get(request.data + page) - baseUrl = getBaseUrl(req.url) - val home = req.document.select("tbody tr,div.item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return when { - uri.contains("/episode") -> { - val title = uri.substringAfter("$baseUrl/episode/").let { tt -> - val fixTitle = Regex("(.*)-\\d{1,2}x\\d+").find(tt)?.groupValues?.getOrNull(1).toString() - when { - !tt.contains("-season") && !tt.contains(Regex("-1x\\d+")) && !tt.contains("one-piece") -> "$fixTitle-season-${Regex("-(\\d{1,2})x\\d+").find(tt)?.groupValues?.getOrNull(1).toString()}" - tt.contains("-special") -> fixTitle.replace(Regex("-x\\d+"), "") - !fixTitle.contains("-subtitle-indonesia") -> "$fixTitle-subtitle-indonesia" - else -> fixTitle - } - } - -// title = when { -// title.contains("youkoso-jitsuryoku") && !title.contains("-season") -> title.replace("-e-", "-e-tv-") -// else -> title -// } - - "$baseUrl/tvshows/$title" - } - else -> uri - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("td.bb a")?.ownText() ?: this.selectFirst("h2")?.text() ?: return null - val href = getProperAnimeLink(fixUrl(this.select("a").attr("href"))) - val posterUrl = fixUrl(this.select("img").attr("data-src")) - val epNum = this.selectFirst("td.bb span")?.text()?.let { eps -> - Regex("Episode\\s?(\\d+)").find(eps)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - val document = app.get("$baseUrl/?s=$query").document - return document.select("div.item.episode-home").mapNotNull { - val title = it.selectFirst("div.judul-anime > span")!!.text() - val poster = it.select("img").attr("data-src").toString().trim() - val episodes = it.selectFirst("div.fixyear > h2.text-center")!! - .text().replace(Regex("\\D"), "").trim().toIntOrNull() - val tvType = getType(it.selectFirst("span.calidad2.episode")?.text().toString()) - val href = getProperAnimeLink(fixUrl(it.selectFirst("a")!!.attr("href"))) - - newAnimeSearchResponse(title, href, tvType) { - this.posterUrl = poster - addSub(episodes) - } - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - if (url.contains("movie") || url.contains("live-action")) { - val mTitle = document.selectFirst(".sbox > .data > h1[itemprop = name]")?.text().toString().replace("Subtitle Indonesia", "").trim() - val mPoster = document.selectFirst(".sbox > .imagen > .fix > img[itemprop = image]")?.attr("data-src") - val mTrailer = document.selectFirst("div.youtube_id iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"} - val year = document.selectFirst("a[href*=release-year]")!!.text().toIntOrNull() - val tracker = APIHolder.getTracker(listOf(mTitle),TrackerType.getTypes(TvType.Movie),year,true) - return newMovieLoadResponse(name = mTitle, url = url, type = TvType.Movie, dataUrl = url) { - posterUrl = tracker?.image ?: mPoster - backgroundPosterUrl = tracker?.cover - this.year = year - plot = document.select("div[itemprop = description]").text().trim() - rating = document.select("span[itemprop = ratingValue]").text().toIntOrNull() - tags = document.select("p.meta_dd > a").map { it.text() } - addTrailer(mTrailer) - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - else { - val title = document.select("h1[itemprop = name]").text().replace("Subtitle Indonesia", "").trim() - val poster = document.selectFirst(".imagen > img")?.attr("data-src") - val trailer = document.selectFirst("div.youtube_id_tv iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"} - val year = document.select("#info a[href*=\"-year/\"]").text().toIntOrNull() - val episodes = document.select("ul.episodios > li").mapNotNull { - val link = fixUrl(it.selectFirst(".episodiotitle > a")!!.attr("href")) - val name = it.selectFirst(".episodiotitle > a")?.ownText().toString() - val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull() - Episode(link, episode = episode) - }.reversed() - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(TvType.Anime),year,true) - return newAnimeLoadResponse(title, url, TvType.Anime) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = getStatus(document.select("div.metadatac > span").last()!!.text().trim()) - plot = document.select("div[itemprop = description] > p").text().trim() - tags = document.select("#info a[href*=\"-genre/\"]").map { it.text() } - addTrailer(trailer) - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val source = if(data.contains("movie") || data.contains("live-action")) { - app.get(data).document.select("#player2-1 > div[id*=div]").mapNotNull { - fixUrl(it.select("iframe").attr("data-src")) - } - } else { - app.get(data).document.select(".player2 > .embed2 > div[id*=player]").mapNotNull { - fixUrl(it.select("iframe").attr("data-src")) - } - } - - source.apmap { - loadExtractor(it, data, subtitleCallback, callback) - } - - return true - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - -} \ No newline at end of file diff --git a/NeonimeProvider/src/main/kotlin/com/hexated/NeonimeProviderPlugin.kt b/NeonimeProvider/src/main/kotlin/com/hexated/NeonimeProviderPlugin.kt deleted file mode 100644 index 9a6be431..00000000 --- a/NeonimeProvider/src/main/kotlin/com/hexated/NeonimeProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class NeonimeProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(NeonimeProvider()) - } -} \ No newline at end of file diff --git a/Nimegami/build.gradle.kts b/Nimegami/build.gradle.kts deleted file mode 100644 index 153e146c..00000000 --- a/Nimegami/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 7 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=nimegami.id&sz=%size%" -} \ No newline at end of file diff --git a/Nimegami/src/main/AndroidManifest.xml b/Nimegami/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Nimegami/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Nimegami/src/main/kotlin/com/hexated/Extractors.kt b/Nimegami/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index 62a47223..00000000 --- a/Nimegami/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.INFER_TYPE -import com.lagradost.cloudstream3.utils.Qualities - -open class Mitedrive : ExtractorApi() { - override val name = "Mitedrive" - override val mainUrl = "https://mitedrive.com" - override val requiresReferer = false - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val id = url.substringAfterLast("/") - val video = app.post( - "https://api.mitedrive.com/api/view/$id", - referer = "$mainUrl/", - data = mapOf( - "csrf_token" to "ZXlKcGNDSTZJak0yTGpneExqWTFMakUyTWlJc0ltUmxkbWxqWlNJNklrMXZlbWxzYkdFdk5TNHdJQ2hYYVc1a2IzZHpJRTVVSURFd0xqQTdJRmRwYmpZME95QjROalE3SUhKMk9qRXdNUzR3S1NCSFpXTnJieTh5TURFd01ERXdNU0JHYVhKbFptOTRMekV3TVM0d0lpd2lZbkp2ZDNObGNpSTZJazF2ZW1sc2JHRWlMQ0pqYjI5cmFXVWlPaUlpTENKeVpXWmxjbkpsY2lJNklpSjk=", - "slug" to id - ) - ).parsedSafe()?.data?.url - - callback.invoke( - ExtractorLink( - this.name, - this.name, - video ?: return, - "$mainUrl/", - Qualities.Unknown.value, - INFER_TYPE, - ) - ) - - } - - data class Data( - @JsonProperty("original_url") val url: String? = null, - ) - - data class Responses( - @JsonProperty("data") val data: Data? = null, - ) - -} \ No newline at end of file diff --git a/Nimegami/src/main/kotlin/com/hexated/Nimegami.kt b/Nimegami/src/main/kotlin/com/hexated/Nimegami.kt deleted file mode 100644 index ed1353f7..00000000 --- a/Nimegami/src/main/kotlin/com/hexated/Nimegami.kt +++ /dev/null @@ -1,219 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import org.jsoup.nodes.Element -import org.jsoup.select.Elements -import java.net.URI - -class Nimegami : MainAPI() { - override var mainUrl = "https://nimegami.id" - override var name = "Nimegami" - override val hasMainPage = true - override var lang = "id" - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String): TvType { - return when { - t.contains("Tv", true) -> TvType.Anime - t.contains("Movie", true) -> TvType.AnimeMovie - t.contains("OVA", true) || t.contains("Special", true) -> TvType.OVA - else -> TvType.Anime - } - } - - fun getStatus(t: String?): ShowStatus { - return when { - t?.contains("On-Going", true) == true -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "" to "Updated Anime", - "/type/tv" to "Anime", - "/type/movie" to "Movie", - "/type/ona" to "ONA", - "/type/live-action" to "Live Action", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("$mainUrl${request.data}/page/$page").document - val home = document.select("div.post-article article, div.archive article").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = request.name != "Updated Anime" - ), - hasNext = true - ) - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val title = this.selectFirst("h2 a")?.text() ?: return null - val posterUrl = (this.selectFirst("noscript img") ?: this.selectFirst("img"))?.attr("src") - val episode = this.selectFirst("ul li:contains(Episode), div.eps-archive")?.ownText() - ?.filter { it.isDigit() }?.toIntOrNull() - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(episode) - } - - } - - override suspend fun search(query: String): List { - return app.get("$mainUrl/?s=$query&post_type=post").document.select("div.archive article") - .mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val table = document.select("div#Info table tbody") - val title = table.getContent("Judul :").text() - val poster = document.selectFirst("div.coverthumbnail img")?.attr("src") - val bgPoster = document.selectFirst("div.thumbnail-a img")?.attr("src") - val tags = table.getContent("Kategori").select("a").map { it.text() } - - val year = table.getContent("Musim / Rilis").text().filter { it.isDigit() }.toIntOrNull() - val status = getStatus(document.selectFirst("h1[itemprop=headline]")?.text()) - val type = getType(table.getContent("Type").text()) - val description = document.select("div#Sinopsis p").text().trim() - val trailer = document.selectFirst("div#Trailer iframe")?.attr("src") - - val episodes = document.select("div.list_eps_stream li") - .mapNotNull { - val episode = Regex("Episode\\s?(\\d+)").find(it.text())?.groupValues?.getOrNull(0) - ?.toIntOrNull() - val link = it.attr("data") - Episode(link, episode = episode) - } - - val recommendations = document.select("div#randomList > a").mapNotNull { - val epHref = it.attr("href") - val epTitle = it.select("h5.sidebar-title-h5.px-2.py-2").text() - val epPoster = it.select(".product__sidebar__view__item.set-bg").attr("data-setbg") - - newAnimeSearchResponse(epTitle, epHref, TvType.Anime) { - this.posterUrl = epPoster - addDubStatus(dubExist = false, subExist = true) - } - } - - val tracker = APIHolder.getTracker(listOf(title), TrackerType.getTypes(type), year, true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover ?: bgPoster - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - this.recommendations = recommendations - addTrailer(trailer) - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - tryParseJson>(base64Decode(data))?.map { sources -> - sources.url?.apmap { url -> - loadFixedExtractor( - url.fixIframe(), - sources.format, - "$mainUrl/", - subtitleCallback, - callback - ) - } - } - - return true - } - - private suspend fun loadFixedExtractor( - url: String, - quality: String?, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - getQualityFromName(quality), - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - private fun Elements.getContent(css: String): Elements { - return this.select("tr:contains($css) td:last-child") - } - - private fun String.fixIframe(): String { - val url = base64Decode(this.substringAfter("url=").substringAfter("id=")) - return when { - url.contains("hxfile") -> { - val host = getBaseUrl(url) - val id = url.substringAfterLast("/") - "$host/embed-$id.html" - } - url.startsWith("https://mitedrive.my.id") -> url.replace( - "https://mitedrive.my.id", - "https://mitedrive.com" - ) - else -> fixUrl(url) - } - } - - data class Sources( - @JsonProperty("format") val format: String? = null, - @JsonProperty("url") val url: ArrayList? = arrayListOf(), - ) - -} diff --git a/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt b/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt deleted file mode 100644 index 8ab01378..00000000 --- a/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt +++ /dev/null @@ -1,15 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class NimegamiPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Nimegami()) - registerExtractorAPI(Mitedrive()) - } -} \ No newline at end of file diff --git a/NontonAnimeIDProvider/build.gradle.kts b/NontonAnimeIDProvider/build.gradle.kts deleted file mode 100644 index 10f41f92..00000000 --- a/NontonAnimeIDProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 19 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=nontonanimeid.site&sz=%size%" -} \ No newline at end of file diff --git a/NontonAnimeIDProvider/src/main/AndroidManifest.xml b/NontonAnimeIDProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/NontonAnimeIDProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt b/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt deleted file mode 100644 index 1735efe3..00000000 --- a/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt +++ /dev/null @@ -1,243 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.extractors.Hxfile -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup -import org.jsoup.nodes.Element -import java.net.URI - -class NontonAnimeIDProvider : MainAPI() { - override var mainUrl = "https://nontonanimeid.top" - override var name = "NontonAnimeID" - override val hasQuickSearch = false - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - fun getType(t: String): TvType { - return when { - t.contains("TV",true) -> TvType.Anime - t.contains("Movie",true) -> TvType.AnimeMovie - else -> TvType.OVA - } - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Finished Airing" -> ShowStatus.Completed - "Currently Airing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "" to "Latest Update", - "ongoing-list/" to " Ongoing List", - "popular-series/" to "Popular Series", - ) - - override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse { - val document = app.get("$mainUrl/${request.data}").document - val home = document.select(".animeseries").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home, hasNext = false) - } - - private fun Element.toSearchResult(): AnimeSearchResponse { - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val title = this.selectFirst(".title")?.text() ?: "" - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) - - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addDubStatus(dubExist = false, subExist = true) - } - - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query" - val document = app.get(link).document - - return document.select(".result > ul > li").mapNotNull { - val title = it.selectFirst("h2")!!.text().trim() - val poster = it.selectFirst("img")!!.attr("src") - val tvType = getType( - it.selectFirst(".boxinfores > span.typeseries")!!.text().toString() - ) - val href = fixUrl(it.selectFirst("a")!!.attr("href")) - - newAnimeSearchResponse(title, href, tvType) { - this.posterUrl = poster - addDubStatus(dubExist = false, subExist = true) - } - } - } - - override suspend fun load(url: String): LoadResponse? { - val fixUrl = if (url.contains("/anime/")) { - url - } else { - app.get(url).document.selectFirst("div.nvs.nvsc a")?.attr("href") - } - - val req = app.get(fixUrl ?: return null) - mainUrl = getBaseUrl(req.url) - val document = req.document - - val title = document.selectFirst("h1.entry-title.cs")!!.text().removeSurrounding("Nonton Anime", "Sub Indo").trim() - val poster = document.selectFirst(".poster > img")?.attr("data-src") - val tags = document.select(".tagline > a").map { it.text() } - - val year = Regex("\\d, (\\d*)").find( - document.select(".bottomtitle > span:nth-child(5)").text() - )?.groupValues?.get(1)?.toIntOrNull() - val status = getStatus( - document.select("span.statusseries").text().trim() - ) - val type = getType(document.select("span.typeseries").text().trim().lowercase()) - val rating = document.select("span.nilaiseries").text().trim().toIntOrNull() - val description = document.select(".entry-content.seriesdesc > p").text().trim() - val trailer = document.selectFirst("a.trailerbutton")?.attr("href") - - val episodes = if (document.select("button.buttfilter").isNotEmpty()) { - val id = document.select("input[name=series_id]").attr("value") - val numEp = - document.selectFirst(".latestepisode > a")?.text()?.replace(Regex("\\D"), "") - .toString() - Jsoup.parse( - app.post( - url = "$mainUrl/wp-admin/admin-ajax.php", - data = mapOf( - "misha_number_of_results" to numEp, - "misha_order_by" to "date-DESC", - "action" to "mishafilter", - "series_id" to id - ) - ).parsed().content - ).select("li").map { - val episode = Regex("Episode\\s?(\\d+)").find( - it.selectFirst("a")?.text().toString() - )?.groupValues?.getOrNull(0) ?: it.selectFirst("a")?.text() - val link = fixUrl(it.selectFirst("a")!!.attr("href")) - Episode(link, episode = episode?.toIntOrNull()) - }.reversed() - } else { - document.select("ul.misha_posts_wrap2 > li").map { - val episode = Regex("Episode\\s?(\\d+)").find( - it.selectFirst("a")?.text().toString() - )?.groupValues?.getOrNull(0) ?: it.selectFirst("a")?.text() - val link = it.select("a").attr("href") - Episode(link, episode = episode?.toIntOrNull()) - }.reversed() - } - - val recommendations = document.select(".result > li").mapNotNull { - val epHref = it.selectFirst("a")!!.attr("href") - val epTitle = it.selectFirst("h3")!!.text() - val epPoster = it.select(".top > img").attr("data-src") - newAnimeSearchResponse(epTitle, epHref, TvType.Anime) { - this.posterUrl = epPoster - addDubStatus(dubExist = false, subExist = true) - } - } - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - this.rating = rating - plot = description - addTrailer(trailer) - this.tags = tags - this.recommendations = recommendations - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - - document.select(".container1 > ul > li:not(.boxtab)").apmap { - val dataPost = it.attr("data-post") - val dataNume = it.attr("data-nume") - val dataType = it.attr("data-type") - - val iframe = app.post( - url = "$mainUrl/wp-admin/admin-ajax.php", - data = mapOf( - "action" to "player_ajax", - "post" to dataPost, - "nume" to dataNume, - "type" to dataType, - "nonce" to "e4dd8e45c2" - ), - referer = data, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).document.selectFirst("iframe")?.attr("src") - - loadExtractor(iframe ?: return@apmap , "$mainUrl/", subtitleCallback, callback) - } - - return true - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - private data class EpResponse( - @JsonProperty("posts") val posts: String?, - @JsonProperty("max_page") val max_page: Int?, - @JsonProperty("found_posts") val found_posts: Int?, - @JsonProperty("content") val content: String - ) - -} - -class KotakAnimeid2 : Hxfile() { - override val name = "KotakAnimeid2" - override val mainUrl = "https://embed2.kotakanimeid.com" - override val requiresReferer = true -} - -class KotakAnimeidCom : Hxfile() { - override val name = "KotakAnimeid" - override val mainUrl = "https://nontonanimeid.com" - override val requiresReferer = true -} - -class EmbedKotakAnimeid : Hxfile() { - override val name = "EmbedKotakAnimeid" - override val mainUrl = "https://embed2.kotakanimeid.com" - override val requiresReferer = true -} diff --git a/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProviderPlugin.kt b/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProviderPlugin.kt deleted file mode 100644 index 763e337e..00000000 --- a/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProviderPlugin.kt +++ /dev/null @@ -1,17 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class NontonAnimeIDProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(NontonAnimeIDProvider()) - registerExtractorAPI(KotakAnimeid2()) - registerExtractorAPI(KotakAnimeidCom()) - registerExtractorAPI(EmbedKotakAnimeid()) - } -} \ No newline at end of file diff --git a/OnetwothreeTv/build.gradle.kts b/OnetwothreeTv/build.gradle.kts deleted file mode 100644 index a000e631..00000000 --- a/OnetwothreeTv/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 3 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "Live", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=123tv.live&sz=%size%" -} diff --git a/OnetwothreeTv/src/main/AndroidManifest.xml b/OnetwothreeTv/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/OnetwothreeTv/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/OnetwothreeTv/src/main/kotlin/com/hexated/OnetwothreeTv.kt b/OnetwothreeTv/src/main/kotlin/com/hexated/OnetwothreeTv.kt deleted file mode 100644 index bcd7bc9d..00000000 --- a/OnetwothreeTv/src/main/kotlin/com/hexated/OnetwothreeTv.kt +++ /dev/null @@ -1,195 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.Qualities -import org.jsoup.nodes.Element -import javax.crypto.Cipher -import javax.crypto.SecretKeyFactory -import javax.crypto.spec.IvParameterSpec -import javax.crypto.spec.PBEKeySpec -import javax.crypto.spec.SecretKeySpec - -class OnetwothreeTv : MainAPI() { - override var mainUrl = "http://123tv.live" - override var name = "123tv" - override val hasDownloadSupport = false - override val hasMainPage = true - override val supportedTypes = setOf( - TvType.Live - ) - - override val mainPage = mainPageOf( - "1" to "United States (USA)", - "$mainUrl/top-streams/" to "Top Streams", - "$mainUrl/latest-streams/" to "Latest Streams", - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val items = mutableListOf() - val nonPaged = - (request.name == "Top Streams" || request.name == "Latest Streams") && page <= 1 - if (nonPaged) { - val res = app.get(request.data).document - val home = res.select("div.col-md-3.col-sm-6").mapNotNull { - it.toSearchResult() - } - items.add(HomePageList(request.name, home, true)) - } - - if (request.name == "United States (USA)") { - val res = app.post( - "$mainUrl/wp-admin/admin-ajax.php", data = mapOf( - "action" to "_123tv_load_more_videos_from_category", - "cat_id" to request.data, - "page_num" to "${page.minus(1)}" - ), headers = mapOf( - "X-Requested-With" to "XMLHttpRequest" - ) - ).document - val home = res.select("div.col-md-3.col-sm-6").mapNotNull { - it.toSearchResult() - } - items.add(HomePageList(request.name, home, true)) - } - - return newHomePageResponse(items) - - } - - private fun Element.toSearchResult(): LiveSearchResponse? { - return LiveSearchResponse( - this.selectFirst("div.video-title h4")?.text() ?: return null, - fixUrl(this.selectFirst("a")!!.attr("href")), - this@OnetwothreeTv.name, - TvType.Live, - fixUrlNull(this.selectFirst("img")?.attr("src")), - ) - - } - - override suspend fun search(query: String): List { - return app.get( - "$mainUrl/?s=$query" - ).document.select("div.videos-latest-list.row div.col-md-3.col-sm-6").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - return LiveStreamLoadResponse( - document.selectFirst("div.video-big-title h1")?.text() ?: return null, - url, - this.name, - document.selectFirst("div.embed-responsive iframe")?.attr("src") ?: url, - fixUrlNull(document.selectFirst("meta[name=\"twitter:image\"]")?.attr("content")), - plot = document.select("div.watch-video-description p").text() ?: return null - ) - } - - private fun String.decodeHex(): ByteArray { - check(length % 2 == 0) { "Must have an even length" } - return chunked(2) - .map { it.toInt(16).toByte() } - .toByteArray() - } - - private fun cryptojsAESHandler( - data: AesData, - pass: String, - encrypt: Boolean = true - ): String { - val factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512") - val spec = PBEKeySpec(pass.toCharArray(), data.s.decodeHex(), 999, 256) - val key = factory.generateSecret(spec) - val cipher = Cipher.getInstance("AES/CBC/NoPadding") - return if (!encrypt) { - cipher.init( - Cipher.DECRYPT_MODE, - SecretKeySpec(key.encoded, "AES"), - IvParameterSpec(data.iv.decodeHex()) - ) - String(cipher.doFinal(base64DecodeArray(data.ct))) - } else { - cipher.init( - Cipher.ENCRYPT_MODE, - SecretKeySpec(key.encoded, "AES"), - IvParameterSpec(data.iv.decodeHex()) - ) - base64Encode(cipher.doFinal(data.ct.toByteArray())) - - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - if (data.contains(".m3u8")) { - app.get( - data, - referer = "$mainUrl/" - ).document.select("script").find { it.data().contains("var player=") }?.data() - ?.substringAfter("source:'")?.substringBefore("',")?.let { link -> - callback.invoke( - ExtractorLink( - source = name, - name = name, - url = link, - referer = "http://azureedge.xyz/", - quality = Qualities.Unknown.value, - isM3u8 = true, - headers = mapOf("Origin" to "http://azureedge.xyz") - ) - ) - } - } else { - val script = - app.get(data).document.select("script").find { it.data().contains("var post_id") } - ?.data() ?: throw ErrorLoadingException("No data found") - val encodeData = - Regex("\\w{6,10}=\\[(\\S+)];return").find(script)?.groupValues?.getOrNull(1) - ?.split(",")?.joinToString("") { it.replace("'", "") } - .let { base64Decode("$it") } - val aesData = tryParseJson(encodeData) - ?: throw ErrorLoadingException("Invalid json responses") - val pass = Regex("\\[((\\d{2,3},?\\s?){4})];").findAll(script).map { it.groupValues[1] } - .toList().flatMap { it.split(",") }.map { it.toInt().toChar() }.reversed() - .joinToString("") - val decryptData = cryptojsAESHandler(aesData, pass, false) - val jsonData = Regex("[\"|'](\\?1&json=\\S+)[\"|'];").find(script)?.groupValues?.get(1) - val m3uLink = "${decryptData.substringBefore(".m3u8")}.m3u8$jsonData" - app.get(m3uLink, referer = data).let { - tryParseJson>(it.text)?.map { res -> - M3u8Helper.generateM3u8( - this.name, - res.file, - "$mainUrl/", - headers = mapOf("Origin" to mainUrl) - ).forEach(callback) - } - } - - } - - return true - - } - - data class Source( - @JsonProperty("file") val file: String, - ) - - data class AesData( - @JsonProperty("ciphertext") val ct: String, - @JsonProperty("salt") val s: String, - @JsonProperty("iv") val iv: String, - @JsonProperty("iterations") val iterations: Int? = null, - ) -} \ No newline at end of file diff --git a/OnetwothreeTv/src/main/kotlin/com/hexated/OnetwothreeTvPlugin.kt b/OnetwothreeTv/src/main/kotlin/com/hexated/OnetwothreeTvPlugin.kt deleted file mode 100644 index 5b764581..00000000 --- a/OnetwothreeTv/src/main/kotlin/com/hexated/OnetwothreeTvPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class OnetwothreeTvPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(OnetwothreeTv()) - } -} \ No newline at end of file diff --git a/OploverzProvider/build.gradle.kts b/OploverzProvider/build.gradle.kts deleted file mode 100644 index e2ebbfc0..00000000 --- a/OploverzProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 24 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=oploverz.care&sz=%size%" -} diff --git a/OploverzProvider/src/main/AndroidManifest.xml b/OploverzProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/OploverzProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt b/OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt deleted file mode 100644 index c38c13b8..00000000 --- a/OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.* - -open class Qiwi : ExtractorApi() { - override val name = "Qiwi" - override val mainUrl = "https://qiwi.gg" - override val requiresReferer = true - - override suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val document = app.get(url, referer = referer).document - val title = document.select("title").text() - val source = document.select("video source").attr("src") - - callback.invoke( - ExtractorLink( - this.name, - this.name, - source, - "$mainUrl/", - getIndexQuality(title), - headers = mapOf( - "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", - "Range" to "bytes=0-", - "Sec-Fetch-Dest" to "video", - "Sec-Fetch-Mode" to "no-cors", - ) - ) - ) - - } - - private fun getIndexQuality(str: String): Int { - return Regex("(\\d{3,4})[pP]").find(str)?.groupValues?.getOrNull(1)?.toIntOrNull() - ?: Qualities.Unknown.value - } - -} \ No newline at end of file diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt deleted file mode 100644 index 8ed03196..00000000 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProvider.kt +++ /dev/null @@ -1,228 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element - -class OploverzProvider : MainAPI() { - override var mainUrl = "https://oploverz.red" - override var name = "Oploverz" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - const val acefile = "https://acefile.co" - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String?): ShowStatus { - return when (t) { - "Finished Airing" -> ShowStatus.Completed - "Completed" -> ShowStatus.Completed - "Currently Airing" -> ShowStatus.Ongoing - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - - } - - override val mainPage = mainPageOf( - "update" to "Latest Update", - "latest" to "Latest Added", - "popular" to "Popular Anime", - "rating" to "Top Rated", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get("$mainUrl/anime-list/page/$page/?title&order=${request.data}&status&type").document - val home = document.select("div.relat > article").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun getProperAnimeLink(uri: String): String { - return if (uri.contains("/anime/")) { - uri - } else { - var title = uri.substringAfter("$mainUrl/") - title = when { - (title.contains("-episode")) && !(title.contains("-movie")) -> Regex("(.+)-episode").find( - title - )?.groupValues?.get(1).toString() - (title.contains("-movie")) -> Regex("(.+)-movie").find(title)?.groupValues?.get( - 1 - ).toString() - else -> title - } - "$mainUrl/anime/$title" - } - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("div.title")?.text()?.trim() ?: return null - val href = getProperAnimeLink(this.selectFirst("a")!!.attr("href")) - val posterUrl = this.select("img[itemprop=image]").attr("src").toString() - val type = getType(this.select("div.type").text().trim()) - val epNum = - this.selectFirst("span.episode")?.ownText()?.replace(Regex("\\D"), "")?.trim() - ?.toIntOrNull() - return newAnimeSearchResponse(title, href, type) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - val anime = mutableListOf() - (1..2).forEach { page -> - val link = "$mainUrl/page/$page/?s=$query" - val document = app.get(link).document - val media = document.select(".site-main.relat > article").mapNotNull { - val title = it.selectFirst("div.title > h2")!!.ownText().trim() - val href = it.selectFirst("a")!!.attr("href") - val posterUrl = it.selectFirst("img")!!.attr("src").toString() - val type = getType(it.select("div.type").text().trim()) - newAnimeSearchResponse(title, href, type) { - this.posterUrl = posterUrl - } - } - if(media.isNotEmpty()) anime.addAll(media) - } - return anime - } - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("h1.entry-title")?.text() - ?.replace("Subtitle Indonesia", "")?.trim() ?: "" - val type = getType(document.selectFirst("div.alternati span.type")?.text() ?: "") - val year = document.selectFirst("div.alternati a")?.text()?.filter { it.isDigit() }?.toIntOrNull() - val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull { - val header = it.selectFirst("a") ?: return@mapNotNull null - val episode = header.text().trim().toIntOrNull() - val link = fixUrl(header.attr("href")) - Episode(link, episode = episode) - }.reversed() - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - posterUrl = tracker?.image ?: document.selectFirst("div.thumb > img")?.attr("src") - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = - getStatus( - document.selectFirst("div.alternati span:nth-child(2)")?.text()?.trim() - ) - plot = document.selectFirst("div.entry-content > p")?.text()?.trim() - this.tags = - document.select("div.genre-info a").map { it.text() } - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - - argamap( - { - document.select("div#server ul li div").apmap { - val dataPost = it.attr("data-post") - val dataNume = it.attr("data-nume") - val dataType = it.attr("data-type") - - val iframe = app.post( - url = "$mainUrl/wp-admin/admin-ajax.php", - data = mapOf( - "action" to "player_ajax", - "post" to dataPost, - "nume" to dataNume, - "type" to dataType - ), - referer = data, - headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).document.select("iframe").attr("src") - - loadExtractor(fixedIframe(iframe), "$mainUrl/", subtitleCallback, callback) - - } - }, - { - document.select("div#download tr").map { el -> - el.select("a").apmap { - loadFixedExtractor(fixedIframe(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback) - } - } - } - ) - - return true - } - - private suspend fun loadFixedExtractor( - url: String, - name: String, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - name.fixQuality(), - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun String.fixQuality() : Int { - return when(this) { - "MP4HD" -> Qualities.P720.value - "FULLHD" -> Qualities.P1080.value - else -> Regex("(\\d{3,4})p").find(this)?.groupValues?.get(1)?.toIntOrNull() ?: Qualities.Unknown.value - } - } - - private fun fixedIframe(url: String): String { - val id = Regex("""(?:/f/|/file/)(\w+)""").find(url)?.groupValues?.getOrNull(1) - return when { - url.startsWith(acefile) -> "${acefile}/player/$id" - else -> fixUrl(url) - } - } - -} diff --git a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt b/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt deleted file mode 100644 index ba7c0b85..00000000 --- a/OploverzProvider/src/main/kotlin/com/hexated/OploverzProviderPlugin.kt +++ /dev/null @@ -1,15 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class OploverzProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(OploverzProvider()) - registerExtractorAPI(Qiwi()) - } -} \ No newline at end of file diff --git a/OtakudesuProvider/build.gradle.kts b/OtakudesuProvider/build.gradle.kts deleted file mode 100644 index 5f46e097..00000000 --- a/OtakudesuProvider/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 16 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "Anime", - "OVA", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=otakudesu.watch&sz=%size%" -} \ No newline at end of file diff --git a/OtakudesuProvider/src/main/AndroidManifest.xml b/OtakudesuProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/OtakudesuProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/OtakudesuProvider/src/main/kotlin/com/hexated/OtakudesuProvider.kt b/OtakudesuProvider/src/main/kotlin/com/hexated/OtakudesuProvider.kt deleted file mode 100644 index f8215c33..00000000 --- a/OtakudesuProvider/src/main/kotlin/com/hexated/OtakudesuProvider.kt +++ /dev/null @@ -1,289 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.extractors.JWPlayer -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -class OtakudesuProvider : MainAPI() { - override var mainUrl = "https://otakudesu.wiki" - override var name = "Otakudesu" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - const val acefile = "https://acefile.co" - val mirrorBlackList = arrayOf( - "Mega", - "MegaUp", - "Otakufiles", - ) - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/ongoing-anime/page/" to "Anime Ongoing", - "$mainUrl/complete-anime/page/" to "Anime Completed" - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div.venz > ul > li").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("h2.jdlflm")?.text()?.trim() ?: return null - val href = this.selectFirst("a")!!.attr("href") - val posterUrl = this.select("div.thumbz > img").attr("src").toString() - val epNum = this.selectFirst("div.epz")?.ownText()?.replace(Regex("\\D"), "")?.trim() - ?.toIntOrNull() - return newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - return app.get("$mainUrl/?s=$query&post_type=anime").document.select("ul.chivsrc > li") - .map { - val title = it.selectFirst("h2 > a")!!.ownText().trim() - val href = it.selectFirst("h2 > a")!!.attr("href") - val posterUrl = it.selectFirst("img")!!.attr("src").toString() - newAnimeSearchResponse(title, href, TvType.Anime) { - this.posterUrl = posterUrl - } - } - } - - - override suspend fun load(url: String): LoadResponse { - val document = app.get(url).document - - val title = document.selectFirst("div.infozingle > p:nth-child(1) > span")?.ownText() - ?.replace(":", "")?.trim().toString() - val poster = document.selectFirst("div.fotoanime > img")?.attr("src") - val tags = document.select("div.infozingle > p:nth-child(11) > span > a").map { it.text() } - val type = getType(document.selectFirst("div.infozingle > p:nth-child(5) > span")?.ownText() - ?.replace(":", "")?.trim() ?: "tv") - - val year = Regex("\\d, (\\d*)").find( - document.select("div.infozingle > p:nth-child(9) > span").text() - )?.groupValues?.get(1)?.toIntOrNull() - val status = getStatus( - document.selectFirst("div.infozingle > p:nth-child(6) > span")!!.ownText() - .replace(":", "") - .trim() - ) - val description = document.select("div.sinopc > p").text() - - val episodes = document.select("div.episodelist")[1].select("ul > li").mapNotNull { - val name = it.selectFirst("a")?.text() ?: return@mapNotNull null - val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0) - ?: it.selectFirst("a")?.text() - val link = fixUrl(it.selectFirst("a")!!.attr("href")) - Episode(link, episode = episode?.toIntOrNull()) - }.reversed() - - val recommendations = - document.select("div.isi-recommend-anime-series > div.isi-konten").map { - val recName = it.selectFirst("span.judul-anime > a")!!.text() - val recHref = it.selectFirst("a")!!.attr("href") - val recPosterUrl = it.selectFirst("a > img")?.attr("src").toString() - newAnimeSearchResponse(recName, recHref, TvType.Anime) { - this.posterUrl = recPosterUrl - } - } - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - plot = description - this.tags = tags - this.recommendations = recommendations - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - } - - - data class ResponseSources( - @JsonProperty("id") val id: String, - @JsonProperty("i") val i: String, - @JsonProperty("q") val q: String, - ) - - data class ResponseData( - @JsonProperty("data") val data: String - ) - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - - argamap( - { - val scriptData = - document.select("script:containsData(action:)").lastOrNull()?.data() - val token = - scriptData?.substringAfter("{action:\"")?.substringBefore("\"}").toString() - - val nonce = - app.post("$mainUrl/wp-admin/admin-ajax.php", data = mapOf("action" to token)) - .parsed().data - val action = - scriptData?.substringAfter(",action:\"")?.substringBefore("\"}").toString() - - val mirrorData = document.select("div.mirrorstream > ul > li").mapNotNull { - base64Decode(it.select("a").attr("data-content")) - }.toString() - - tryParseJson>(mirrorData)?.apmap { res -> - val id = res.id - val i = res.i - val q = res.q - - val sources = Jsoup.parse( - base64Decode( - app.post( - "${mainUrl}/wp-admin/admin-ajax.php", data = mapOf( - "id" to id, - "i" to i, - "q" to q, - "nonce" to nonce, - "action" to action - ) - ).parsed().data - ) - ).select("iframe").attr("src") - - loadCustomExtractor(sources, data, subtitleCallback, callback, getQuality(q)) - - } - }, - { - document.select("div.download li").map { ele -> - val quality = getQuality(ele.select("strong").text()) - ele.select("a").map { - it.attr("href") to it.text() - }.filter { - !inBlacklist(it.first) && quality != Qualities.P360.value - }.apmap { - val link = app.get(it.first, referer = "$mainUrl/").url - loadCustomExtractor( - fixedIframe(link), - data, - subtitleCallback, - callback, - quality - ) - } - } - } - ) - - return true - } - - private suspend fun loadCustomExtractor( - url: String, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - quality: Int = Qualities.Unknown.value, - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - quality, - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun fixedIframe(url: String): String { - return when { - url.startsWith(acefile) -> { - val id = Regex("""(?:/f/|/file/)(\w+)""").find(url)?.groupValues?.getOrNull(1) - "${acefile}/player/$id" - } - - else -> fixUrl(url) - } - } - - private fun inBlacklist(host: String?): Boolean { - return mirrorBlackList.any { it.equals(host, true) } - } - - private fun getQuality(str: String?): Int { - return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull() - ?: Qualities.Unknown.value - } - -} - -class Moedesu : JWPlayer() { - override val name = "Moedesu" - override val mainUrl = "https://desustream.me/moedesu/" -} - -class DesuBeta : JWPlayer() { - override val name = "DesuBeta" - override val mainUrl = "https://desustream.me/beta/" -} - -class Desudesuhd : JWPlayer() { - override val name = "Desudesuhd" - override val mainUrl = "https://desustream.me/desudesuhd/" -} diff --git a/OtakudesuProvider/src/main/kotlin/com/hexated/OtakudesuProviderPlugin.kt b/OtakudesuProvider/src/main/kotlin/com/hexated/OtakudesuProviderPlugin.kt deleted file mode 100644 index 0fe85784..00000000 --- a/OtakudesuProvider/src/main/kotlin/com/hexated/OtakudesuProviderPlugin.kt +++ /dev/null @@ -1,17 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class OtakudesuProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(OtakudesuProvider()) - registerExtractorAPI(Moedesu()) - registerExtractorAPI(DesuBeta()) - registerExtractorAPI(Desudesuhd()) - } -} \ No newline at end of file diff --git a/Paradisehill/build.gradle.kts b/Paradisehill/build.gradle.kts deleted file mode 100644 index 167fdc84..00000000 --- a/Paradisehill/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 4 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - description = "Series porn (use VPN if links not working)" - authors = listOf("Sora") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "NSFW", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=en.paradisehill.cc&sz=%size%" -} \ No newline at end of file diff --git a/Paradisehill/src/main/AndroidManifest.xml b/Paradisehill/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/Paradisehill/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Paradisehill/src/main/kotlin/com/hexated/Paradisehill.kt b/Paradisehill/src/main/kotlin/com/hexated/Paradisehill.kt deleted file mode 100644 index 70b5d5f6..00000000 --- a/Paradisehill/src/main/kotlin/com/hexated/Paradisehill.kt +++ /dev/null @@ -1,124 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element - -class Paradisehill : MainAPI() { - override var mainUrl = "https://en.paradisehill.cc" - override var name = "Paradisehill" - override val hasMainPage = true - override val hasDownloadSupport = true - override var sequentialMainPage = true - override val vpnStatus = VPNStatus.MightBeNeeded - override val supportedTypes = setOf(TvType.NSFW) - - override val mainPage = mainPageOf( - "$mainUrl/all/?sort=created_at&page=" to "New Porn Movies", - "$mainUrl/popular/?filter=all&sort=by_likes&page=" to "Popular Porn Movies", - "$mainUrl/studio/89/?sort=created_at&page=" to "Brazzers", - "$mainUrl/studio/29/?sort=created_at&page=" to "Digital Playground", - "$mainUrl/studio/16/?sort=created_at&page=" to "Evil Angel", - "$mainUrl/studio/6/?sort=created_at&page=" to "Bang Bros Productions", - "$mainUrl/studio/78/?sort=created_at&page=" to "Jules Jordan Video", - "$mainUrl/studio/64/?sort=created_at&page=" to "Reality Kings", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page, verify = false).document - val home = - document.select("div.content div.item") - .mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } - - private fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("span[itemprop=name]")?.text() ?: return null - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) - return newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - - } - - override suspend fun search(query: String): List { - val searchResponse = mutableListOf() - for (i in 1..10) { - val document = app.get("$mainUrl/search/?pattern=$query&what=1&page=$i").document - val results = document.select("div.content div.item") - .mapNotNull { - it.toSearchResult() - } - searchResponse.addAll(results) - if(results.isEmpty()) break - } - - return searchResponse - } - - override suspend fun load(url: String): LoadResponse? { - val document = app.get(url).document - - val title = document.selectFirst("h1.title-inside")?.text()?.trim() ?: return null - val poster = fixUrlNull(document.selectFirst("img[itemprop=thumbnailUrl]")?.attr("src")) - val tags = document.select("div.opisanie span[itemprop=genre] a").map { it.text() } - val year = document.select("div.opisanie span[itemprop=releasedEvent]").text() - .let { Regex("[0-9]{4}").find(it)?.groupValues?.getOrNull(0)?.toIntOrNull() } - val description = document.select("div.opisanie span[itemprop=description]").text().trim() - val actors = document.select("div.opisanie p:contains(Actors:) a").map { it.text() } - - val dataEps = - document.select("script").find { it.data().contains("var videoList =") }?.data() - ?.substringAfter("videoList = [")?.substringBefore("];")?.let { data -> - Regex("\"src\":\"(\\S*?.mp4)\",").findAll(data).map { it.groupValues[1] } - .toList() - } - val episodes = dataEps?.mapIndexed { index, link -> - Episode(link, episode = index + 1) - } ?: throw ErrorLoadingException("No Episode Found") - - val recommendations = - document.select("div.content div.item") - .mapNotNull { - it.toSearchResult() - } - - return newTvSeriesLoadResponse(title, url, TvType.NSFW, episodes) { - this.posterUrl = poster - this.plot = description - this.tags = tags - addActors(actors) - this.year = year - this.recommendations = recommendations - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - callback.invoke( - ExtractorLink( - this.name, - this.name, - data.replace("\\", ""), - referer = mainUrl, - quality = Qualities.Unknown.value, -// headers = mapOf("Range" to "bytes=0-"), - ) - ) - return true - } - -} \ No newline at end of file diff --git a/Paradisehill/src/main/kotlin/com/hexated/ParadisehillPlugin.kt b/Paradisehill/src/main/kotlin/com/hexated/ParadisehillPlugin.kt deleted file mode 100644 index 0c876f29..00000000 --- a/Paradisehill/src/main/kotlin/com/hexated/ParadisehillPlugin.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class ParadisehillPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Paradisehill()) - } -} \ No newline at end of file diff --git a/Phim1080/build.gradle.kts b/Phim1080/build.gradle.kts deleted file mode 100644 index aaa4fcc1..00000000 --- a/Phim1080/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -// use an integer for version numbers -version = 3 - - -cloudstream { - language = "vi" - // All of these properties are optional, you can safely remove them - - description = "Xem Phim Online Chất Lượng Cao" - authors = listOf("TuaSan") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "Anime", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=xem1080.com" -} diff --git a/Phim1080/src/main/AndroidManifest.xml b/Phim1080/src/main/AndroidManifest.xml deleted file mode 100644 index a3f95b4f..00000000 --- a/Phim1080/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/Phim1080/src/main/kotlin/com/hexated/Phim1080Provider.kt b/Phim1080/src/main/kotlin/com/hexated/Phim1080Provider.kt deleted file mode 100644 index ac72c46a..00000000 --- a/Phim1080/src/main/kotlin/com/hexated/Phim1080Provider.kt +++ /dev/null @@ -1,267 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.ExtractorLink -import org.jsoup.nodes.Element - -class Phim1080Provider : MainAPI() { - override var mainUrl = "https://phimmoi2.com" - override var name = "Phim1080" - override val hasMainPage = true - override var lang = "vi" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.Anime, - TvType.AsianDrama - ) - - private fun decodeString(e: String, t: Int): String { - var a = "" - for (i in 0 until e.length) { - val r = e[i].code - val o = r xor t - a += o.toChar() - } - return a - } - - override val mainPage = mainPageOf( - "$mainUrl/phim-de-cu?page=" to "Phim Đề Cử", - "$mainUrl/the-loai/hoat-hinh?page=" to "Phim Hoạt Hình", - "$mainUrl/phim-chieu-rap?page=" to "Phim Chiếu Rạp", - "$mainUrl/phim-bo?page=" to "Phim Bộ", - "$mainUrl/phim-le?page=" to "Phim Lẻ", - "$mainUrl/bang-xep-hang?page=" to "Bảng Xếp Hạng", - "$mainUrl/bo-suu-tap/disney-plus?page=" to "Disney+", - "$mainUrl/bo-suu-tap/netflix-original?page=" to "Netflix", - "$mainUrl/hom-nay-xem-gi?page=" to "Hôm Nay Xem Gì", - "$mainUrl/phim-sap-chieu?page=" to "Phim Sắp Chiếu", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div.tray-item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - ), - hasNext = true - ) - } - - private fun Element.toSearchResult(): SearchResponse { - val title = this.selectFirst("div.tray-item-title")?.text()?.trim().toString() - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = this.selectFirst("img")!!.attr("data-src") - val temp = this.select("div.tray-film-likes").text() - return if (temp.contains("/")) { - val episode = Regex("((\\d+)\\s)").find(temp)?.groupValues?.map { num -> - num.replace(Regex("\\s"), "") - }?.distinct()?.firstOrNull()?.toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addSub(episode) - } - } else { - val quality = this.select("span.tray-item-quality").text().replace("FHD", "HD").trim() - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - addQuality(quality) - } - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/tim-kiem/$query" - val document = app.get(link).document - - return document.select("div.tray-item").map { - it.toSearchResult() - } - } - - override suspend fun load( url: String ): LoadResponse { - val document = app.get( - url = url, - referer = "$mainUrl/", - headers = mapOf( - "Sec-Ch-Ua-Mobile" to "?1", - "Sec-Ch-Ua-Platform" to "\"Android\"", - "User-Agent" to "Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36 Edg/114.0.0.0", - ) - ).document - val fId = document.select("div.container").attr("data-id") - val filmInfo = app.get( - "$mainUrl/api/v2/films/$fId", - referer = url, - headers = mapOf( - "Content-Type" to "application/json", - "X-Requested-With" to "XMLHttpRequest" - ) - ).parsedSafe() - val title = filmInfo?.name?.trim().toString() - val poster = filmInfo?.thumbnail - val background = filmInfo?.poster - val slug = filmInfo?.slug - val link = "$mainUrl/$slug" - val tags = document.select("div.film-content div.film-info-genre:nth-child(7) a").map { it.text() } - val year = filmInfo?.year - val tvType = if (document.select("div.episode-group-tab").isNotEmpty()) TvType.TvSeries else TvType.Movie - val description = document.select("div.film-info-description").text().trim() - val comingSoon = document.select("button.direction-trailer").isNotEmpty() - val trailerCode = filmInfo?.trailer?.original?.id - val trailer = "https://www.youtube.com/embed/$trailerCode" - val recommendations = document.select("section.tray.index.related div.tray-content.carousel div.tray-item").map { - it.toSearchResult() - } - - return if (tvType == TvType.TvSeries) { - val epsInfo = app.get( - "$mainUrl/api/v2/films/$fId/episodes?sort=name", - referer = link, - headers = mapOf( - "Content-Type" to "application/json", - "X-Requested-With" to "XMLHttpRequest", - ) - ).parsedSafe()?.eps?.map { ep -> - Episode( - data = fixUrl(ep.link.toString()), - name = ep.detailname, - episode = ep.episodeNumber, - ) - } ?: listOf() - newTvSeriesLoadResponse(title, url, TvType.TvSeries, epsInfo) { - this.posterUrl = poster - this.backgroundPosterUrl = background - this.year = year - this.plot = description - this.tags = tags - this.comingSoon = comingSoon - addTrailer(trailer) - this.recommendations = recommendations - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, link) { - this.posterUrl = poster - this.backgroundPosterUrl = background - this.year = year - this.plot = description - this.tags = tags - this.comingSoon = comingSoon - addTrailer(trailer) - this.recommendations = recommendations - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - val fId = document.select("div.container").attr("data-id") - val epId = document.select("div.container").attr("data-episode-id") - val doc = app.get( - "$mainUrl/api/v2/films/$fId/episodes/$epId", - referer = data, - headers = mapOf( - "Content-Type" to "application/json", - "cookie" to "phimnhanh=%3D", - "X-Requested-With" to "XMLHttpRequest" - ) - ) - - val optEncode = if (doc.text.indexOf("\"opt\":\"") != -1) { - doc.text.substringAfter("\"opt\":\"").substringBefore("\"},") - } else { "" } - val opt = decodeString(optEncode as String, 69).replace("0uut$", "_").replace("index.m3u8", "3000k/hls/mixed.m3u8") - val hlsEncode = if (doc.text.indexOf(":{\"hls\":\"") != -1) { - doc.text.substringAfter(":{\"hls\":\"").substringBefore("\"},") - } else { "" } - val hls = decodeString(hlsEncode as String, 69) - val fb = if (doc.text.indexOf("\"fb\":[{\"src\":\"") != -1) { - doc.text.substringAfter("\"fb\":[{\"src\":\"").substringBefore("\",").replace("\\", "") - } else { "" } - - listOfNotNull( - if (hls.contains(".m3u8")) {Triple("$hls", "HS", true)} else null, - if (fb.contains(".mp4")) {Triple("$fb", "FB", false)} else null, - if (opt.contains(".m3u8")) {Triple("$opt", "OP", true)} else null, - ).apmap { (link, source, isM3u8) -> - safeApiCall { - callback.invoke( - ExtractorLink( - source, - source, - link, - referer = data, - quality = Qualities.Unknown.value, - isM3u8, - ) - ) - } - } - val subId = doc.parsedSafe()?.subtitle?.vi - val isSubIdEmpty = subId.isNullOrBlank() - if (!isSubIdEmpty) { - subtitleCallback.invoke( - SubtitleFile( - "Vietnamese", - "$mainUrl/subtitle/$subId.vtt" - ) - ) - } - return true - } - - data class filmInfo( - @JsonProperty("name") val name: String? = null, - @JsonProperty("poster") val poster: String? = null, - @JsonProperty("thumbnail") val thumbnail: String? = null, - @JsonProperty("slug") val slug: String? = null, - @JsonProperty("year") val year: Int? = null, - @JsonProperty("trailer") val trailer: TrailerInfo? = null, - ) - - data class TrailerInfo( - @JsonProperty("original") val original: TrailerKey? = null, - ) - - data class TrailerKey( - @JsonProperty("id") val id: String? = null, - ) - - data class MediaDetailEpisodes( - @JsonProperty("data") val eps: ArrayList? = arrayListOf(), - ) - - data class Episodes( - @JsonProperty("link") val link: String? = null, - @JsonProperty("detail_name") val detailname: String? = null, - @JsonProperty("name") val episodeNumber: Int? = null, - ) - - data class Media( - @JsonProperty("subtitle") val subtitle: SubInfo? = null, - ) - - data class SubInfo( - @JsonProperty("vi") val vi: String? = null, - ) - -} diff --git a/Phim1080/src/main/kotlin/com/hexated/Phim1080ProviderPlugin.kt b/Phim1080/src/main/kotlin/com/hexated/Phim1080ProviderPlugin.kt deleted file mode 100644 index a521b6ac..00000000 --- a/Phim1080/src/main/kotlin/com/hexated/Phim1080ProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class Phim1080ProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Phim1080Provider()) - } -} diff --git a/PhimmoichillProvider/build.gradle.kts b/PhimmoichillProvider/build.gradle.kts deleted file mode 100644 index ec3f3dc3..00000000 --- a/PhimmoichillProvider/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -// use an integer for version numbers -version = 6 - - -cloudstream { - language = "vi" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "Anime", - "TvSeries", - "Movie", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=phimmoichilla.net&sz=%size%" -} diff --git a/PhimmoichillProvider/src/main/AndroidManifest.xml b/PhimmoichillProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/PhimmoichillProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/PhimmoichillProvider/src/main/kotlin/com/hexated/PhimmoichillProvider.kt b/PhimmoichillProvider/src/main/kotlin/com/hexated/PhimmoichillProvider.kt deleted file mode 100644 index 2d0d256f..00000000 --- a/PhimmoichillProvider/src/main/kotlin/com/hexated/PhimmoichillProvider.kt +++ /dev/null @@ -1,209 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Element -import java.net.URI -import java.net.URLDecoder - -class PhimmoichillProvider : MainAPI() { - override var mainUrl = "https://phimmoichillh.net" - private var directUrl = mainUrl - override var name = "Phimmoichill" - override val hasMainPage = true - override var lang = "vi" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.Anime, - TvType.AsianDrama - ) - - override val mainPage = mainPageOf( - "$mainUrl/genre/phim-chieu-rap/page-" to "Phim Chiếu Rạp", - "$mainUrl/list/phim-le/page-" to "Phim Lẻ", - "$mainUrl/list/phim-bo/page-" to "Phim Bộ", - "$mainUrl/genre/phim-hoat-hinh/page-" to "Phim Hoạt Hình", - "$mainUrl/genre/phim-anime/page-" to "Phim Anime", - "$mainUrl/country/phim-han-quoc/page-" to "Phim Hàn Quốc", - "$mainUrl/country/phim-trung-quoc/page-" to "Phim Trung Quốc", - "$mainUrl/country/phim-thai-lan/page-" to "Phim Thái Lan", - "$mainUrl/genre/phim-sap-chieu/page-" to "Phim Sắp Chiếu", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("li.item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse( - list = HomePageList( - name = request.name, - list = home, - isHorizontalImages = true - ), - hasNext = true - ) - } - - private fun decode(input: String): String? = URLDecoder.decode(input, "utf-8") - - private fun Element.toSearchResult(): SearchResponse { - val title = this.selectFirst("p,h3")?.text()?.trim().toString() - val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = decode(this.selectFirst("img")!!.attr("src").substringAfter("url=")) - val temp = this.select("span.label").text() - return if (temp.contains(Regex("\\d"))) { - val episode = Regex("(\\((\\d+))|(\\s(\\d+))").find(temp)?.groupValues?.map { num -> - num.replace(Regex("\\(|\\s"), "") - }?.distinct()?.firstOrNull()?.toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addSub(episode) - } - } else if (temp.contains(Regex("Trailer"))) { - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - } - } else { - val quality = - temp.replace(Regex("(-.*)|(\\|.*)|(?i)(VietSub.*)|(?i)(Thuyết.*)"), "").trim() - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - addQuality(quality) - } - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/tim-kiem/$query" - val document = app.get(link).document - - return document.select("ul.list-film li").map { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val request = app.get(url) - directUrl = getBaseUrl(request.url) - val document = request.document - - val title = document.selectFirst("h1[itemprop=name]")?.text()?.trim().toString() - val link = document.select("ul.list-button li:last-child a").attr("href") - val poster = document.selectFirst("div.image img[itemprop=image]")?.attr("src") - val tags = document.select("ul.entry-meta.block-film li:nth-child(4) a") - .map { it.text().substringAfter("Phim") } - val year = document.select("ul.entry-meta.block-film li:nth-child(2) a").text().trim() - .toIntOrNull() - val tvType = if (document.select("div.latest-episode").isNotEmpty() - ) TvType.TvSeries else TvType.Movie - val description = - document.select("div#film-content").text().substringAfter("Full HD Vietsub Thuyết Minh") - .substringBefore("@phimmoi").trim() - val trailer = document.select("body script") - .find { it.data().contains("youtube.com") }?.data()?.substringAfterLast("file: \"") - ?.substringBefore("\",") - val rating = - document.select("ul.entry-meta.block-film li:nth-child(7) span").text().toRatingInt() - val actors = document.select("ul.entry-meta.block-film li:last-child a").map { it.text() } - val recommendations = document.select("ul#list-film-realted li.item").map { - it.toSearchResult().apply { - this.posterUrl = - decode(it.selectFirst("img")!!.attr("data-src").substringAfter("url=")) - } - } - - return if (tvType == TvType.TvSeries) { - val docEpisodes = app.get(link).document - val episodes = docEpisodes.select("ul#list_episodes > li").map { - val href = it.select("a").attr("href") - val episode = - it.select("a").text().replace(Regex("[^0-9]"), "").trim().toIntOrNull() - val name = "Episode $episode" - Episode( - data = href, - name = name, - episode = episode, - ) - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } else { - newMovieLoadResponse(title, url, TvType.Movie, link) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - addActors(actors) - this.recommendations = recommendations - addTrailer(trailer) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - val document = app.get(data).document - - val key = document.select("div#content script") - .find { it.data().contains("filmInfo.episodeID =") }?.data()?.let { script -> - val id = script.substringAfter("parseInt('").substringBefore("'") - app.post( - url = "$directUrl/chillsplayer.php", - data = mapOf("qcao" to id), - referer = data, - headers = mapOf( - "X-Requested-With" to "XMLHttpRequest", - "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8" - ) - ).text.substringAfterLast("iniPlayers(\"") - .substringBefore("\"") - } - - listOf( - Pair("https://sotrim.topphimmoi.org/raw/$key/index.m3u8", "PMFAST"), - Pair("https://dash.megacdn.xyz/raw/$key/index.m3u8", "PMHLS"), - Pair("https://so-trym.phimchill.net/dash/$key/index.m3u8", "PMPRO"), - Pair("https://dash.megacdn.xyz/dast/$key/index.m3u8", "PMBK") - ).map { (link, source) -> - callback.invoke( - ExtractorLink( - source, - source, - link, - referer = "$directUrl/", - quality = Qualities.P1080.value, - INFER_TYPE, - ) - ) - } - return true - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - -} diff --git a/PhimmoichillProvider/src/main/kotlin/com/hexated/PhimmoichillProviderPlugin.kt b/PhimmoichillProvider/src/main/kotlin/com/hexated/PhimmoichillProviderPlugin.kt deleted file mode 100644 index eebb608f..00000000 --- a/PhimmoichillProvider/src/main/kotlin/com/hexated/PhimmoichillProviderPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class PhimmoichillProviderPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(PhimmoichillProvider()) - } -} \ No newline at end of file diff --git a/RebahinProvider/build.gradle.kts b/RebahinProvider/build.gradle.kts deleted file mode 100644 index 6f308335..00000000 --- a/RebahinProvider/build.gradle.kts +++ /dev/null @@ -1,29 +0,0 @@ -// use an integer for version numbers -version = 8 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - description = "Includes: Cgvindo, Kitanonton" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AsianDrama", - "Anime", - "TvSeries", - "Movie", - ) - - - iconUrl = "https://www.google.com/s2/favicons?domain=179.43.163.54&sz=%size%" -} diff --git a/RebahinProvider/src/main/AndroidManifest.xml b/RebahinProvider/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/RebahinProvider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt b/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt deleted file mode 100644 index da0cb643..00000000 --- a/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.TvType - -class Cgvindo : RebahinProvider() { - override var mainUrl = "http://198.54.124.245" - override var name = "Cgvindo" - -} diff --git a/RebahinProvider/src/main/kotlin/com/hexated/Kitanonton.kt b/RebahinProvider/src/main/kotlin/com/hexated/Kitanonton.kt deleted file mode 100644 index 00965629..00000000 --- a/RebahinProvider/src/main/kotlin/com/hexated/Kitanonton.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* - -class Kitanonton : RebahinProvider() { - override var mainUrl = "http://kitanonton.top" - override var name = "KitaNonton" - override var mainServer = "https://199.87.210.226" - - override val mainPage = mainPageOf( - "$mainUrl/genre/populer/page/" to "Populer Movies", - "$mainUrl/movies/page/" to "New Movies", - "$mainUrl/genre/westseries/page/" to "West TV Series", - "$mainUrl/genre/drama-korea/page/" to "Drama Korea", - "$mainUrl/genre/animation/page/" to "Anime", - "$mainUrl/genre/series-indonesia/page/" to "Drama Indonesia", - "$mainUrl/genre/drama-jepang/page/" to "Drama Jepang", - "$mainUrl/genre/drama-china/page/" to "Drama China", - "$mainUrl/genre/thailand-series/page/" to "Drama Thailand", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val document = app.get(request.data + page).document - val home = document.select("div#featured div.ml-item").mapNotNull { - it.toSearchResult() - } - return newHomePageResponse(request.name, home) - } -} diff --git a/RebahinProvider/src/main/kotlin/com/hexated/RebahinProvider.kt b/RebahinProvider/src/main/kotlin/com/hexated/RebahinProvider.kt deleted file mode 100644 index 6bec8822..00000000 --- a/RebahinProvider/src/main/kotlin/com/hexated/RebahinProvider.kt +++ /dev/null @@ -1,246 +0,0 @@ -package com.hexated - -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addActors -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.mvvm.logError -import com.lagradost.cloudstream3.mvvm.safeApiCall -import com.lagradost.cloudstream3.utils.* -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson -import org.jsoup.nodes.Element -import java.net.URI - -open class RebahinProvider : MainAPI() { - override var mainUrl = "http://179.43.163.54" - private var directUrl: String? = null - override var name = "Rebahin" - override val hasMainPage = true - override var lang = "id" - open var mainServer = "http://172.96.161.72" - override val supportedTypes = setOf( - TvType.Movie, - TvType.TvSeries, - TvType.Anime, - TvType.AsianDrama - ) - - override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { - val urls = listOf( - Pair("Featured", "xtab1"), - Pair("Film Terbaru", "xtab2"), - Pair("Romance", "xtab3"), - Pair("Drama", "xtab4"), - Pair("Action", "xtab5"), - Pair("Scifi", "xtab6"), - Pair("Tv Series Terbaru", "stab1"), - Pair("Anime Series", "stab2"), - Pair("Drakor Series", "stab3"), - Pair("West Series", "stab4"), - Pair("China Series", "stab5"), - Pair("Japan Series", "stab6"), - ) - - val items = ArrayList() - - for ((header, tab) in urls) { - try { - val home = - app.get("$mainUrl/wp-content/themes/indoxxi/ajax-top-$tab.php").document.select( - "div.ml-item" - ).mapNotNull { - it.toSearchResult() - } - items.add(HomePageList(header, home)) - } catch (e: Exception) { - logError(e) - } - } - - if (items.size <= 0) throw ErrorLoadingException() - return HomePageResponse(items) - } - - fun Element.toSearchResult(): SearchResponse? { - val title = this.selectFirst("span.mli-info > h2")?.text() ?: return null - val href = this.selectFirst("a")!!.attr("href") - val type = - if (this.select("span.mli-quality").isNotEmpty()) TvType.Movie else TvType.TvSeries - return if (type == TvType.Movie) { - val posterUrl = fixUrlNull(this.select("img").attr("src")) - val quality = getQualityFromString(this.select("span.mli-quality").text().trim()) - newMovieSearchResponse(title, href, TvType.Movie) { - this.posterUrl = posterUrl - this.quality = quality - } - } else { - val posterUrl = - fixUrlNull( - this.select("img").attr("src") - .ifEmpty { this.select("img").attr("data-original") }) - val episode = - this.select("div.mli-eps > span").text().replace(Regex("[^0-9]"), "").toIntOrNull() - newAnimeSearchResponse(title, href, TvType.TvSeries) { - this.posterUrl = posterUrl - addSub(episode) - } - } - } - - override suspend fun search(query: String): List { - val link = "$mainUrl/?s=$query" - val document = app.get(link).document - - return document.select("div.ml-item").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse { - val req = app.get(url) - directUrl = getBaseUrl(req.url) - val document = req.document - val title = document.selectFirst("h3[itemprop=name]")!!.ownText().trim() - val poster = document.select(".mvic-desc > div.thumb.mvic-thumb").attr("style") - .substringAfter("url(").substringBeforeLast(")") - val tags = document.select("span[itemprop=genre]").map { it.text() } - - val year = Regex("([0-9]{4}?)-").find( - document.selectFirst(".mvici-right > p:nth-child(3)")!!.ownText().trim() - )?.groupValues?.get(1).toString().toIntOrNull() - val tvType = if (url.contains("/series/")) TvType.TvSeries else TvType.Movie - val description = document.select("span[itemprop=reviewBody] > p").text().trim() - val trailer = fixUrlNull(document.selectFirst("div.modal-body-trailer iframe")?.attr("src")) - val rating = document.selectFirst("span[itemprop=ratingValue]")?.text()?.toRatingInt() - val duration = document.selectFirst(".mvici-right > p:nth-child(1)")!! - .ownText().replace(Regex("[^0-9]"), "").toIntOrNull() - val actors = document.select("span[itemprop=actor] > a").map { it.select("span").text() } - - val baseLink = fixUrl(document.select("div#mv-info > a").attr("href").toString()) - - return if (tvType == TvType.TvSeries) { - val episodes = app.get(baseLink).document.select("div#list-eps > a").map { - Pair(it.text(), it.attr("data-iframe")) - }.groupBy { it.first }.map { eps -> - Episode( - data = eps.value.map { fixUrl(base64Decode(it.second)) }.toString(), - name = eps.key, - episode = eps.key.filter { it.isDigit() }.toIntOrNull() - ) - - } - newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - this.duration = duration - addActors(actors) - addTrailer(trailer) - } - } else { - val links = - app.get(baseLink).document.select("div#server-list div.server-wrapper div[id*=episode]") - .map { - fixUrl(base64Decode(it.attr("data-iframe"))) - }.toString() - newMovieLoadResponse(title, url, TvType.Movie, links) { - this.posterUrl = poster - this.year = year - this.plot = description - this.tags = tags - this.rating = rating - this.duration = duration - addActors(actors) - addTrailer(trailer) - } - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - data.removeSurrounding("[", "]").split(",").map { it.trim() }.apmap { link -> - safeApiCall { - when { - link.startsWith(mainServer) -> invokeLokalSource( - link, - subtitleCallback, - callback - ) - else -> { - loadExtractor(link, "$directUrl/", subtitleCallback, callback) - } - } - } - } - - return true - } - - private suspend fun invokeLokalSource( - url: String, - subCallback: (SubtitleFile) -> Unit, - sourceCallback: (ExtractorLink) -> Unit - ) { - val document = app.get( - url, - allowRedirects = false, - referer = directUrl, - headers = mapOf("Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8") - ).document - - document.select("script").find { it.data().contains("config =") }?.data()?.let { script -> - Regex("\"file\":\\s?\"(.+.m3u8)\"").find(script)?.groupValues?.getOrNull(1) - ?.let { link -> - M3u8Helper.generateM3u8( - name, - link, - referer = "$mainServer/", - headers = mapOf("Accept" to "*/*", "Origin" to mainServer) - ).forEach(sourceCallback) - } - - val subData = - Regex("\"?tracks\"?:\\s\\n?\\[(.*)],").find(script)?.groupValues?.getOrNull(1) - ?: Regex("\"?tracks\"?:\\s\\n?\\[\\s*(?s:(.+)],\\n\\s*\"sources)").find(script)?.groupValues?.getOrNull( - 1 - ) - tryParseJson>("[$subData]")?.map { - subCallback.invoke( - SubtitleFile( - getLanguage(it.label ?: return@map null), - if (it.file?.contains(".srt") == true) it.file else return@map null - ) - ) - - } - } - } - - private fun getLanguage(str: String): String { - return when { - str.contains("indonesia", true) || str.contains("bahasa", true) -> "Indonesian" - else -> str - } - } - - private fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - private data class Tracks( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - @JsonProperty("kind") val kind: String? = null - ) - -} - diff --git a/RebahinProvider/src/main/kotlin/com/hexated/RebahinProviderPlugin.kt b/RebahinProvider/src/main/kotlin/com/hexated/RebahinProviderPlugin.kt deleted file mode 100644 index e051cc41..00000000 --- a/RebahinProvider/src/main/kotlin/com/hexated/RebahinProviderPlugin.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class RebahinProviderPlugin : Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(RebahinProvider()) - registerMainAPI(Kitanonton()) - registerMainAPI(Cgvindo()) - } -} \ No newline at end of file diff --git a/Samehadaku/build.gradle.kts b/Samehadaku/build.gradle.kts deleted file mode 100644 index 25a86ea3..00000000 --- a/Samehadaku/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -// use an integer for version numbers -version = 18 - - -cloudstream { - language = "id" - // All of these properties are optional, you can safely remove them - - // description = "Lorem Ipsum" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "AnimeMovie", - "OVA", - "Anime", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=https://samehadaku.world&sz=%size%" -} \ No newline at end of file diff --git a/Samehadaku/src/main/AndroidManifest.xml b/Samehadaku/src/main/AndroidManifest.xml deleted file mode 100644 index 874740e3..00000000 --- a/Samehadaku/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt b/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt deleted file mode 100644 index 69bdf841..00000000 --- a/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt +++ /dev/null @@ -1,239 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId -import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId -import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.Qualities -import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Element - -class Samehadaku : MainAPI() { - override var mainUrl = "https://samehadaku.guru" - override var name = "Samehadaku" - override val hasMainPage = true - override var lang = "id" - override val hasDownloadSupport = true - override val supportedTypes = setOf( - TvType.Anime, - TvType.AnimeMovie, - TvType.OVA - ) - - companion object { - const val acefile = "https://acefile.co" - - fun getType(t: String): TvType { - return if (t.contains("OVA", true) || t.contains("Special", true)) TvType.OVA - else if (t.contains("Movie", true)) TvType.AnimeMovie - else TvType.Anime - } - - fun getStatus(t: String): ShowStatus { - return when (t) { - "Completed" -> ShowStatus.Completed - "Ongoing" -> ShowStatus.Ongoing - else -> ShowStatus.Completed - } - } - } - - override val mainPage = mainPageOf( - "$mainUrl/page/" to "Episode Terbaru", - "$mainUrl/" to "HomePage", - ) - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val items = mutableListOf() - - if (request.name != "Episode Terbaru" && page <= 1) { - val doc = app.get(request.data).document - doc.select("div.widget_senction:not(:contains(Baca Komik))").forEach { block -> - val header = block.selectFirst("div.widget-title h3")?.ownText() ?: return@forEach - val home = block.select("div.animepost").mapNotNull { - it.toSearchResult() - } - if (home.isNotEmpty()) items.add(HomePageList(header, home)) - } - } - - if (request.name == "Episode Terbaru") { - val home = app.get(request.data + page).document.selectFirst("div.post-show")?.select("ul li") - ?.mapNotNull { - it.toSearchResult() - } ?: throw ErrorLoadingException("No Media Found") - items.add(HomePageList(request.name, home, true)) - } - - return newHomePageResponse(items) - - } - - private fun Element.toSearchResult(): AnimeSearchResponse? { - val title = this.selectFirst("div.title, h2.entry-title a, div.lftinfo h2")?.text()?.trim() - ?: return null - val href = fixUrlNull(this.selectFirst("a")?.attr("href") ?: return null) - val posterUrl = fixUrlNull(this.select("img").attr("src")) - val epNum = this.selectFirst("div.dtla author")?.text()?.toIntOrNull() - return newAnimeSearchResponse(title, href ?: return null, TvType.Anime) { - this.posterUrl = posterUrl - addSub(epNum) - } - - } - - override suspend fun search(query: String): List { - val document = app.get("$mainUrl/?s=$query").document - return document.select("main#main div.animepost").mapNotNull { - it.toSearchResult() - } - } - - override suspend fun load(url: String): LoadResponse? { - val fixUrl = if (url.contains("/anime/")) { - url - } else { - app.get(url).document.selectFirst("div.nvs.nvsc a")?.attr("href") - } - - val document = app.get(fixUrl ?: return null).document - val title = document.selectFirst("h1.entry-title")?.text()?.removeBloat() ?: return null - val poster = document.selectFirst("div.thumb > img")?.attr("src") - val tags = document.select("div.genre-info > a").map { it.text() } - val year = document.selectFirst("div.spe > span:contains(Rilis)")?.ownText()?.let { - Regex("\\d,\\s(\\d*)").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull() - } - val status = getStatus( - document.selectFirst("div.spe > span:contains(Status)")?.ownText() ?: return null - ) - val type = - getType(document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase() - ?: "tv") - val rating = document.selectFirst("span.ratingValue")?.text()?.trim()?.toRatingInt() - val description = document.select("div.desc p").text().trim() - val trailer = document.selectFirst("div.trailer-anime iframe")?.attr("src") - - val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull { - val header = it.selectFirst("span.lchx > a") ?: return@mapNotNull null - val episode = Regex("Episode\\s?(\\d+)").find(header.text())?.groupValues?.getOrNull(1) - ?.toIntOrNull() - val link = fixUrl(header.attr("href")) - Episode(link, episode = episode) - }.reversed() - - val recommendations = document.select("aside#sidebar ul li").mapNotNull { - it.toSearchResult() - } - - val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true) - - return newAnimeLoadResponse(title, url, type) { - engName = title - posterUrl = tracker?.image ?: poster - backgroundPosterUrl = tracker?.cover - this.year = year - addEpisodes(DubStatus.Subbed, episodes) - showStatus = status - this.rating = rating - plot = description - addTrailer(trailer) - this.tags = tags - this.recommendations = recommendations - addMalId(tracker?.malId) - addAniListId(tracker?.aniId?.toIntOrNull()) - } - - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val document = app.get(data).document - - argamap( - { - document.select("div#server ul li div").apmap { - val dataPost = it.attr("data-post") - val dataNume = it.attr("data-nume") - val dataType = it.attr("data-type") - - val iframe = app.post( - url = "$mainUrl/wp-admin/admin-ajax.php", - data = mapOf( - "action" to "player_ajax", - "post" to dataPost, - "nume" to dataNume, - "type" to dataType - ), - referer = data, - headers = mapOf("X-Requested-With" to "XMLHttpRequest"), - ).document.select("iframe").attr("src") - - loadFixedExtractor(fixedIframe(iframe), it.text(), "$mainUrl/", subtitleCallback, callback) - - } - }, - { - document.select("div#downloadb li").map { el -> - el.select("a").apmap { - loadFixedExtractor(fixedIframe(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback) - } - } - } - ) - - return true - } - - private suspend fun loadFixedExtractor( - url: String, - name: String, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.name, - link.name, - link.url, - link.referer, - name.fixQuality(), - link.type, - link.headers, - link.extractorData - ) - ) - } - } - - private fun String.fixQuality() : Int { - return when(this) { - "MP4HD" -> Qualities.P720.value - "FULLHD" -> Qualities.P1080.value - else -> this.filter { it.isDigit() }.toIntOrNull() ?: Qualities.Unknown.value - } - } - - private fun fixedIframe(url: String): String { - val id = Regex("""(?:/f/|/file/)(\w+)""").find(url)?.groupValues?.getOrNull(1) - return when { - url.startsWith(acefile) -> "${acefile}/player/$id" - else -> fixUrl(url) - } - } - - private fun String.removeBloat(): String { - return this.replace(Regex("(Nonton)|(Anime)|(Subtitle\\sIndonesia)"), "").trim() - } - -} diff --git a/Samehadaku/src/main/kotlin/com/hexated/SamehadakuPlugin.kt b/Samehadaku/src/main/kotlin/com/hexated/SamehadakuPlugin.kt deleted file mode 100644 index 307477b6..00000000 --- a/Samehadaku/src/main/kotlin/com/hexated/SamehadakuPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - -package com.hexated - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import android.content.Context - -@CloudstreamPlugin -class SamehadakuPlugin: Plugin() { - override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. - registerMainAPI(Samehadaku()) - } -} \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 379a47e0..c5970388 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -76,7 +76,8 @@ open class SoraStream : TmdbProvider() { const val malsyncAPI = "https://api.malsync.moe" const val jikanAPI = "https://api.jikan.moe/v4" - private const val apiKey = BuildConfig.TMDB_API + private val apiKey = + base64DecodeAPI("ZTM=NTg=MjM=MjM=ODc=MzI=OGQ=MmE=Nzk=Nzk=ZjI=NTA=NDY=NDA=MzA=YjA=") // PLEASE DON'T STEAL /** ALL SOURCES */ const val twoEmbedAPI = "https://www.2embed.cc" diff --git a/TimefourTv/build.gradle.kts b/TimefourTv/build.gradle.kts deleted file mode 100644 index 7a9bafec..00000000 --- a/TimefourTv/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// use an integer for version numbers -version = 20 - - -cloudstream { - language = "en" - // All of these properties are optional, you can safely remove them - - description = "Sport Live Stream" - authors = listOf("Hexated") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 // will be 3 if unspecified - tvTypes = listOf( - "Live", - ) - - iconUrl = "https://www.google.com/s2/favicons?domain=time4tv.stream&sz=%size%" -} diff --git a/TimefourTv/src/main/AndroidManifest.xml b/TimefourTv/src/main/AndroidManifest.xml deleted file mode 100644 index c98063f8..00000000 --- a/TimefourTv/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt deleted file mode 100644 index e301ae02..00000000 --- a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt +++ /dev/null @@ -1,220 +0,0 @@ -package com.hexated - -import com.hexated.TimefourTvExtractor.getBaseUrl -import com.hexated.TimefourTvExtractor.getLink -import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.M3u8Helper -import org.jsoup.Jsoup -import org.jsoup.nodes.Element - -open class TimefourTv : MainAPI() { - final override var mainUrl = "https://time4tv.stream" - var daddyUrl = "https://daddylivehd.com" - override var name = "Time4tv" - override val hasDownloadSupport = false - override val hasMainPage = true - private val time4tvPoster = "$mainUrl/images/logo.png" - override val supportedTypes = setOf( - TvType.Live - ) - - override val mainPage = mainPageOf( -// "$mainUrl/tv-channels" to "All Channels", -// "$mainUrl/usa-channels" to "USA Channels", -// "$mainUrl/uk-channels" to "UK Channels", -// "$mainUrl/sports-channels" to "Sport Channels", -// "$mainUrl/live-sports-streams" to "Live Sport Channels", -// "$mainUrl/news-channels" to "News Channels", -// "$mainUrl/schedule.php" to "Schedule", - "$daddyUrl/24-7-channels.php" to "DaddyHD Channels" - ) - - private fun fixDetailLink(link: String?): String? { - if (link == null) return null - return if (link.startsWith("/")) "$daddyUrl$link" else link - } - - override suspend fun getMainPage( - page: Int, - request: MainPageRequest - ): HomePageResponse { - val items = mutableListOf() - val nonPaged = request.name != "All Channels" && page <= 1 - if (nonPaged) { - val res = app.get("${request.data}.php").document - val home = res.select("div.tab-content ul li").mapNotNull { - it.toSearchResult() - } - if (home.isNotEmpty()) items.add(HomePageList(request.name, home, true)) - } - if (request.name == "All Channels") { - val res = if (page == 1) { - app.get("${request.data}.php").document - } else { - app.get("${request.data}${page.minus(1)}.php").document - } - val home = res.select("div.tab-content ul li").mapNotNull { - it.toSearchResult() - } - if (home.isNotEmpty()) items.add(HomePageList(request.name, home, true)) - } - - if (nonPaged && request.name == "DaddyHD Channels") { - val res = app.get(request.data).document - val channelDaddy = res.select("div.grid-container div.grid-item").mapNotNull { - it.toSearchDaddy() - } - if (channelDaddy.isNotEmpty()) items.add(HomePageList(request.name, channelDaddy, true)) - } - - if (nonPaged && request.name == "Schedule") { - val res = app.get(request.data).document - val schedule = res.select("div.search_p h1,div.search_p h2").mapNotNull { - it.toSearchSchedule() - } - if (schedule.isNotEmpty()) items.add(HomePageList(request.name, schedule, true)) - } - - return newHomePageResponse(items) - } - - private fun Element.toSearchDaddy(): LiveSearchResponse? { - return LiveSearchResponse( - this.select("strong").text() ?: return null, - fixDetailLink(this.select("a").attr("href")) ?: return null, - this@TimefourTv.name, - TvType.Live, - posterUrl = time4tvPoster - ) - } - - private fun Element.toSearchSchedule(): LiveSearchResponse? { - return LiveSearchResponse( - this.text() ?: return null, - this.text(), - this@TimefourTv.name, - TvType.Live, - posterUrl = time4tvPoster - ) - } - - private fun Element.toSearchResult(): LiveSearchResponse? { - return LiveSearchResponse( - this.selectFirst("div.channelName")?.text() ?: return null, - fixUrl(this.selectFirst("a")!!.attr("href")), - this@TimefourTv.name, - TvType.Live, - fixUrlNull(this.selectFirst("img")?.attr("src")), - ) - - } - - override suspend fun search(query: String): List { - val document = app.get("$daddyUrl/24-7-channels.php").document - return document.select("div.grid-container div.grid-item:contains($query)").mapNotNull { - it.toSearchDaddy() - } - } - - private suspend fun loadSchedule(url: String): LoadResponse { - val name = url.removePrefix("$mainUrl/") - val doc = app.get("$mainUrl/schedule.php").document - val episode = mutableListOf() - doc.selectFirst("div.search_p h2:contains($name)")?.nextElementSiblings()?.toString() - ?.substringBefore("")?.map { - val desc = it.substringBefore(""), "").replace("

", "") - Jsoup.parse(it).select("span").map { ele -> - val title = ele.select("a").text() - val href = ele.select("a").attr("href") - episode.add( - Episode( - href, - title, - description = desc, - posterUrl = time4tvPoster - ) - ) - } - } - - return newTvSeriesLoadResponse(name, url, TvType.TvSeries, episode) { - } - } - - override suspend fun load(url: String): LoadResponse? { - - val res = app.get(url) - daddyUrl = getBaseUrl(res.url) - if (!res.isSuccessful) return loadSchedule(url) - - val document = res.document - val title = - document.selectFirst("div.channelHeading h1")?.text() ?: document.selectFirst("title") - ?.text()?.substringBefore("HD")?.trim() ?: return null - val poster = - fixUrlNull(document.selectFirst("meta[property=\"og:image\"]")?.attr("content")) ?: time4tvPoster - val description = document.selectFirst("div.tvText")?.text() - ?: document.selectFirst("meta[name=description]")?.attr("content") ?: return null - val episodes = document.selectFirst("div.playit")?.attr("onclick")?.substringAfter("open('") - ?.substringBefore("',")?.let { link -> - val doc = app.get(link).document.selectFirst("div.tv_palyer iframe")?.attr("src") - ?.let { iframe -> - app.get(fixUrl(iframe), referer = link).document - } - if (doc?.select("div.stream_button").isNullOrEmpty()) { - doc?.select("iframe")?.mapIndexed { eps, ele -> - Episode( - fixUrl(ele.attr("src")), - "Server ${eps.plus(1)}" - ) - } - } else { - doc?.select("div.stream_button a")?.map { - Episode( - fixUrl(it.attr("href")), - it.text() - ) - } - } - } ?: listOf( - newEpisode( - document.selectFirst("div#content iframe#thatframe")?.attr("src") ?: return null - ) { - this.name = title - } - ) ?: throw ErrorLoadingException("Refresh page") - return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { - this.posterUrl = poster - this.plot = description - } - } - - override suspend fun loadLinks( - data: String, - isCasting: Boolean, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ): Boolean { - - val link = when { - data.contains("/channel") -> app.get(data).document.selectFirst("div.tv_palyer iframe") - ?.attr("src") - data.startsWith(mainUrl) -> app.get( - data, - allowRedirects = false - ).document.selectFirst("iframe")?.attr("src") - else -> data - } ?: throw ErrorLoadingException() - getLink(fixUrl(link))?.let { m3uLink -> - val url = app.get(m3uLink, referer = "$mainServer/") - M3u8Helper.generateM3u8( - this.name, - url.url, - "$mainServer/", - ).forEach(callback) - } - return true - } - -} \ No newline at end of file diff --git a/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt b/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt deleted file mode 100644 index 60c415cb..00000000 --- a/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt +++ /dev/null @@ -1,136 +0,0 @@ -package com.hexated - -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.fixUrl -import com.lagradost.cloudstream3.utils.getAndUnpack -import com.lagradost.nicehttp.NiceResponse -import java.net.URI - -var mainServer: String? = null - -object TimefourTvExtractor : TimefourTv() { - - fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" - } - } - - private suspend fun getSportLink(url: String): String? { - val iframe = app.get(url, referer = "$mainUrl/").document.select("iframe").attr("src") - .let { fixUrl(it) } - val ref = getBaseUrl(url) - val data = app.get(iframe, referer = ref).document.select("script") - .find { it.data().contains("eval(function(p,a,c,k,e,d)") }?.data() - .let { getAndUnpack(it.toString()) } - - mainServer = getBaseUrl(iframe) - - return Regex("var\\ssrc=['|\"](.*?.m3u8.*?)['|\"];").find(data)?.groupValues?.get(1) - - } - - private suspend fun getCricfreeLink(url: String, ref: String): String? { - val doc = app.get(url, referer = ref).document - val iframe = doc.select("iframe").attr("src") - val channel = iframe.split("/").last().removeSuffix(".php") - val refTwo = getBaseUrl(url) - - val docTwo = - app.get(fixUrl(iframe), referer = refTwo).document.selectFirst("script[src*=embed.]") - ?.attr("src") - val refThree = getBaseUrl(iframe) - val linkTwo = fixUrl("${docTwo?.replace(".js", ".php")}?player=desktop&live=$channel") - - val docThree = app.get( - linkTwo, - referer = "$refThree/", - ) - mainServer = getBaseUrl(linkTwo) - - val scriptData = docThree.document.selectFirst("div#player")?.nextElementSibling()?.data() - ?.substringAfterLast("return(")?.substringBefore(".join") - val link = scriptData?.removeSurrounding("[", "]")?.replace("\"", "")?.split(",") - ?.joinToString("") ?: return null - return app.get(link, referer = "$mainUrl/").url - } - - private suspend fun getFootyhunter(url: String, ref: String): String? { - val doc = app.get(url, referer = ref).document - val iframe = doc.selectFirst("iframe")?.attr("src") ?: return null - val referer = getBaseUrl(url) - val docTwo = app.get(fixUrl(iframe), referer = "$referer/").text - mainServer = getBaseUrl(iframe) - val link = Regex("""source:['|"](\S+.m3u8)['|"],""").find(docTwo)?.groupValues?.getOrNull(1) - ?: return null - return app.get(link, referer = "$mainUrl/").url - } - - suspend fun getLink(url: String): String? { - - if (url.contains("sportzonline") || url.contains("sportsonline")) { - return getSportLink(url) - } - - val daddyHost = daddyUrl.getHost() - - if(url.contains(daddyHost, true)) { - mainServer = getBaseUrl(url) - return getFinalLink(app.get(url, referer = daddyUrl)) - } - - val (channel, iframe) = if (url.contains("width=") || url.contains("/link")) { - val doc = app.get(url, referer = "$mainUrl/").document - val tempIframe = doc.selectFirst("iframe")?.attr("src") ?: return null - - if (tempIframe.contains("cricfree")) { - return getCricfreeLink(tempIframe, getBaseUrl(url)) - } - if (tempIframe.contains("footyhunter")) { - return getFootyhunter(tempIframe, getBaseUrl(url)) - } - - val doctwo = app.get(fixUrl(tempIframe), referer = url).text - listOf( - tempIframe.split("?").last().removePrefix("id=").replace(".php", ""), - doctwo.substringAfterLast("