diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..8ba407a582 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,5 @@ +# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +github : keyiflerolsun +buy_me_a_coffee : keyiflerolsun +custom : ["https://keyiflerolsun.me/Kahve"] \ No newline at end of file diff --git a/.github/icons/KisaKod.png b/.github/icons/KisaKod.png new file mode 100644 index 0000000000..5a4a46c1d8 Binary files /dev/null and b/.github/icons/KisaKod.png differ diff --git a/.github/icons/MiBox/ADB.jpg b/.github/icons/MiBox/ADB.jpg new file mode 100644 index 0000000000..2b89e13cc9 Binary files /dev/null and b/.github/icons/MiBox/ADB.jpg differ diff --git a/.github/icons/MiBox/Animasyon.jpg b/.github/icons/MiBox/Animasyon.jpg new file mode 100644 index 0000000000..73d1c1dd6e Binary files /dev/null and b/.github/icons/MiBox/Animasyon.jpg differ diff --git a/.github/icons/MiBox/AppControl.jpg b/.github/icons/MiBox/AppControl.jpg new file mode 100644 index 0000000000..31cc06e134 Binary files /dev/null and b/.github/icons/MiBox/AppControl.jpg differ diff --git a/.github/icons/MiBox/Downloader.png b/.github/icons/MiBox/Downloader.png new file mode 100644 index 0000000000..3986bc7d58 Binary files /dev/null and b/.github/icons/MiBox/Downloader.png differ diff --git a/.github/icons/MiBox/Gelistirici.jpg b/.github/icons/MiBox/Gelistirici.jpg new file mode 100644 index 0000000000..cf64ce67d4 Binary files /dev/null and b/.github/icons/MiBox/Gelistirici.jpg differ diff --git a/.github/icons/MiBox/PlayStore.png b/.github/icons/MiBox/PlayStore.png new file mode 100644 index 0000000000..739d01d4c3 Binary files /dev/null and b/.github/icons/MiBox/PlayStore.png differ diff --git a/.github/icons/MiBox/Sonuc.png b/.github/icons/MiBox/Sonuc.png new file mode 100644 index 0000000000..30d207b326 Binary files /dev/null and b/.github/icons/MiBox/Sonuc.png differ diff --git a/.github/icons/MiBox/Uygulama.jpg b/.github/icons/MiBox/Uygulama.jpg new file mode 100644 index 0000000000..1155c4af1f Binary files /dev/null and b/.github/icons/MiBox/Uygulama.jpg differ diff --git a/.github/icons/Repo.jpg b/.github/icons/Repo.jpg new file mode 100644 index 0000000000..3142ab2a00 Binary files /dev/null and b/.github/icons/Repo.jpg differ diff --git a/.github/workflows/Derleyici.yml b/.github/workflows/Derleyici.yml new file mode 100644 index 0000000000..70c38f0af5 --- /dev/null +++ b/.github/workflows/Derleyici.yml @@ -0,0 +1,62 @@ +# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. +name: CloudStream Derleyici + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +on: + workflow_dispatch: + push: + branches: + - master + paths-ignore: + - "**/*.md" + - "**/*.yml" + - "**/*.jpg" + - "**/*.png" + - "**/*.py" + +jobs: + CloudStreamDerleyici: + runs-on: ubuntu-latest + steps: + - name: "'src' Depo Kontrolü" + uses: actions/checkout@v4.2.2 + with: + path: "src" + + - name: "'build' Depo Kontrolü" + uses: actions/checkout@v4.2.2 + with: + ref: "builds" + path: "builds" + + - name: Eski Derlemeleri Temizle + run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true + + - name: JDK 17 Ayarla + uses: actions/setup-java@v4.6.0 + with: + distribution: adopt + java-version: 17 + + - name: Android SDK Ayarla + uses: android-actions/setup-android@v3.2.2 + + - name: Eklentileri Derle + run: | + cd $GITHUB_WORKSPACE/src + chmod +x gradlew + ./gradlew make makePluginsJson + cp **/build/*.cs3 $GITHUB_WORKSPACE/builds + cp build/plugins.json $GITHUB_WORKSPACE/builds + + # - name: Derlemeleri Yükle + # run: | + # cd $GITHUB_WORKSPACE/builds + # git config --local user.email "actions@github.com" + # git config --local user.name "GitHub Actions" + # git add . + # git commit --amend -m "$GITHUB_SHA 'nın Derlenmesi" || exit 0 # eğer commit edilecek bir şey yoksa hata verme + # git push --force \ No newline at end of file diff --git a/.github/workflows/Kontrol.yml b/.github/workflows/Kontrol.yml new file mode 100644 index 0000000000..22e8e65f93 --- /dev/null +++ b/.github/workflows/Kontrol.yml @@ -0,0 +1,80 @@ +# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +name: Domain Değişiklik Kontrolü + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +on: + workflow_dispatch: + schedule: + - cron: 11 */9 * * * + +jobs: + DomainKontrol: + #runs-on: ubuntu-latest + runs-on: self-hosted + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO_OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + + permissions: + contents: write + pull-requests: write + + steps: + - name : Depo Kontrolü + uses : actions/checkout@v4 + + - name : Python 3.11.8 Yükle + uses : actions/setup-python@v5 + with : + python-version: 3.11.8 + + - name : Python Sürümünü Göster + run : python -c "import sys; print(sys.version)" + + - name : Gereksinimleri Yükle + run : | + python -m pip install --upgrade pip + pip install -U setuptools wheel Kekik cloudscraper pycryptodome + + - name : Betiği Çalıştır + run : | + python KONTROL.py + + - name : Değişiklik Kontrolü + id : degisiklik_kontrol + run : | + git diff --quiet . || echo "degisiklik=true" >> $GITHUB_OUTPUT || true + + - name : Pull Request Oluştur + if : steps.degisiklik_kontrol.outputs.degisiklik == 'true' + run : | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + git add -A + + git commit --author="keyiflerolsun " \ + -m "♻️ Domain Değişikliği" \ + -m "🔄 Otomatik domain güncellemeleri yapıldı." + BRANCH="domain-degisikligi" + + git checkout -B $BRANCH + git push origin $BRANCH --force + + curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/pulls \ + -d @- < - \ No newline at end of file + \ No newline at end of file diff --git a/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciX.kt b/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciX.kt new file mode 100644 index 0000000000..d222dc6322 --- /dev/null +++ b/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciX.kt @@ -0,0 +1,122 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class AnimeciX : MainAPI() { + override var mainUrl = "https://anm.cx" + override var name = "AnimeciX" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Anime) + + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + override var sequentialMainPageDelay = 200L // ? 0.20 saniye + override var sequentialMainPageScrollDelay = 200L // ? 0.20 saniye + + override val mainPage = mainPageOf( + "${mainUrl}/secure/titles?type=series&onlyStreamable=true" to "Seriler", + "${mainUrl}/secure/titles?type=movie&onlyStreamable=true" to "Filmler", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val response = app.get( + "${request.data}&page=${page}&perPage=16", + headers = mapOf( + "x-e-h" to "7Y2ozlO+QysR5w9Q6Tupmtvl9jJp7ThFH8SB+Lo7NvZjgjqRSqOgcT2v4ISM9sP10LmnlYI8WQ==.xrlyOBFS5BHjQ2Lk" + ) + ).parsedSafe() + + val home = response?.pagination?.data?.map { anime -> + newAnimeSearchResponse( + anime.title, + "${mainUrl}/secure/titles/${anime.id}?titleId=${anime.id}", + TvType.Anime + ) { + this.posterUrl = fixUrlNull(anime.poster) + } + } ?: listOf() + + return newHomePageResponse(request.name, home) + } + + override suspend fun search(query: String): List { + val response = app.get("${mainUrl}/secure/search/${query}?limit=20").parsedSafe() ?: return listOf() + + return response.results.map { anime -> + newAnimeSearchResponse( + anime.title, + "${mainUrl}/secure/titles/${anime.id}?titleId=${anime.id}", + TvType.Anime + ) { + this.posterUrl = fixUrlNull(anime.poster) + } + } + } + + override suspend fun quickSearch(query: String): List = search(query) + + override suspend fun load(url: String): LoadResponse? { + val response = app.get( + url, + headers = mapOf( + "x-e-h" to "7Y2ozlO+QysR5w9Q6Tupmtvl9jJp7ThFH8SB+Lo7NvZjgjqRSqOgcT2v4ISM9sP10LmnlYI8WQ==.xrlyOBFS5BHjQ2Lk" + ) + ).parsedSafe() ?: return null + val episodes = mutableListOf<Episode>() + val titleId = url.substringAfter("?titleId=") + + if (response.title.titleType == "anime") { + for (sezon in response.title.seasons) { + val sezonResponse = app.get("${mainUrl}/secure/related-videos?episode=1&season=${sezon.number}&videoId=0&titleId=${titleId}").parsedSafe<TitleVideos>() ?: return null + for (video in sezonResponse.videos) { + episodes.add(newEpisode(video.url) { + this.name = "${video.seasonNum}. Sezon ${video.episodeNum}. Bölüm" + this.season = video.seasonNum + this.episode = video.episodeNum + }) + } + } + } else { + if (response.title.videos.isNotEmpty()) { + episodes.add(newEpisode(response.title.videos.first().url) { + this.name = "Filmi İzle" + this.season = 1 + this.episode = 1 + }) + } + } + + + return newTvSeriesLoadResponse( + response.title.title, + "${mainUrl}/secure/titles/${response.title.id}?titleId=${response.title.id}", + TvType.Anime, + episodes + ) { + this.posterUrl = fixUrlNull(response.title.poster) + this.year = response.title.year + this.plot = response.title.description + this.tags = response.title.tags.map { it.name } + this.rating = response.title.rating.toRatingInt() + addActors(response.title.actors.map { Actor(it.name, fixUrlNull(it.poster)) }) + addTrailer(response.title.trailer) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("ACX", "data » $data") + val iframeLink = app.get("${mainUrl}/${data}", referer="${mainUrl}/").url + Log.d("ACX", "iframeLink » $iframeLink") + + loadExtractor(iframeLink, "${mainUrl}/", subtitleCallback, callback) + + return true + } +} \ No newline at end of file diff --git a/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciXModels.kt b/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciXModels.kt new file mode 100644 index 0000000000..cc48a1d3ec --- /dev/null +++ b/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciXModels.kt @@ -0,0 +1,70 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class Category( + @JsonProperty("pagination") val pagination: Pagination, +) + +data class Search( + @JsonProperty("results") val results: List<AnimeSearch>, +) + +data class Title( + @JsonProperty("title") val title: Anime, +) + +data class Pagination( + @JsonProperty("current_page") val currentPage: Int, + @JsonProperty("last_page") val lastPage: Int, + @JsonProperty("per_page") val perPage: Int, + @JsonProperty("data") val data: List<AnimeSearch>, + @JsonProperty("total") val total: Int, +) + +data class AnimeSearch( + @JsonProperty("id") val id: Int, + @JsonProperty("title_type") val titleType: String, + @JsonProperty("name") val title: String, + @JsonProperty("poster") val poster: String?, +) + +data class Anime( + @JsonProperty("id") val id: Int, + @JsonProperty("title_type") val titleType: String, + @JsonProperty("name") val title: String, + @JsonProperty("poster") val poster: String, + @JsonProperty("description") val description: String, + @JsonProperty("year") val year: Int?, + @JsonProperty("mal_vote_average") val rating: String?, + @JsonProperty("genres") val tags: List<Genre>, + @JsonProperty("trailer") val trailer: String?, + @JsonProperty("credits") val actors: List<Credit>, + @JsonProperty("season_count") val seasonCount: Int, //Unrealiable? + @JsonProperty("seasons") val seasons: List<Season>, + @JsonProperty("videos") val videos: List<Video> +) + +data class Genre( + @JsonProperty("display_name") val name: String, +) + +data class Credit( + @JsonProperty("name") val name: String, + @JsonProperty("poster") val poster: String?, +) + +data class Video( + @JsonProperty("episode_num") val episodeNum: Int?, + @JsonProperty("season_num") val seasonNum: Int?, + @JsonProperty("url") val url: String, +) + +data class TitleVideos( + @JsonProperty("videos") val videos: List<Video> +) + +data class Season(@JsonProperty("number") val number: Int) \ No newline at end of file diff --git a/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciXPlugin.kt b/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciXPlugin.kt new file mode 100644 index 0000000000..746af96884 --- /dev/null +++ b/AnimeciX/src/main/kotlin/com/keyiflerolsun/AnimeciXPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class AnimeciXPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(AnimeciX()) + registerExtractorAPI(TauVideo()) + } +} \ No newline at end of file diff --git a/AnimeciX/src/main/kotlin/com/keyiflerolsun/TauVideoExtractor.kt b/AnimeciX/src/main/kotlin/com/keyiflerolsun/TauVideoExtractor.kt new file mode 100644 index 0000000000..cc143b926a --- /dev/null +++ b/AnimeciX/src/main/kotlin/com/keyiflerolsun/TauVideoExtractor.kt @@ -0,0 +1,45 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class TauVideo : ExtractorApi() { + override val name = "TauVideo" + override val mainUrl = "https://tau-video.xyz" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val videoKey = url.split("/").last() + val videoUrl = "${mainUrl}/api/video/${videoKey}" + Log.d("Kekik_${this.name}", "videoUrl » $videoUrl") + + val api = app.get(videoUrl).parsedSafe<TauVideoUrls>() ?: throw ErrorLoadingException("TauVideo") + + for (video in api.urls) { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = video.url, + referer = extRef, + quality = getQualityFromName(video.label), + type = INFER_TYPE + ) + ) + } + } + + data class TauVideoUrls( + @JsonProperty("urls") val urls: List<TauVideoData> + ) + + data class TauVideoData( + @JsonProperty("url") val url: String, + @JsonProperty("label") val label: String, + ) +} \ No newline at end of file diff --git a/BelgeselX/build.gradle.kts b/BelgeselX/build.gradle.kts new file mode 100644 index 0000000000..d1b5ede436 --- /dev/null +++ b/BelgeselX/build.gradle.kts @@ -0,0 +1,18 @@ +version = 4 + +cloudstream { + authors = listOf("keyiflerolsun", "JustRelaxable") + language = "tr" + description = "En yeni belgeseller, türkçe altyazılı yada dublaj olarak 1080p kalitesinde HD belgesel izle." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Documentary") + iconUrl = "https://www.google.com/s2/favicons?domain=belgeselx.com&sz=%size%" +} \ No newline at end of file diff --git a/BelgeselX/src/main/AndroidManifest.xml b/BelgeselX/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/BelgeselX/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/BelgeselX/src/main/kotlin/com/keyiflerolsun/BelgeselX.kt b/BelgeselX/src/main/kotlin/com/keyiflerolsun/BelgeselX.kt new file mode 100644 index 0000000000..b7d027ca2d --- /dev/null +++ b/BelgeselX/src/main/kotlin/com/keyiflerolsun/BelgeselX.kt @@ -0,0 +1,172 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import java.util.Locale +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class BelgeselX : MainAPI() { + override var mainUrl = "https://belgeselx.com" + override var name = "BelgeselX" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Documentary) + + override val mainPage = mainPageOf( + "${mainUrl}/konu/turk-tarihi-belgeselleri&page=" to "Türk Tarihi", + "${mainUrl}/konu/tarih-belgeselleri&page=" to "Tarih", + "${mainUrl}/konu/seyehat-belgeselleri&page=" to "Seyahat", + "${mainUrl}/konu/seri-belgeseller&page=" to "Seri", + "${mainUrl}/konu/savas-belgeselleri&page=" to "Savaş", + "${mainUrl}/konu/sanat-belgeselleri&page=" to "Sanat", + "${mainUrl}/konu/psikoloji-belgeselleri&page=" to "Psikoloji", + "${mainUrl}/konu/polisiye-belgeselleri&page=" to "Polisiye", + "${mainUrl}/konu/otomobil-belgeselleri&page=" to "Otomobil", + "${mainUrl}/konu/nazi-belgeselleri&page=" to "Nazi", + "${mainUrl}/konu/muhendislik-belgeselleri&page=" to "Mühendislik", + "${mainUrl}/konu/kultur-din-belgeselleri&page=" to "Kültür Din", + "${mainUrl}/konu/kozmik-belgeseller&page=" to "Kozmik", + "${mainUrl}/konu/hayvan-belgeselleri&page=" to "Hayvan", + "${mainUrl}/konu/eski-tarih-belgeselleri&page=" to "Eski Tarih", + "${mainUrl}/konu/egitim-belgeselleri&page=" to "Eğitim", + "${mainUrl}/konu/dunya-belgeselleri&page=" to "Dünya", + "${mainUrl}/konu/doga-belgeselleri&page=" to "Doğa", + "${mainUrl}/konu/bilim-belgeselleri&page=" to "Bilim" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.gen-movie-contain").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun String.toTitleCase(): String { + val locale = Locale("tr", "TR") + return this.split(" ").joinToString(" ") { word -> + word.lowercase(locale).replaceFirstChar { if (it.isLowerCase()) it.titlecase(locale) else it.toString() } + } + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("h3 a")?.text()?.trim()?.toTitleCase() ?: return null + val href = fixUrlNull(this.selectFirst("h3 a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.Documentary) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val cx = "016376594590146270301:iwmy65ijgrm" // ! Might change in the future + + val tokenResponse = app.get("https://cse.google.com/cse.js?cx=${cx}") + val cseLibVersion = Regex("""cselibVersion": "(.*)"""").find(tokenResponse.text)?.groupValues?.get(1) + val cseToken = Regex("""cse_token": "(.*)"""").find(tokenResponse.text)?.groupValues?.get(1) + + val response = app.get("https://cse.google.com/cse/element/v1?rsz=filtered_cse&num=100&hl=tr&source=gcsc&cselibv=${cseLibVersion}&cx=${cx}&q=${query}&safe=off&cse_tok=${cseToken}&oq=${query}&callback=google.search.cse.api9969&rurl=https%3A%2F%2Fbelgeselx.com%2F") + Log.d("BLX","Search result: ${response.text}") + + val titles = Regex(""""titleNoFormatting": "(.*)"""").findAll(response.text).map { it.groupValues[1] }.toList() + val urls = Regex(""""url": "(.*)"""").findAll(response.text).map { it.groupValues[1] }.toList() + val posterUrls = Regex(""""ogImage": "(.*)"""").findAll(response.text).map { it.groupValues[1] }.toList() + + val searchResponses = mutableListOf<TvSeriesSearchResponse>() + + for (i in titles.indices) { + val title = titles[i].split("İzle")[0].trim().toTitleCase() + val url = urls.getOrNull(i) ?: continue + val posterUrl = posterUrls.getOrNull(i) ?: continue + + if(!url.contains("belgeseldizi")) continue + searchResponses.add(newTvSeriesSearchResponse(title,url,TvType.Documentary) { + this.posterUrl = posterUrl + }) + } + + return searchResponses + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h2.gen-title")?.text()?.trim()?.toTitleCase() ?: return null + val poster = fixUrlNull(document.selectFirst("div.gen-tv-show-top img")?.attr("src")) ?: return null + val description = document.selectFirst("div.gen-single-tv-show-info p")?.text()?.trim() + val tags = document.select("div.gen-socail-share a[href*='belgeselkanali']").map { it.attr("href").split("/").last().replace("-", " ").toTitleCase() } + + var counter = 0 + val episodes = document.select("div.gen-movie-contain").mapNotNull { + val epName = it.selectFirst("div.gen-movie-info h3 a")?.text()?.trim() ?: return@mapNotNull null + val epHref = fixUrlNull(it.selectFirst("div.gen-movie-info h3 a")?.attr("href")) ?: return@mapNotNull null + + val seasonName = it.selectFirst("div.gen-single-meta-holder ul li")?.text()?.trim() ?: "" + var epEpisode = Regex("""Bölüm (\d+)""").find(seasonName)?.groupValues?.get(1)?.toIntOrNull() ?: 0 + val epSeason = Regex("""Sezon (\d+)""").find(seasonName)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + if (epEpisode == 0) { + epEpisode = counter++ + } + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.Documentary, episodes) { + this.posterUrl = poster + this.plot = description + this.tags = tags + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("BLX", "data » $data") + val source = app.get(data) + + Regex("""<iframe\s+[^>]*src=\\"([^\\"']+)\\"""").findAll(source.text).forEach { alternatifUrlMatchResult -> + val alternatifUrl = alternatifUrlMatchResult.groupValues[1] + Log.d("BLX", "alternatifUrl » $alternatifUrl") + val alternatifResp = app.get(alternatifUrl, referer=data) + + if (alternatifUrl.contains("new4.php")) { + Regex("""file:"([^"]+)", label: "([^"]+)""").findAll(alternatifResp.text).forEach { + var thisName = this.name + val videoUrl = it.groupValues[1] + var quality = it.groupValues[2] + if (quality == "FULL") { + quality = "1080p" + thisName = "Google" + } + Log.d("BLX", "quality » $quality") + Log.d("BLX", "videoUrl » $videoUrl") + + callback.invoke( + ExtractorLink( + source = thisName, + name = thisName, + url = videoUrl, + referer = data, + quality = getQualityFromName(quality), + type = INFER_TYPE + ) + ) + } + } else { + val iframe = fixUrlNull(alternatifResp.document.selectFirst("iframe")?.attr("src")) ?: return@forEach + Log.d("BLX", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + } + + return true + } +} diff --git a/BelgeselX/src/main/kotlin/com/keyiflerolsun/BelgeselXPlugin.kt b/BelgeselX/src/main/kotlin/com/keyiflerolsun/BelgeselXPlugin.kt new file mode 100644 index 0000000000..02374d82b8 --- /dev/null +++ b/BelgeselX/src/main/kotlin/com/keyiflerolsun/BelgeselXPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class BelgeselXPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(BelgeselX()) + registerExtractorAPI(Odnoklassniki()) + } +} \ No newline at end of file diff --git a/BelgeselX/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt b/BelgeselX/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt new file mode 100644 index 0000000000..8253f0d315 --- /dev/null +++ b/BelgeselX/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt @@ -0,0 +1,60 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class Odnoklassniki : ExtractorApi() { + override val name = "Odnoklassniki" + override val mainUrl = "https://odnoklassniki.ru" + override val requiresReferer = false + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + Log.d("Kekik_${this.name}", "url » $url") + + val userAgent = mapOf("User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36") + + val videoReq = app.get(url, headers=userAgent).text.replace("\\"", "\"").replace("\\\\", "\\") + .replace(Regex("\\\\u([0-9A-Fa-f]{4})")) { matchResult -> + Integer.parseInt(matchResult.groupValues[1], 16).toChar().toString() + } + val videosStr = Regex(""""videos":(\[[^]]*])""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("Video not found") + val videos = AppUtils.tryParseJson<List<OkRuVideo>>(videosStr) ?: throw ErrorLoadingException("Video not found") + + for (video in videos) { + Log.d("Kekik_${this.name}", "video » $video") + + val videoUrl = if (video.url.startsWith("//")) "https:${video.url}" else video.url + + val quality = video.name.uppercase() + .replace("MOBILE", "144p") + .replace("LOWEST", "240p") + .replace("LOW", "360p") + .replace("SD", "480p") + .replace("HD", "720p") + .replace("FULL", "1080p") + .replace("QUAD", "1440p") + .replace("ULTRA", "4k") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = videoUrl, + referer = url, + quality = getQualityFromName(quality), + headers = userAgent, + isM3u8 = false + ) + ) + } + } + + data class OkRuVideo( + @JsonProperty("name") val name: String, + @JsonProperty("url") val url: String, + ) +} diff --git a/BelgeselX/src/main/kotlin/com/keyiflerolsun/bakalim.py b/BelgeselX/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..b51d7687c0 --- /dev/null +++ b/BelgeselX/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,24 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from requests import get +from parsel import Selector +from re import findall, search + +bolum_lik = "https://belgeselx.com/belgesel/cifte-hayatlara-onculuk-etmek-aciklanamayanlar-william-shatner" +istek = get(bolum_lik) + +alternatifler = findall(r"""<iframe\s+[^>]*src=\\\"([^\\\"']+)\\\"""", istek.text) +konsol.print(alternatifler) + +for alternatif in alternatifler: + iframe_istek = get(alternatif, headers={"Referer": bolum_lik}) + + if "new4.php" in alternatif: + for kaynak in findall(r"""file:\"([^\"]+)\", label: \"([^\"]+)""", iframe_istek.text): + video_url = kaynak[0] + quality = kaynak[1] + konsol.print(f"video_url » {video_url}\nquality » {quality}\n-------\n") + else: + secici = Selector(iframe_istek.text) + konsol.print(secici.css("iframe::attr(src)").get()) \ No newline at end of file diff --git a/CanliTV/build.gradle.kts b/CanliTV/build.gradle.kts new file mode 100644 index 0000000000..4d2b621b9b --- /dev/null +++ b/CanliTV/build.gradle.kts @@ -0,0 +1,18 @@ +version = 4 + +cloudstream { + authors = listOf("Adippe", "keyiflerolsun") + language = "tr" + description = "Canlı TV" + + /** + * 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=tr.canlitv.team&sz=%size%" +} diff --git a/CanliTV/src/main/AndroidManifest.xml b/CanliTV/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/CanliTV/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/CanliTV/src/main/kotlin/com/keyiflerolsun/CanliTV.kt b/CanliTV/src/main/kotlin/com/keyiflerolsun/CanliTV.kt new file mode 100644 index 0000000000..bb5cb3149c --- /dev/null +++ b/CanliTV/src/main/kotlin/com/keyiflerolsun/CanliTV.kt @@ -0,0 +1,375 @@ +// ! https://codeberg.org/cloudstream/cloudstream-extensions-multilingual/src/branch/master/FreeTVProvider/src/main/kotlin/com/lagradost/FreeTVProvider.kt + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.utils.AppUtils.parseJson +import com.lagradost.cloudstream3.utils.AppUtils.toJson +import java.io.InputStream + +class CanliTV : MainAPI() { + override var mainUrl = "https://raw.githubusercontent.com/keyiflerolsun/IPTV_YenirMi/main/Kanallar/KekikAkademi.m3u" + override var name = "CanliTV" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val hasDownloadSupport = false + override val supportedTypes = setOf(TvType.Live) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val kanallar = IptvPlaylistParser().parseM3U(app.get(mainUrl).text) + + return newHomePageResponse( + kanallar.items.groupBy { it.attributes["group-title"] }.map { group -> + val title = group.key ?: "" + val show = group.value.map { kanal -> + val streamurl = kanal.url.toString() + val channelname = kanal.title.toString() + val posterurl = kanal.attributes["tvg-logo"].toString() + val chGroup = kanal.attributes["group-title"].toString() + val nation = kanal.attributes["tvg-country"].toString() + + newLiveSearchResponse( + channelname, + LoadData(streamurl, channelname, posterurl, chGroup, nation).toJson(), + type = TvType.Live + ) { + this.posterUrl = posterurl + this.lang = nation + } + } + + + HomePageList(title, show, isHorizontalImages = true) + }, + hasNext = false + ) + } + + override suspend fun search(query: String): List<SearchResponse> { + val kanallar = IptvPlaylistParser().parseM3U(app.get(mainUrl).text) + + return kanallar.items.filter { it.title.toString().lowercase().contains(query.lowercase()) }.map { kanal -> + val streamurl = kanal.url.toString() + val channelname = kanal.title.toString() + val posterurl = kanal.attributes["tvg-logo"].toString() + val chGroup = kanal.attributes["group-title"].toString() + val nation = kanal.attributes["tvg-country"].toString() + + newLiveSearchResponse( + channelname, + LoadData(streamurl, channelname, posterurl, chGroup, nation).toJson(), + type = TvType.Live + ) { + this.posterUrl = posterurl + this.lang = nation + } + + } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse { + val loadData = fetchDataFromUrlOrJson(url) + val nation:String = if (loadData.group == "NSFW") { + "⚠️🔞🔞🔞 » ${loadData.group} | ${loadData.nation} « 🔞🔞🔞⚠️" + } else { + "» ${loadData.group} | ${loadData.nation} «" + } + + val kanallar = IptvPlaylistParser().parseM3U(app.get(mainUrl).text) + val recommendations = mutableListOf<LiveSearchResponse>() + + for (kanal in kanallar.items) { + if (kanal.attributes["group-title"].toString() == loadData.group) { + val rcStreamUrl = kanal.url.toString() + val rcChannelName = kanal.title.toString() + if (rcChannelName == loadData.title) continue + + val rcPosterUrl = kanal.attributes["tvg-logo"].toString() + val rcChGroup = kanal.attributes["group-title"].toString() + val rcNation = kanal.attributes["tvg-country"].toString() + + recommendations.add(newLiveSearchResponse( + rcChannelName, + LoadData(rcStreamUrl, rcChannelName, rcPosterUrl, rcChGroup, rcNation).toJson(), + type = TvType.Live + ) { + this.posterUrl = rcPosterUrl + this.lang = rcNation + }) + + } + } + + return newLiveStreamLoadResponse(loadData.title, loadData.url, url) { + this.posterUrl = loadData.poster + this.plot = nation + this.tags = listOf(loadData.group, loadData.nation) + this.recommendations = recommendations + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + val loadData = fetchDataFromUrlOrJson(data) + Log.d("IPTV", "loadData » $loadData") + + val kanallar = IptvPlaylistParser().parseM3U(app.get(mainUrl).text) + val kanal = kanallar.items.first { it.url == loadData.url } + Log.d("IPTV", "kanal » $kanal") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = loadData.url, + headers = kanal.headers, + referer = kanal.headers["referrer"] ?: "", + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + + return true + } + + data class LoadData(val url: String, val title: String, val poster: String, val group: String, val nation: String) + + private suspend fun fetchDataFromUrlOrJson(data: String): LoadData { + if (data.startsWith("{")) { + return parseJson<LoadData>(data) + } else { + val kanallar = IptvPlaylistParser().parseM3U(app.get(mainUrl).text) + val kanal = kanallar.items.first { it.url == data } + + val streamurl = kanal.url.toString() + val channelname = kanal.title.toString() + val posterurl = kanal.attributes["tvg-logo"].toString() + val chGroup = kanal.attributes["group-title"].toString() + val nation = kanal.attributes["tvg-country"].toString() + + return LoadData(streamurl, channelname, posterurl, chGroup, nation) + } + } +} + +data class Playlist( + val items: List<PlaylistItem> = emptyList() +) + +data class PlaylistItem( + val title: String? = null, + val attributes: Map<String, String> = emptyMap(), + val headers: Map<String, String> = emptyMap(), + val url: String? = null, + val userAgent: String? = null +) + +class IptvPlaylistParser { + + /** + * Parse M3U8 string into [Playlist] + * + * @param content M3U8 content string. + * @throws PlaylistParserException if an error occurs. + */ + fun parseM3U(content: String): Playlist { + return parseM3U(content.byteInputStream()) + } + + /** + * Parse M3U8 content [InputStream] into [Playlist] + * + * @param input Stream of input data. + * @throws PlaylistParserException if an error occurs. + */ + @Throws(PlaylistParserException::class) + fun parseM3U(input: InputStream): Playlist { + val reader = input.bufferedReader() + + if (!reader.readLine().isExtendedM3u()) { + throw PlaylistParserException.InvalidHeader() + } + + val playlistItems: MutableList<PlaylistItem> = mutableListOf() + var currentIndex = 0 + + var line: String? = reader.readLine() + + while (line != null) { + if (line.isNotEmpty()) { + if (line.startsWith(EXT_INF)) { + val title = line.getTitle() + val attributes = line.getAttributes() + + playlistItems.add(PlaylistItem(title, attributes)) + } else if (line.startsWith(EXT_VLC_OPT)) { + val item = playlistItems[currentIndex] + val userAgent = item.userAgent ?: line.getTagValue("http-user-agent") + val referrer = line.getTagValue("http-referrer") + + val headers = mutableMapOf<String, String>() + + if (userAgent != null) { + headers["user-agent"] = userAgent + } + + if (referrer != null) { + headers["referrer"] = referrer + } + + playlistItems[currentIndex] = item.copy( + userAgent = userAgent, + headers = headers + ) + } else { + if (!line.startsWith("#")) { + val item = playlistItems[currentIndex] + val url = line.getUrl() + val userAgent = line.getUrlParameter("user-agent") + val referrer = line.getUrlParameter("referer") + val urlHeaders = if (referrer != null) {item.headers + mapOf("referrer" to referrer)} else item.headers + + playlistItems[currentIndex] = item.copy( + url = url, + headers = item.headers + urlHeaders, + userAgent = userAgent ?: item.userAgent + ) + currentIndex++ + } + } + } + + line = reader.readLine() + } + return Playlist(playlistItems) + } + + /** Replace "" (quotes) from given string. */ + private fun String.replaceQuotesAndTrim(): String { + return replace("\"", "").trim() + } + + /** Check if given content is valid M3U8 playlist. */ + private fun String.isExtendedM3u(): Boolean = startsWith(EXT_M3U) + + /** + * Get title of media. + * + * Example:- + * + * Input: + * ``` + * #EXTINF:-1 tvg-id="1234" group-title="Kids" tvg-logo="url/to/logo", Title + * ``` + * + * Result: Title + */ + private fun String.getTitle(): String? { + return split(",").lastOrNull()?.replaceQuotesAndTrim() + } + + /** + * Get media url. + * + * Example:- + * + * Input: + * ``` + * https://example.com/sample.m3u8|user-agent="Custom" + * ``` + * + * Result: https://example.com/sample.m3u8 + */ + private fun String.getUrl(): String? { + return split("|").firstOrNull()?.replaceQuotesAndTrim() + } + + /** + * Get url parameter with key. + * + * Example:- + * + * Input: + * ``` + * http://192.54.104.122:8080/d/abcdef/video.mp4|User-Agent=Mozilla&Referer=CustomReferrer + * ``` + * + * If given key is `user-agent`, then + * + * Result: Mozilla + */ + private fun String.getUrlParameter(key: String): String? { + val urlRegex = Regex("^(.*)\\|", RegexOption.IGNORE_CASE) + val keyRegex = Regex("$key=(\\w[^&]*)", RegexOption.IGNORE_CASE) + val paramsString = replace(urlRegex, "").replaceQuotesAndTrim() + + return keyRegex.find(paramsString)?.groups?.get(1)?.value + } + + /** + * Get attributes from `#EXTINF` tag as Map<String, String>. + * + * Example:- + * + * Input: + * ``` + * #EXTINF:-1 tvg-id="1234" group-title="Kids" tvg-logo="url/to/logo", Title + * ``` + * + * Result will be equivalent to kotlin map: + * ```Kotlin + * mapOf( + * "tvg-id" to "1234", + * "group-title" to "Kids", + * "tvg-logo" to "url/to/logo" + * ) + * ``` + */ + private fun String.getAttributes(): Map<String, String> { + val extInfRegex = Regex("(#EXTINF:.?[0-9]+)", RegexOption.IGNORE_CASE) + val attributesString = replace(extInfRegex, "").replaceQuotesAndTrim().split(",").first() + + return attributesString + .split(Regex("\\s")) + .mapNotNull { + val pair = it.split("=") + if (pair.size == 2) pair.first() to pair.last().replaceQuotesAndTrim() else null + } + .toMap() + } + + /** + * Get value from a tag. + * + * Example:- + * + * Input: + * ``` + * #EXTVLCOPT:http-referrer=http://example.com/ + * ``` + * + * Result: http://example.com/ + */ + private fun String.getTagValue(key: String): String? { + val keyRegex = Regex("$key=(.*)", RegexOption.IGNORE_CASE) + + return keyRegex.find(this)?.groups?.get(1)?.value?.replaceQuotesAndTrim() + } + + companion object { + const val EXT_M3U = "#EXTM3U" + const val EXT_INF = "#EXTINF" + const val EXT_VLC_OPT = "#EXTVLCOPT" + } +} + +/** Exception thrown when an error occurs while parsing playlist. */ +sealed class PlaylistParserException(message: String) : Exception(message) { + + /** Exception thrown if given file content is not valid. */ + class InvalidHeader : PlaylistParserException("Invalid file header. Header doesn't start with #EXTM3U") +} diff --git a/CanliTV/src/main/kotlin/com/keyiflerolsun/CanliTVPlugin.kt b/CanliTV/src/main/kotlin/com/keyiflerolsun/CanliTVPlugin.kt new file mode 100644 index 0000000000..4ecbcc0195 --- /dev/null +++ b/CanliTV/src/main/kotlin/com/keyiflerolsun/CanliTVPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class CanliTVPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(CanliTV()) + } +} \ No newline at end of file diff --git a/CizgiMax/build.gradle.kts b/CizgiMax/build.gradle.kts new file mode 100644 index 0000000000..ff78a63ca1 --- /dev/null +++ b/CizgiMax/build.gradle.kts @@ -0,0 +1,18 @@ +version = 5 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "ÇizgiMax ile Çizgi Film izlemek artık daha kolay, donmadan full hd ve reklamsız bir sitedir, içerisinde 700 den fazla çizgi film olan, Bu site bu işi profesyonelce yapıyor." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Cartoon") + iconUrl = "https://www.google.com/s2/favicons?domain=cizgimax.online&sz=%size%" +} \ No newline at end of file diff --git a/CizgiMax/src/main/AndroidManifest.xml b/CizgiMax/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/CizgiMax/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiDuoExtractor.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiDuoExtractor.kt new file mode 100644 index 0000000000..8e5fa1b56a --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiDuoExtractor.kt @@ -0,0 +1,39 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.extractors.helper.AesHelper + +open class CizgiDuo : ExtractorApi() { + override var name = "CizgiDuo" + override var mainUrl = "https://cizgiduo.online" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val m3uLink:String? + val extRef = referer ?: "" + val iSource = app.get(url, referer=extRef).text + + val bePlayer = Regex("""bePlayer\('([^']+)',\s*'(\{[^}]+\})'\);""").find(iSource)?.groupValues ?: throw ErrorLoadingException("bePlayer not found") + val bePlayerPass = bePlayer[1] + val bePlayerData = bePlayer[2] + val encrypted = AesHelper.cryptoAESHandler(bePlayerData, bePlayerPass.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt") + Log.d("Kekik_${this.name}", "encrypted » $encrypted") + + m3uLink = Regex("""video_location":"([^"]+)""").find(encrypted)?.groupValues?.get(1) + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink ?: throw ErrorLoadingException("m3u link not found"), + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMax.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMax.kt new file mode 100644 index 0000000000..9a180d68e5 --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMax.kt @@ -0,0 +1,108 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class CizgiMax : MainAPI() { + override var mainUrl = "https://cizgimax.online" + override var name = "CizgiMax" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.Cartoon) + + override val mainPage = mainPageOf( + "?orderby=date&order=DESC" to "Son Eklenenler", + "?s_type&tur[0]=aile&orderby=date&order=DESC" to "Aile", + "?s_type&tur[0]=aksiyon-macera&orderby=date&order=DESC" to "Aksyion", + "?s_type&tur[0]=animasyon&orderby=date&order=DESC" to "Animasyon", + "?s_type&tur[0]=bilim-kurgu-fantazi&orderby=date&order=DESC" to "Bilim Kurgu", + "?s_type&tur[0]=cocuklar&orderby=date&order=DESC" to "Çocuklar", + "?s_type&tur[0]=komedi&orderby=date&order=DESC" to "Komedi", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${mainUrl}/diziler/page/${page}${request.data}").document + val home = document.select("ul.filter-results li").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("h2.truncate")?.text()?.trim() ?: return null + val href = fixUrlNull(this.selectFirst("div.poster-subject a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("div.poster-media img")?.attr("data-src")) + + return newTvSeriesSearchResponse(title, href, TvType.Cartoon) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val response = app.get("${mainUrl}/ajaxservice/index.php?qr=${query}").parsedSafe<SearchResult>()?.data?.result ?: return listOf() + + return response.mapNotNull { result -> + if (result.sName.contains(".Bölüm") || result.sName.contains(".Sezon") || result.sName.contains("-Sezon") || result.sName.contains("-izle")) { + return@mapNotNull null + } + + newTvSeriesSearchResponse( + result.sName, + fixUrl(result.sLink), + TvType.Cartoon + ) { + this.posterUrl = fixUrlNull(result.sImage) + } + } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1.page-title")?.text() ?: return null + val poster = fixUrlNull(document.selectFirst("img.series-profile-thumb")?.attr("src")) ?: return null + val description = document.selectFirst("p#tv-series-desc")?.text()?.trim() + val tags = document.select("div.genre-item a").mapNotNull { it.text().trim() } + val rating = document.selectFirst("div.color-imdb")?.text()?.trim()?.toRatingInt() + + + val episodes = document.select("div.asisotope div.ajax_post").mapNotNull { + val epName = it.selectFirst("span.episode-names")?.text()?.trim() ?: return@mapNotNull null + val epHref = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null + val epEpisode = Regex("""(\d+)\.Bölüm""").find(epName)?.groupValues?.get(1)?.toIntOrNull() + val seasonName = it.selectFirst("span.season-name")?.text()?.trim() ?: "" + val epSeason = Regex("""(\d+)\.Sezon""").find(seasonName)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.Cartoon, episodes) { + this.posterUrl = poster + this.plot = description + this.tags = tags + this.rating = rating + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("CZGM", "data » $data") + val document = app.get(data).document + + document.select("ul.linkler li").forEach { + val iframe = fixUrlNull(it.selectFirst("a")?.attr("data-frame")) ?: return@forEach + Log.d("CZGM", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } +} diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMaxModels.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMaxModels.kt new file mode 100644 index 0000000000..a2412b475f --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMaxModels.kt @@ -0,0 +1,20 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class SearchResult( + @JsonProperty("data") val data: SearchData? +) + +data class SearchData( + @JsonProperty("result") val result: List<SearchItem>? = arrayListOf(), +) + +data class SearchItem( + @JsonProperty("s_link") val sLink: String, + @JsonProperty("s_name") val sName: String, + @JsonProperty("s_image") val sImage: String, +) \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMaxPlugin.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMaxPlugin.kt new file mode 100644 index 0000000000..7e2ca0427b --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiMaxPlugin.kt @@ -0,0 +1,16 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class CizgiMaxPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(CizgiMax()) + registerExtractorAPI(SibNet()) + registerExtractorAPI(CizgiDuo()) + registerExtractorAPI(CizgiPass()) + registerExtractorAPI(Drive()) + } +} \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiPassExtractor.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiPassExtractor.kt new file mode 100644 index 0000000000..c717725a70 --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/CizgiPassExtractor.kt @@ -0,0 +1,8 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +class CizgiPass : CizgiDuo() { + override var name = "CizgiPass" + override var mainUrl = "https://cizgipass5.online" +} \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/DriveExtractor.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/DriveExtractor.kt new file mode 100644 index 0000000000..718652a323 --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/DriveExtractor.kt @@ -0,0 +1,42 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +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 +import com.lagradost.cloudstream3.utils.StringUtils.decodeUri + +open class Drive : ExtractorApi() { + override var name = "Drive" + override var mainUrl = "https://drive.google.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + + val docId = Regex("""file/d/(.*)/preview""").find(url)?.groupValues?.get(1) ?: throw IllegalArgumentException("docId not found") + val getVideoLink = "https://drive.google.com/get_video_info?docid=${docId}&drive_originator_app=303" + val iSource = app.get(getVideoLink, referer=extRef).text + + val bakalim = Regex("""&fmt_stream_map=(.*)&url_encoded_fmt_stream_map""").find(iSource)?.groupValues?.get(1) ?: throw IllegalArgumentException("fmt_stream_map not found") + val decoded = bakalim.decodeUri() + val m3uLink = decoded.split("|").last() + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } +} \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/SibNetExtractor.kt b/CizgiMax/src/main/kotlin/com/keyiflerolsun/SibNetExtractor.kt new file mode 100644 index 0000000000..14bffb71bf --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/SibNetExtractor.kt @@ -0,0 +1,33 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class SibNet : ExtractorApi() { + override val name = "SibNet" + override val mainUrl = "https://video.sibnet.ru" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val iSource = app.get(url, referer=extRef).text + var m3uLink = Regex("""player.src\(\[\{src: "([^"]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("m3u link not found") + + m3uLink = "${mainUrl}${m3uLink}" + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } +} \ No newline at end of file diff --git a/CizgiMax/src/main/kotlin/com/keyiflerolsun/bakalim.py b/CizgiMax/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..1c669d42e5 --- /dev/null +++ b/CizgiMax/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,28 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from parsel import Selector +from re import search +from Kekik.Sifreleme import AESManager +from json import loads + +oturum = CloudScraper() +istek = oturum.get("https://cizgimax.online/doraemon-1-sezon-13-bolum-izle-2") + +secici = Selector(istek.text) +linkler = secici.css("ul.linkler li a::attr(data-frame)").getall() + +for link in linkler: + konsol.log(link) + oturum.headers.update({"Referer": "https://cizgimax.online/"}) + istek = oturum.get(link) + + be_player = search(r"bePlayer\('([^']+)',\s*'(\{[^\}]+\})'\);", istek.text).groups() + konsol.print(be_player) + + be_player_pass = be_player[0] + be_player_data = be_player[1] + + encrypted = AESManager.decrypt(be_player_data, be_player_pass).replace("\\", "") + konsol.print(loads(encrypted)) \ No newline at end of file diff --git a/DiziBox/build.gradle.kts b/DiziBox/build.gradle.kts new file mode 100644 index 0000000000..11415f4949 --- /dev/null +++ b/DiziBox/build.gradle.kts @@ -0,0 +1,18 @@ +version = 3 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Yabancı Dizi izle, Tüm yabancı dizilerin yeni ve eski sezonlarını full hd izleyebileceğiniz elit site." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=www.dizibox.de&sz=%size%" +} \ No newline at end of file diff --git a/DiziBox/src/main/AndroidManifest.xml b/DiziBox/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/DiziBox/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBox.kt b/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBox.kt new file mode 100644 index 0000000000..f4146508df --- /dev/null +++ b/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBox.kt @@ -0,0 +1,297 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Base64 +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer +import com.lagradost.cloudstream3.network.CloudflareKiller +import com.lagradost.cloudstream3.utils.StringUtils.decodeUri +import okhttp3.Interceptor +import okhttp3.Response +import org.jsoup.Jsoup + +class DiziBox : MainAPI() { + override var mainUrl = "https://www.dizibox.live" + override var name = "DiziBox" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.TvSeries) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + override var sequentialMainPageDelay = 50L // ? 0.05 saniye + override var sequentialMainPageScrollDelay = 50L // ? 0.05 saniye + + // ! CloudFlare v2 + private val cloudflareKiller by lazy { CloudflareKiller() } + private val interceptor by lazy { CloudflareInterceptor(cloudflareKiller) } + + class CloudflareInterceptor(private val cloudflareKiller: CloudflareKiller): Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + val response = chain.proceed(request) + val doc = Jsoup.parse(response.peekBody(1024 * 1024).string()) + + if (doc.text().contains("Güvenlik taramasından geçiriliyorsunuz. Lütfen bekleyiniz..")) { + return cloudflareKiller.intercept(chain) + } + + return response + } + } + + override val mainPage = mainPageOf( + "${mainUrl}/dizi-arsivi/page/SAYFA/?ulke[]=turkiye&yil=&imdb" to "Yerli", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=aile&yil&imdb" to "Aile", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=aksiyon&yil&imdb" to "Aksiyon", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=animasyon&yil&imdb" to "Animasyon", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=belgesel&yil&imdb" to "Belgesel", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=bilimkurgu&yil&imdb" to "Bilimkurgu", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=biyografi&yil&imdb" to "Biyografi", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=dram&yil&imdb" to "Dram", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=drama&yil&imdb" to "Drama", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=fantastik&yil&imdb" to "Fantastik", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=gerilim&yil&imdb" to "Gerilim", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=gizem&yil&imdb" to "Gizem", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=komedi&yil&imdb" to "Komedi", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=korku&yil&imdb" to "Korku", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=macera&yil&imdb" to "Macera", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=muzik&yil&imdb" to "Müzik", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=muzikal&yil&imdb" to "Müzikal", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=reality-tv&yil&imdb" to "Reality TV", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=romantik&yil&imdb" to "Romantik", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=savas&yil&imdb" to "Savaş", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=spor&yil&imdb" to "Spor", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=suc&yil&imdb" to "Suç", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=tarih&yil&imdb" to "Tarih", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=western&yil&imdb" to "Western", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur[0]=yarisma&yil&imdb" to "Yarışma" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val url = request.data.replace("SAYFA", "$page") + val document = app.get( + url, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + val home = document.select("article.detailed-article").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("h3 a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("h3 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<SearchResponse> { + val document = app.get( + "${mainUrl}/?s=${query}", + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + + return document.select("article.detailed-article").mapNotNull { it.toMainPageResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get( + url, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + + val title = document.selectFirst("div.tv-overview h1 a")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.tv-overview figure img")?.attr("src")) + val description = document.selectFirst("div.tv-story p")?.text()?.trim() + val year = document.selectFirst("a[href*='/yil/']")?.text()?.trim()?.toIntOrNull() + val tags = document.select("a[href*='/tur/']").map { it.text() } + val rating = document.selectFirst("span.label-imdb b")?.text()?.trim()?.toRatingInt() + val actors = document.select("a[href*='/oyuncu/']").map { Actor(it.text()) } + val trailer = document.selectFirst("div.tv-overview iframe")?.attr("src") + + val episodeList = mutableListOf<Episode>() + document.select("div#seasons-list a").forEach { + val epUrl = fixUrlNull(it.attr("href")) ?: return@forEach + val epDoc = app.get( + epUrl, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + + epDoc.select("article.grid-box").forEach ep@ { epElem -> + val epTitle = epElem.selectFirst("div.post-title a")?.text()?.trim() ?: return@ep + val epHref = fixUrlNull(epElem.selectFirst("div.post-title a")?.attr("href")) ?: return@ep + val epSeason = Regex("""(\d+)\. ?Sezon""").find(epTitle)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + val epEpisode = Regex("""(\d+)\. ?Bölüm""").find(epTitle)?.groupValues?.get(1)?.toIntOrNull() + + episodeList.add(newEpisode(epHref) { + this.name = epTitle + this.season = epSeason + this.episode = epEpisode + }) + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodeList) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + addActors(actors) + addTrailer(trailer) + } + } + + private suspend fun iframeDecode(data:String, iframe:String, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + @Suppress("NAME_SHADOWING") var iframe = iframe + + if (iframe.contains("/player/king/king.php")) { + iframe = iframe.replace("king.php?v=", "king.php?wmode=opaque&v=") + val subDoc = app.get( + iframe, + referer = data, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + val subFrame = subDoc.selectFirst("div#Player iframe")?.attr("src") ?: return false + + val iDoc = app.get(subFrame, referer="${mainUrl}/").text + val cryptData = Regex("""CryptoJS\.AES\.decrypt\("(.*)","""").find(iDoc)?.groupValues?.get(1) ?: return false + val cryptPass = Regex("""","(.*)"\);""").find(iDoc)?.groupValues?.get(1) ?: return false + val decryptedData = CryptoJS.decrypt(cryptPass, cryptData) + val decryptedDoc = Jsoup.parse(decryptedData) + val vidUrl = Regex("""file: '(.*)',""").find(decryptedDoc.html())?.groupValues?.get(1) ?: return false + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = vidUrl, + referer = vidUrl, + quality = getQualityFromName("4k"), + isM3u8 = true + ) + ) + + } else if (iframe.contains("/player/moly/moly.php")) { + iframe = iframe.replace("moly.php?h=", "moly.php?wmode=opaque&h=") + var subDoc = app.get( + iframe, + referer = data, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + + val atobData = Regex("""unescape\("(.*)"\)""").find(subDoc.html())?.groupValues?.get(1) + if (atobData != null) { + val decodedAtob = atobData.decodeUri() + val strAtob = String(Base64.decode(decodedAtob, Base64.DEFAULT), Charsets.UTF_8) + subDoc = Jsoup.parse(strAtob) + } + + val subFrame = subDoc.selectFirst("div#Player iframe")?.attr("src") ?: return false + + loadExtractor(subFrame, "${mainUrl}/", subtitleCallback, callback) + + } else if (iframe.contains("/player/haydi.php")) { + iframe = iframe.replace("haydi.php?v=", "haydi.php?wmode=opaque&v=") + var subDoc = app.get( + iframe, + referer = data, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + + val atobData = Regex("""unescape\("(.*)"\)""").find(subDoc.html())?.groupValues?.get(1) + if (atobData != null) { + val decodedAtob = atobData.decodeUri() + val strAtob = String(Base64.decode(decodedAtob, Base64.DEFAULT), Charsets.UTF_8) + subDoc = Jsoup.parse(strAtob) + } + + val subFrame = subDoc.selectFirst("div#Player iframe")?.attr("src") ?: return false + + loadExtractor(subFrame, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("DZBX", "data » $data") + val document = app.get( + data, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + var iframe = document.selectFirst("div#video-area iframe")?.attr("src")?: return false + Log.d("DZBX", "iframe » $iframe") + + iframeDecode(data, iframe, subtitleCallback, callback) + + document.select("div.video-toolbar option[value]").forEach { + val altLink = it.attr("value") + val subDoc = app.get( + altLink, + cookies = mapOf( + "LockUser" to "true", + "isTrustedUser" to "true", + "dbxu" to "1722403730363" + ), + interceptor = interceptor + ).document + iframe = subDoc.selectFirst("div#video-area iframe")?.attr("src")?: return false + Log.d("DZBX", "iframe » $iframe") + + iframeDecode(data, iframe, subtitleCallback, callback) + } + + return true + } +} \ No newline at end of file diff --git a/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBoxPlugin.kt b/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBoxPlugin.kt new file mode 100644 index 0000000000..4a4d316a5d --- /dev/null +++ b/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBoxPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class DiziBoxPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(DiziBox()) + } +} \ No newline at end of file diff --git a/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBoxUtils.kt b/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBoxUtils.kt new file mode 100644 index 0000000000..0460e132f3 --- /dev/null +++ b/DiziBox/src/main/kotlin/com/keyiflerolsun/DiziBoxUtils.kt @@ -0,0 +1,129 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import java.util.Arrays +import android.util.Base64 +import java.security.MessageDigest +import java.security.SecureRandom +import javax.crypto.Cipher +import javax.crypto.spec.SecretKeySpec +import javax.crypto.spec.IvParameterSpec +import kotlin.math.min + +/** + * Conforming with CryptoJS AES method + */ +// see https://gist.github.com/thackerronak/554c985c3001b16810af5fc0eb5c358f +@Suppress("unused", "SameParameterValue") +object CryptoJS { + + private const val KEY_SIZE = 256 + private const val IV_SIZE = 128 + private const val HASH_CIPHER = "AES/CBC/PKCS7Padding" + private const val AES = "AES" + private const val KDF_DIGEST = "MD5" + + // Seriously crypto-js, what's wrong with you? + private const val APPEND = "Salted__" + + /** + * Encrypt + * @param password passphrase + * @param plainText plain string + */ + fun encrypt(password: String, plainText: String): String { + val saltBytes = generateSalt(8) + val key = ByteArray(KEY_SIZE / 8) + val iv = ByteArray(IV_SIZE / 8) + evpkdf(password.toByteArray(), KEY_SIZE, IV_SIZE, saltBytes, key, iv) + + val keyS = SecretKeySpec(key, AES) + val cipher = Cipher.getInstance(HASH_CIPHER) + val ivSpec = IvParameterSpec(iv) + cipher.init(Cipher.ENCRYPT_MODE, keyS, ivSpec) + + val cipherText = cipher.doFinal(plainText.toByteArray()) + // Thanks kientux for this: https://gist.github.com/kientux/bb48259c6f2133e628ad + // Create CryptoJS-like encrypted! + val sBytes = APPEND.toByteArray() + val b = ByteArray(sBytes.size + saltBytes.size + cipherText.size) + System.arraycopy(sBytes, 0, b, 0, sBytes.size) + System.arraycopy(saltBytes, 0, b, sBytes.size, saltBytes.size) + System.arraycopy(cipherText, 0, b, sBytes.size + saltBytes.size, cipherText.size) + + return Base64.encodeToString(b, Base64.DEFAULT) + } + + /** + * Decrypt + * Thanks Artjom B. for this: http://stackoverflow.com/a/29152379/4405051 + * @param password passphrase + * @param cipherText encrypted string + */ + fun decrypt(password: String, cipherText: String): String { + val ctBytes = Base64.decode(cipherText.toByteArray(), Base64.DEFAULT) + val saltBytes = Arrays.copyOfRange(ctBytes, 8, 16) + val cipherTextBytes = Arrays.copyOfRange(ctBytes, 16, ctBytes.size) + + val key = ByteArray(KEY_SIZE / 8) + val iv = ByteArray(IV_SIZE / 8) + evpkdf(password.toByteArray(), KEY_SIZE, IV_SIZE, saltBytes, key, iv) + + val cipher = Cipher.getInstance(HASH_CIPHER) + val keyS = SecretKeySpec(key, AES) + cipher.init(Cipher.DECRYPT_MODE, keyS, IvParameterSpec(iv)) + + val plainText = cipher.doFinal(cipherTextBytes) + return String(plainText) + } + + private fun evpkdf(password: ByteArray, keySize: Int, ivSize: Int, salt: ByteArray, resultKey: ByteArray, resultIv: ByteArray): ByteArray { + return evpkdf(password, keySize, ivSize, salt, 1, KDF_DIGEST, resultKey, resultIv) + } + + @Suppress("NAME_SHADOWING") + private fun evpkdf(password: ByteArray, keySize: Int, ivSize: Int, salt: ByteArray, iterations: Int, hashAlgorithm: String, resultKey: ByteArray, resultIv: ByteArray): ByteArray { + val keySize = keySize / 32 + val ivSize = ivSize / 32 + val targetKeySize = keySize + ivSize + val derivedBytes = ByteArray(targetKeySize * 4) + var numberOfDerivedWords = 0 + var block: ByteArray? = null + val hash = MessageDigest.getInstance(hashAlgorithm) + + while (numberOfDerivedWords < targetKeySize) { + if (block != null) { + hash.update(block) + } + + hash.update(password) + block = hash.digest(salt) + hash.reset() + + // Iterations + for (i in 1 until iterations) { + block = hash.digest(block!!) + hash.reset() + } + + System.arraycopy( + block!!, 0, derivedBytes, numberOfDerivedWords * 4, + min(block.size, (targetKeySize - numberOfDerivedWords) * 4) + ) + + numberOfDerivedWords += block.size / 4 + } + + System.arraycopy(derivedBytes, 0, resultKey, 0, keySize * 4) + System.arraycopy(derivedBytes, keySize * 4, resultIv, 0, ivSize * 4) + + return derivedBytes // key + iv + } + + private fun generateSalt(length: Int): ByteArray { + return ByteArray(length).apply { + SecureRandom().nextBytes(this) + } + } +} \ No newline at end of file diff --git a/DiziBox/src/main/kotlin/com/keyiflerolsun/bakalim.py b/DiziBox/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..0f9d89f780 --- /dev/null +++ b/DiziBox/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,32 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from parsel import Selector +from re import search +from Kekik.Sifreleme import CryptoJS + +oturum = CloudScraper() +istek = oturum.get("https://www.dizibox.de/hello-tomorrow-1-sezon-1-bolum-izle/") +secici = Selector(istek.text) + +iframe = secici.css("div#video-area iframe::attr(src)").get() +iframe = iframe.replace("king.php?v=", "king.php?wmode=opaque&v=") + +# oturum.cookies.update({ +# "LockUser" : "true", +# "isTrustedUser" : "true", +# "dbxu" : "1722403730363" +# }) +oturum.headers.update({"Referer": "https://www.dizibox.de/hello-tomorrow-1-sezon-1-bolum-izle/"}) +istek = oturum.get(iframe) +secici = Selector(istek.text) +iframe = secici.css("div#Player iframe::attr(src)").get() + +oturum.headers.update({"Referer": "https://www.dizibox.de/"}) +istek = oturum.get(iframe) +cryptData = search(r"CryptoJS\.AES\.decrypt\(\"(.*)\",\"", istek.text).group(1) +cryptPass = search(r"\",\"(.*)\"\);", istek.text).group(1) + +decrypted = CryptoJS.decrypt(cryptPass, cryptData) +konsol.print(search(r"file: \'(.*)',", decrypted).group(1)) \ No newline at end of file diff --git a/DiziKorea/build.gradle.kts b/DiziKorea/build.gradle.kts new file mode 100644 index 0000000000..734a3c7d79 --- /dev/null +++ b/DiziKorea/build.gradle.kts @@ -0,0 +1,18 @@ +version = 4 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "En Güncel Kore Dizileri izleme Sitesi" + + /** + * 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=https://dizikorea.vip&sz=%size%" +} \ No newline at end of file diff --git a/DiziKorea/src/main/AndroidManifest.xml b/DiziKorea/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/DiziKorea/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKorea.kt b/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKorea.kt new file mode 100644 index 0000000000..7d87502a10 --- /dev/null +++ b/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKorea.kt @@ -0,0 +1,148 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer +import org.jsoup.Jsoup + +class DiziKorea : MainAPI() { + override var mainUrl = "https://dizikorea.info" + override var name = "DiziKorea" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.AsianDrama) + + override val mainPage = mainPageOf( + "${mainUrl}/tum-kore-dizileri/" to "Kore Dizileri", + "${mainUrl}/kore-filmleri-izle1/" to "Kore Filmleri", + "${mainUrl}/tayland-dizileri/" to "Tayland Dizileri", + "${mainUrl}/tayland-filmleri/" to "Tayland Filmleri", + "${mainUrl}/cin-dizileri/" to "Çin Dizileri", + "${mainUrl}/cin-filmleri/" to "Çin Filmleri", + "${mainUrl}/yabanci-dizi/" to "Yabancı Dizi" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.poster-long").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("h2")?.text()?.trim() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { this.posterUrl = posterUrl } + } + + private fun Element.toPostSearchResult(): SearchResponse? { + val title = this.selectFirst("span")?.text()?.trim() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val response = app.post( + "${mainUrl}/search", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + referer = "${mainUrl}/", + data = mapOf("query" to query) + ).parsedSafe<KoreaSearch>()!!.theme + + val document = Jsoup.parse(response) + val results = mutableListOf<SearchResponse>() + + document.select("ul li").forEach { listItem -> + val href = listItem.selectFirst("a")?.attr("href") + if (href != null && (href.contains("/dizi/") || href.contains("/film/"))) { + val result = listItem.toPostSearchResult() + result?.let { results.add(it) } + } + } + + return results + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1 a")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.series-profile-image img")?.attr("src")) ?: return null + val year = document.selectFirst("h1 span")?.text()?.substringAfter("(")?.substringBefore(")")?.toIntOrNull() + val description = document.selectFirst("div.series-profile-summary p")?.text()?.trim() + val tags = document.select("div.series-profile-type a").mapNotNull { it.text().trim() } + val rating = document.selectFirst("span.color-imdb")?.text()?.trim()?.toRatingInt() + val duration = document.selectXpath("//span[text()='Süre']//following-sibling::p").text().trim().split(" ").first().toIntOrNull() + val trailer = document.selectFirst("div.series-profile-trailer")?.attr("data-yt") + val actors = document.select("div.series-profile-cast li").map { + Actor(it.selectFirst("h5")!!.text(), it.selectFirst("img")!!.attr("data-src")) + } + + if (url.contains("/dizi/")) { + val episodes = mutableListOf<Episode>() + document.select("div.series-profile-episode-list").forEach { + val epSeason = it.parent()!!.id().split("-").last().toIntOrNull() + + it.select("li").forEach ep@ { episodeElement -> + val epHref = fixUrlNull(episodeElement.selectFirst("h6 a")?.attr("href")) ?: return@ep + val epEpisode = episodeElement.selectFirst("a.truncate data")?.text()?.trim()?.toIntOrNull() + + episodes.add(newEpisode(epHref) { + this.name = "${epSeason}. Sezon ${epEpisode}. Bölüm" + this.season = epSeason + this.episode = epEpisode + }) + } + } + + return newTvSeriesLoadResponse(title, url, TvType.AsianDrama, episodes) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addActors(actors) + addTrailer("https://www.youtube.com/embed/${trailer}") + } + } else { + return newMovieLoadResponse(title, url, TvType.AsianDrama, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addActors(actors) + addTrailer("https://www.youtube.com/embed/${trailer}") + } + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("DZK", "data » $data") + val document = app.get(data).document + + + document.select("div.series-watch-alternatives button").forEach { + val iframe = fixUrlNull(it.attr("data-hhs")) ?: return@forEach + Log.d("DZK", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } +} diff --git a/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKoreaModels.kt b/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKoreaModels.kt new file mode 100644 index 0000000000..aa77cc57b1 --- /dev/null +++ b/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKoreaModels.kt @@ -0,0 +1,9 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + +data class KoreaSearch( + @JsonProperty("theme") val theme: String +) \ No newline at end of file diff --git a/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKoreaPlugin.kt b/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKoreaPlugin.kt new file mode 100644 index 0000000000..c287f69f2d --- /dev/null +++ b/DiziKorea/src/main/kotlin/com/keyiflerolsun/DiziKoreaPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +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) { + registerMainAPI(DiziKorea()) + registerExtractorAPI(VideoSeyred()) + } +} \ No newline at end of file diff --git a/DiziKorea/src/main/kotlin/com/keyiflerolsun/VideoSeyredExtractor.kt b/DiziKorea/src/main/kotlin/com/keyiflerolsun/VideoSeyredExtractor.kt new file mode 100644 index 0000000000..9a8b7d121c --- /dev/null +++ b/DiziKorea/src/main/kotlin/com/keyiflerolsun/VideoSeyredExtractor.kt @@ -0,0 +1,71 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue + +open class VideoSeyred : ExtractorApi() { + override val name = "VideoSeyred" + override val mainUrl = "https://videoseyred.in" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val videoId = url.substringAfter("embed/").substringBefore("?") + val videoUrl = "${mainUrl}/playlist/${videoId}.json" + Log.d("Kekik_${this.name}", "videoUrl » $videoUrl") + + val responseRaw = app.get(videoUrl) + val responseList:List<VideoSeyredSource> = jacksonObjectMapper().readValue(responseRaw.text) ?: throw ErrorLoadingException("VideoSeyred") + val response = responseList[0] + + for (track in response.tracks) { + if (track.label != null && track.kind == "captions") { + subtitleCallback.invoke( + SubtitleFile( + lang = track.label, + url = fixUrl(track.file) + ) + ) + } + } + + for (source in response.sources) { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = source.file, + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + } + + data class VideoSeyredSource( + @JsonProperty("image") val image: String, + @JsonProperty("title") val title: String, + @JsonProperty("sources") val sources: List<VSSource>, + @JsonProperty("tracks") val tracks: List<VSTrack> + ) + + data class VSSource( + @JsonProperty("file") val file: String, + @JsonProperty("type") val type: String, + @JsonProperty("default") val default: String + ) + + data class VSTrack( + @JsonProperty("file") val file: String, + @JsonProperty("kind") val kind: String, + @JsonProperty("language") val language: String? = null, + @JsonProperty("label") val label: String? = null, + @JsonProperty("default") val default: String? = null + ) +} \ No newline at end of file diff --git a/DiziKorea/src/main/kotlin/com/keyiflerolsun/bakalim.py b/DiziKorea/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..ceeff78780 --- /dev/null +++ b/DiziKorea/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,28 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper as Session +# from httpx import Client as Session +from parsel import Selector + +mainUrl = "https://dizikorea.vip" +oturum = Session() + +oturum.headers.update({ + "X-Requested-With" : "XMLHttpRequest", + "Referer" : f"{mainUrl}/", +}) + +istek = oturum.post( + f"{mainUrl}/search", + data = { + "query" : "kurek" + } +) + +for item in Selector(istek.json()["theme"]).css("ul li"): + href = item.css("a::attr(href)").get() + if "/dizi/" not in href and "/film/" not in href: + continue + + konsol.print(href) \ No newline at end of file diff --git a/DiziMom/build.gradle.kts b/DiziMom/build.gradle.kts new file mode 100644 index 0000000000..499690ea73 --- /dev/null +++ b/DiziMom/build.gradle.kts @@ -0,0 +1,18 @@ +version = 10 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Binlerce yerli yabancı dizi arşivi, tüm sezonlar, kesintisiz bölümler. Sadece dizi izle, Dizimom heryerde seninle!" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=www.dizimom.tv&sz=%size%" +} \ No newline at end of file diff --git a/DiziMom/src/main/AndroidManifest.xml b/DiziMom/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/DiziMom/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/DiziMom.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/DiziMom.kt new file mode 100644 index 0000000000..305b113a01 --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/DiziMom.kt @@ -0,0 +1,143 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class DiziMom : MainAPI() { + override var mainUrl = "https://www.dizimom.plus" + override var name = "DiziMom" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.TvSeries) + + override val mainPage = mainPageOf( + "${mainUrl}/tum-bolumler/page/" to "Son Bölümler", + "${mainUrl}/yerli-dizi-izle/page/" to "Yerli Diziler", + "${mainUrl}/yabanci-dizi-izle/page/" to "Yabancı Diziler", + "${mainUrl}/tv-programlari-izle/page/" to "TV Programları", + // "${mainUrl}/turkce-dublaj-diziler/page/" to "Dublajlı Diziler", // ! "Son Bölümler" Ana sayfa yüklenmesini yavaşlattığı için bunlar devre dışı bırakılmıştır.. + // "${mainUrl}/netflix-dizileri-izle/page/" to "Netflix Dizileri", + // "${mainUrl}/kore-dizileri-izle/page/" to "Kore Dizileri", + // "${mainUrl}/full-hd-hint-dizileri-izle/page/" to "Hint Dizileri", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}/").document + val home = if (request.data.contains("/tum-bolumler/")) { + document.select("div.episode-box").mapNotNull { it.sonBolumler() } + } else { + document.select("div.single-item").mapNotNull { it.diziler() } + } + + return newHomePageResponse(request.name, home) + } + + private suspend fun Element.sonBolumler(): SearchResponse? { + val name = this.selectFirst("div.episode-name a")?.text()?.substringBefore(" izle") ?: return null + val title = name.replace(".Sezon ", "x").replace(".Bölüm", "") + + val epHref = fixUrlNull(this.selectFirst("div.episode-name a")?.attr("href")) ?: return null + val epDoc = app.get(epHref).document + val href = epDoc.selectFirst("div#benzerli a")?.attr("href") ?: return null + + val posterUrl = fixUrlNull(this.selectFirst("a img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } + + private fun Element.diziler(): SearchResponse? { + val title = this.selectFirst("div.categorytitle a")?.text()?.substringBefore(" izle") ?: return null + val href = fixUrlNull(this.selectFirst("div.categorytitle a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("div.cat-img img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/?s=${query}").document + + return document.select("div.single-item").mapNotNull { it.diziler() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.title h1")?.text()?.substringBefore(" izle") ?: return null + val poster = fixUrlNull(document.selectFirst("div.category_image img")?.attr("src")) ?: return null + val year = document.selectXpath("//div[span[contains(text(), 'Yapım Yılı')]]").text().substringAfter("Yapım Yılı : ").trim().toIntOrNull() + val description = document.selectFirst("div.category_desc")?.text()?.trim() + val tags = document.select("div.genres a").mapNotNull { it.text().trim() } + val rating = document.selectXpath("//div[span[contains(text(), 'IMDB')]]").text().substringAfter("IMDB : ").trim().toRatingInt() + val actors = document.selectXpath("//div[span[contains(text(), 'Oyuncular')]]").text().substringAfter("Oyuncular : ").split(", ").map { + Actor(it.trim()) + } + + val episodes = document.select("div.bolumust").mapNotNull { + val epName = it.selectFirst("div.baslik")?.text()?.trim() ?: return@mapNotNull null + val epHref = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null + val epEpisode = Regex("""(\d+)\.Bölüm""").find(epName)?.groupValues?.get(1)?.toIntOrNull() + val epSeason = Regex("""(\d+)\.Sezon""").find(epName)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + newEpisode(epHref) { + this.name = epName.substringBefore(" izle").replace(title, "").trim() + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("DZM", "data » $data") + + val ua = mapOf("User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36") + + app.post( + "${mainUrl}/wp-login.php", + headers = ua, + referer = "${mainUrl}/", + data = mapOf( + "log" to "keyiflerolsun", + "pwd" to "12345", + "rememberme" to "forever", + "redirect_to" to mainUrl, + ) + ) + + val document = app.get(data, headers=ua).document + + val iframes = mutableListOf<String>() + val mainIframe = document.selectFirst("div.video p iframe")?.attr("src") ?: return false + iframes.add(mainIframe) + + document.select("div.sources a").forEach { + val subDocument = app.get(it.attr("href"), headers=ua).document + val subIframe = subDocument.selectFirst("div.video p iframe")?.attr("src") ?: return@forEach + + iframes.add(subIframe) + } + + for (iframe in iframes) { + Log.d("DZM", "iframe » $iframe") + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } +} diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/DiziMomPlugin.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/DiziMomPlugin.kt new file mode 100644 index 0000000000..a595d1893d --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/DiziMomPlugin.kt @@ -0,0 +1,17 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class DiziMomPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(DiziMom()) + registerExtractorAPI(HDMomPlayer()) + registerExtractorAPI(HDPlayerSystem()) + registerExtractorAPI(VideoSeyred()) + registerExtractorAPI(PeaceMakerst()) + registerExtractorAPI(HDStreamAble()) + } +} \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/HDMomPlayerExtractor.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/HDMomPlayerExtractor.kt new file mode 100644 index 0000000000..133fb5e000 --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/HDMomPlayerExtractor.kt @@ -0,0 +1,71 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.extractors.helper.AesHelper +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue + +open class HDMomPlayer : ExtractorApi() { + override val name = "HDMomPlayer" + override val mainUrl = "https://hdmomplayer.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val m3uLink:String? + val extRef = referer ?: "" + val iSource = app.get(url, referer=extRef).text + + val bePlayer = Regex("""bePlayer\('([^']+)',\s*'(\{[^}]+\})'\);""").find(iSource)?.groupValues + if (bePlayer != null) { + val bePlayerPass = bePlayer[1] + val bePlayerData = bePlayer[2] + val encrypted = AesHelper.cryptoAESHandler(bePlayerData, bePlayerPass.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt") + Log.d("Kekik_${this.name}", "encrypted » $encrypted") + + m3uLink = Regex("""video_location":"([^"]+)""").find(encrypted)?.groupValues?.get(1) + } else { + m3uLink = Regex("""file:"([^"]+)""").find(iSource)?.groupValues?.get(1) + + val trackStr = Regex("""tracks:\[([^]]+)""").find(iSource)?.groupValues?.get(1) + if (trackStr != null) { + val tracks:List<Track> = jacksonObjectMapper().readValue("[${trackStr}]") + + for (track in tracks) { + if (track.file == null || track.label == null) continue + if (track.label.contains("Forced")) continue + + subtitleCallback.invoke( + SubtitleFile( + lang = track.label, + url = fixUrl(mainUrl + track.file) + ) + ) + } + } + } + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink ?: throw ErrorLoadingException("m3u link not found"), + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } + + data class Track( + @JsonProperty("file") val file: String?, + @JsonProperty("label") val label: String?, + @JsonProperty("kind") val kind: String?, + @JsonProperty("language") val language: String?, + @JsonProperty("default") val default: String? + ) +} \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/HDPlayerSystemExtractor.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/HDPlayerSystemExtractor.kt new file mode 100644 index 0000000000..527f0e8e1c --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/HDPlayerSystemExtractor.kt @@ -0,0 +1,59 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class HDPlayerSystem : ExtractorApi() { + override val name = "HDPlayerSystem" + override val mainUrl = "https://hdplayersystem.live" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val vidId = if (url.contains("video/")) { + url.substringAfter("video/") + } else { + url.substringAfter("?data=") + } + val postUrl = "${mainUrl}/player/index.php?data=${vidId}&do=getVideo" + Log.d("Kekik_${this.name}", "postUrl » $postUrl") + + val response = app.post( + postUrl, + data = mapOf( + "hash" to vidId, + "r" to extRef + ), + referer = extRef, + headers = mapOf( + "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", + "X-Requested-With" to "XMLHttpRequest" + ) + ) + + val videoResponse = response.parsedSafe<SystemResponse>() ?: throw ErrorLoadingException("failed to parse response") + val m3uLink = videoResponse.securedLink + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = extRef, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + + data class SystemResponse( + @JsonProperty("hls") val hls: String, + @JsonProperty("videoImage") val videoImage: String? = null, + @JsonProperty("videoSource") val videoSource: String, + @JsonProperty("securedLink") val securedLink: String + ) +} \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/HDStreamAbleExtractor.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/HDStreamAbleExtractor.kt new file mode 100644 index 0000000000..1287998f03 --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/HDStreamAbleExtractor.kt @@ -0,0 +1,8 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +class HDStreamAble : PeaceMakerst() { + override var name = "HDStreamAble" + override var mainUrl = "https://hdstreamable.com" +} \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/PeaceMakerstExtractor.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/PeaceMakerstExtractor.kt new file mode 100644 index 0000000000..f4c1ece33e --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/PeaceMakerstExtractor.kt @@ -0,0 +1,89 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class PeaceMakerst : ExtractorApi() { + override val name = "PeaceMakerst" + override val mainUrl = "https://peacemakerst.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val m3uLink:String? + val extRef = referer ?: "" + val postUrl = "${url}?do=getVideo" + Log.d("Kekik_${this.name}", "postUrl » $postUrl") + + val response = app.post( + postUrl, + data = mapOf( + "hash" to url.substringAfter("video/"), + "r" to extRef, + "s" to "" + ), + referer = extRef, + headers = mapOf( + "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", + "X-Requested-With" to "XMLHttpRequest" + ) + ) + if (response.text.contains("teve2.com.tr\\/embed\\/")) { + val teve2Id = response.text.substringAfter("teve2.com.tr\\/embed\\/").substringBefore("\"") + val teve2Response = app.get( + "https://www.teve2.com.tr/action/media/${teve2Id}", + referer = "https://www.teve2.com.tr/embed/${teve2Id}" + ).parsedSafe<Teve2ApiResponse>() ?: throw ErrorLoadingException("teve2 response is null") + + m3uLink = teve2Response.media.link.serviceUrl + "//" + teve2Response.media.link.securePath + } else { + val videoResponse = response.parsedSafe<PeaceResponse>() ?: throw ErrorLoadingException("peace response is null") + val videoSources = videoResponse.videoSources + m3uLink = if (videoSources.isNotEmpty()) { + videoSources.lastOrNull()?.file + } else { + null + } + } + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink ?: throw ErrorLoadingException("m3u link not found"), + referer = extRef, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + + data class PeaceResponse( + @JsonProperty("videoImage") val videoImage: String?, + @JsonProperty("videoSources") val videoSources: List<VideoSource>, + @JsonProperty("sIndex") val sIndex: String, + @JsonProperty("sourceList") val sourceList: Map<String, String> + ) + + data class VideoSource( + @JsonProperty("file") val file: String, + @JsonProperty("label") val label: String, + @JsonProperty("type") val type: String + ) + + data class Teve2ApiResponse( + @JsonProperty("Media") val media: Teve2Media + ) + + data class Teve2Media( + @JsonProperty("Link") val link: Teve2Link + ) + + data class Teve2Link( + @JsonProperty("ServiceUrl") val serviceUrl: String, + @JsonProperty("SecurePath") val securePath: String + ) +} \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/VideoSeyredExtractor.kt b/DiziMom/src/main/kotlin/com/keyiflerolsun/VideoSeyredExtractor.kt new file mode 100644 index 0000000000..9a8b7d121c --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/VideoSeyredExtractor.kt @@ -0,0 +1,71 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue + +open class VideoSeyred : ExtractorApi() { + override val name = "VideoSeyred" + override val mainUrl = "https://videoseyred.in" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val videoId = url.substringAfter("embed/").substringBefore("?") + val videoUrl = "${mainUrl}/playlist/${videoId}.json" + Log.d("Kekik_${this.name}", "videoUrl » $videoUrl") + + val responseRaw = app.get(videoUrl) + val responseList:List<VideoSeyredSource> = jacksonObjectMapper().readValue(responseRaw.text) ?: throw ErrorLoadingException("VideoSeyred") + val response = responseList[0] + + for (track in response.tracks) { + if (track.label != null && track.kind == "captions") { + subtitleCallback.invoke( + SubtitleFile( + lang = track.label, + url = fixUrl(track.file) + ) + ) + } + } + + for (source in response.sources) { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = source.file, + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + } + + data class VideoSeyredSource( + @JsonProperty("image") val image: String, + @JsonProperty("title") val title: String, + @JsonProperty("sources") val sources: List<VSSource>, + @JsonProperty("tracks") val tracks: List<VSTrack> + ) + + data class VSSource( + @JsonProperty("file") val file: String, + @JsonProperty("type") val type: String, + @JsonProperty("default") val default: String + ) + + data class VSTrack( + @JsonProperty("file") val file: String, + @JsonProperty("kind") val kind: String, + @JsonProperty("language") val language: String? = null, + @JsonProperty("label") val label: String? = null, + @JsonProperty("default") val default: String? = null + ) +} \ No newline at end of file diff --git a/DiziMom/src/main/kotlin/com/keyiflerolsun/bakalim.py b/DiziMom/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..0ff7a8e502 --- /dev/null +++ b/DiziMom/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,41 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from parsel import Selector +from re import search +from Kekik.Sifreleme import AESManager +from json import loads + +oturum = CloudScraper() +oturum.headers.update({"User-Agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36"}) +# oturum.cookies.update({"wordpress_logged_in_7e0a80686bffd7035218d41e8240d65f": "keyiflerolsun|1704461004|TJh8nQRYrqZ9xlAyO7rO5QgiqTQiw7op8I6LKkSvytX|0dc654883fad5f0301df32e6465aa676a3f235288dd9c8a73260d9c8a20b19ae"}) + +oturum.post( + url = "https://www.dizimom.im/wp-login.php", + data = { + "log" : "keyiflerolsun", + "pwd" : "12345", + "rememberme" : "forever", + "redirect_to" : "https://www.dizimom.im", + } +) + +istek = oturum.get("https://www.dizimom.im/modern-dogu-masallari-1-sezon-7-bolum-izle/") +konsol.print(istek.url) + +secici = Selector(istek.text) +iframe = secici.css("div.video p iframe::attr(src)").get() +konsol.print(iframe) + +oturum.headers.update({"Referer": "https://www.dizimom.im/"}) +i_source = oturum.get(iframe).text + +be_player = search(r"bePlayer\('([^']+)',\s*'(\{[^\}]+\})'\);", i_source).groups() +konsol.print(be_player) + +be_player_pass = be_player[0] +be_player_data = be_player[1] + +encrypted = AESManager.decrypt(be_player_data, be_player_pass).replace("\\", "") +konsol.print(loads(encrypted)) \ No newline at end of file diff --git a/DiziPal/build.gradle.kts b/DiziPal/build.gradle.kts new file mode 100644 index 0000000000..9cecefe0d8 --- /dev/null +++ b/DiziPal/build.gradle.kts @@ -0,0 +1,18 @@ +version = 28 + +cloudstream { + authors = listOf("keyiflerolsun", "muratcesmecioglu") + language = "tr" + description = "en yeni dizileri güvenli ve hızlı şekilde sunar." + + /** + * 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=https://dizipal683.com&sz=%size%" +} diff --git a/DiziPal/src/main/AndroidManifest.xml b/DiziPal/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/DiziPal/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPal.kt b/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPal.kt new file mode 100644 index 0000000000..e3fe0b002e --- /dev/null +++ b/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPal.kt @@ -0,0 +1,247 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue + +class DiziPal : MainAPI() { + override var mainUrl = "https://dizipal950.com" + override var name = "DiziPal" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + // override var sequentialMainPageDelay = 250L // ? 0.25 saniye + // override var sequentialMainPageScrollDelay = 250L // ? 0.25 saniye + + override val mainPage = mainPageOf( + "${mainUrl}/diziler/son-bolumler" to "Son Bölümler", + "${mainUrl}/diziler" to "Yeni Diziler", + "${mainUrl}/filmler" to "Yeni Filmler", + "${mainUrl}/koleksiyon/netflix" to "Netflix", + "${mainUrl}/koleksiyon/exxen" to "Exxen", + "${mainUrl}/koleksiyon/blutv" to "BluTV", + "${mainUrl}/koleksiyon/disney" to "Disney+", + "${mainUrl}/koleksiyon/amazon-prime" to "Amazon Prime", + "${mainUrl}/koleksiyon/tod-bein" to "TOD (beIN)", + "${mainUrl}/koleksiyon/gain" to "Gain", + "${mainUrl}/tur/mubi" to "Mubi", + "${mainUrl}/diziler?kelime=&durum=&tur=26&type=&siralama=" to "Anime", + "${mainUrl}/diziler?kelime=&durum=&tur=5&type=&siralama=" to "Bilimkurgu Dizileri", + "${mainUrl}/tur/bilimkurgu" to "Bilimkurgu Filmleri", + "${mainUrl}/diziler?kelime=&durum=&tur=11&type=&siralama=" to "Komedi Dizileri", + "${mainUrl}/tur/komedi" to "Komedi Filmleri", + "${mainUrl}/diziler?kelime=&durum=&tur=4&type=&siralama=" to "Belgesel Dizileri", + "${mainUrl}/tur/belgesel" to "Belgesel Filmleri", + "${mainUrl}/diziler?kelime=&durum=&tur=25&type=&siralama=" to "Erotik Diziler", + "${mainUrl}/tur/erotik" to "Erotik Filmler", + // "${mainUrl}/diziler?kelime=&durum=&tur=1&type=&siralama=" to "Aile", // ! Fazla kategori olduğu için geç yükleniyor.. + // "${mainUrl}/diziler?kelime=&durum=&tur=2&type=&siralama=" to "Aksiyon", + // "${mainUrl}/diziler?kelime=&durum=&tur=3&type=&siralama=" to "Animasyon", + // "${mainUrl}/diziler?kelime=&durum=&tur=4&type=&siralama=" to "Belgesel", + // "${mainUrl}/diziler?kelime=&durum=&tur=6&type=&siralama=" to "Biyografi", + // "${mainUrl}/diziler?kelime=&durum=&tur=7&type=&siralama=" to "Dram", + // "${mainUrl}/diziler?kelime=&durum=&tur=8&type=&siralama=" to "Fantastik", + // "${mainUrl}/diziler?kelime=&durum=&tur=9&type=&siralama=" to "Gerilim", + // "${mainUrl}/diziler?kelime=&durum=&tur=10&type=&siralama=" to "Gizem", + // "${mainUrl}/diziler?kelime=&durum=&tur=12&type=&siralama=" to "Korku", + // "${mainUrl}/diziler?kelime=&durum=&tur=13&type=&siralama=" to "Macera", + // "${mainUrl}/diziler?kelime=&durum=&tur=14&type=&siralama=" to "Müzik", + // "${mainUrl}/diziler?kelime=&durum=&tur=16&type=&siralama=" to "Romantik", + // "${mainUrl}/diziler?kelime=&durum=&tur=17&type=&siralama=" to "Savaş", + // "${mainUrl}/diziler?kelime=&durum=&tur=24&type=&siralama=" to "Yerli", + // "${mainUrl}/diziler?kelime=&durum=&tur=18&type=&siralama=" to "Spor", + // "${mainUrl}/diziler?kelime=&durum=&tur=19&type=&siralama=" to "Suç", + // "${mainUrl}/diziler?kelime=&durum=&tur=20&type=&siralama=" to "Tarih", + // "${mainUrl}/diziler?kelime=&durum=&tur=21&type=&siralama=" to "Western", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get( + request.data, + ).document + val home = if (request.data.contains("/diziler/son-bolumler")) { + document.select("div.episode-item").mapNotNull { it.sonBolumler() } + } else { + document.select("article.type2 ul li").mapNotNull { it.diziler() } + } + + return newHomePageResponse(request.name, home, hasNext=false) + } + + private fun Element.sonBolumler(): SearchResponse? { + val name = this.selectFirst("div.name")?.text() ?: return null + val episode = this.selectFirst("div.episode")?.text()?.trim()?.replace(". Sezon ", "x")?.replace(". Bölüm", "") ?: return null + val title = "$name $episode" + + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href.substringBefore("/sezon"), TvType.TvSeries) { + this.posterUrl = posterUrl + } + } + + private fun Element.diziler(): SearchResponse? { + val title = this.selectFirst("span.title")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } + + private fun SearchItem.toPostSearchResult(): SearchResponse { + val title = this.title + val href = "${mainUrl}${this.url}" + val posterUrl = this.poster + + return if (this.type == "series") { + newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } else { + newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + } + + override suspend fun search(query: String): List<SearchResponse> { + val responseRaw = app.post( + "${mainUrl}/api/search-autocomplete", + headers = mapOf( + "Accept" to "application/json, text/javascript, */*; q=0.01", + "X-Requested-With" to "XMLHttpRequest" + ), + referer = "${mainUrl}/", + data = mapOf( + "query" to query + ) + ) + + val searchItemsMap = jacksonObjectMapper().readValue<Map<String, SearchItem>>(responseRaw.text) + + val searchResponses = mutableListOf<SearchResponse>() + + for ((_, searchItem) in searchItemsMap) { + searchResponses.add(searchItem.toPostSearchResult()) + } + + return searchResponses + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val poster = fixUrlNull(document.selectFirst("[property='og:image']")?.attr("content")) + val year = document.selectXpath("//div[text()='Yapım Yılı']//following-sibling::div").text().trim().toIntOrNull() + val description = document.selectFirst("div.summary p")?.text()?.trim() + val tags = document.selectXpath("//div[text()='Türler']//following-sibling::div").text().trim().split(" ").map { it.trim() } + val rating = document.selectXpath("//div[text()='IMDB Puanı']//following-sibling::div").text().trim().toRatingInt() + val duration = Regex("(\\d+)").find(document.selectXpath("//div[text()='Ortalama Süre']//following-sibling::div").text())?.value?.toIntOrNull() + + if (url.contains("/dizi/")) { + val title = document.selectFirst("div.cover h5")?.text() ?: return null + + val episodes = document.select("div.episode-item").mapNotNull { + val epName = it.selectFirst("div.name")?.text()?.trim() ?: return@mapNotNull null + val epHref = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null + val epEpisode = it.selectFirst("div.episode")?.text()?.trim()?.split(" ")?.get(2)?.replace(".", "")?.toIntOrNull() + val epSeason = it.selectFirst("div.episode")?.text()?.trim()?.split(" ")?.get(0)?.replace(".", "")?.toIntOrNull() + + newEpisode(epHref) { + this.name = epName + this.episode = epEpisode + this.season = epSeason + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + } + } else { + val title = document.selectXpath("//div[@class='g-title'][2]/div").text().trim() + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + } + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("DZP", "data » $data") + val document = app.get(data).document + val iframe = document.selectFirst(".series-player-container iframe")?.attr("src") ?: document.selectFirst("div#vast_new iframe")?.attr("src") ?: return false + Log.d("DZP", "iframe » $iframe") + + val iSource = app.get(iframe, referer="${mainUrl}/").text + val m3uLink = Regex("""file:"([^"]+)""").find(iSource)?.groupValues?.get(1) + if (m3uLink == null) { + Log.d("DZP", "iSource » $iSource") + return loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + val subtitles = Regex(""""subtitle":"([^"]+)""").find(iSource)?.groupValues?.get(1) + if (subtitles != null) { + if (subtitles.contains(",")) { + subtitles.split(",").forEach { + val subLang = it.substringAfter("[").substringBefore("]") + val subUrl = it.replace("[${subLang}]", "") + + subtitleCallback.invoke( + SubtitleFile( + lang = subLang, + url = fixUrl(subUrl) + ) + ) + } + } else { + val subLang = subtitles.substringAfter("[").substringBefore("]") + val subUrl = subtitles.replace("[${subLang}]", "") + + subtitleCallback.invoke( + SubtitleFile( + lang = subLang, + url = fixUrl(subUrl) + ) + ) + } + } + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + + // M3u8Helper.generateM3u8( + // source = this.name, + // name = this.name, + // streamUrl = m3uLink, + // referer = "${mainUrl}/" + // ).forEach(callback) + + return true + } +} diff --git a/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPalModels.kt b/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPalModels.kt new file mode 100644 index 0000000000..770f06ab2a --- /dev/null +++ b/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPalModels.kt @@ -0,0 +1,20 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class SearchItem( + @JsonProperty("id") val id: String, + @JsonProperty("title") val title: String, + @JsonProperty("tr_title") val trTitle: String, + @JsonProperty("poster") val poster: String, + @JsonProperty("genres") val genres: String, + @JsonProperty("imdb") val imdb: String, + @JsonProperty("duration") val duration: String, + @JsonProperty("year") val year: String, + @JsonProperty("view") val view: Int, + @JsonProperty("type") val type: String = "defaultType", + @JsonProperty("url") val url: String +) \ No newline at end of file diff --git a/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPalPlugin.kt b/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPalPlugin.kt new file mode 100644 index 0000000000..a4fbac5d9a --- /dev/null +++ b/DiziPal/src/main/kotlin/com/keyiflerolsun/DiziPalPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class DiziPalPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(DiziPal()) + } +} \ No newline at end of file diff --git a/DiziPal/src/main/kotlin/com/keyiflerolsun/bakalim.py b/DiziPal/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..b8f2c45714 --- /dev/null +++ b/DiziPal/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,51 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from parsel import Selector +from re import findall + +oturum = CloudScraper() + +mainUrl = "https://dizipal737.com" +pageUrl = f"{mainUrl}/diziler?kelime=&durum=&tur=1&type=&siralama=" +istek = oturum.get(pageUrl) +secici = Selector(istek.text) + +def icerik_ver(secici: Selector): + son_date = "" + + for icerik in secici.css("article.type2 ul li"): + konsol.print(icerik.css("span.title::text").get()) + konsol.print(icerik.css("a::attr(href)").get()) + konsol.print(icerik.css("img::attr(src)").get()) + konsol.print(icerik.css("a::attr(data-date)").get()) + konsol.print("\n") + son_date = icerik.css("a::attr(data-date)").get() + + return son_date + +son_date = icerik_ver(secici) + +def devam_ver(son_date) -> str: + istek = oturum.post( + url = f"{mainUrl}/api/load-series", + data = { + "date" : son_date, + "tur" : findall(r"tur=([\d]+)&", pageUrl)[0], + "durum" : "", + "kelime" : "", + "type" : "", + "siralama" : "" + } + ) + veri = istek.json() + if not veri.get("html"): + return "" + + devam_html = "<article class='type2'><ul>" + veri["html"] + "</ul></article>" + + return icerik_ver(Selector(devam_html)) + +while son_date: + son_date = devam_ver(son_date) \ No newline at end of file diff --git a/DiziYou/build.gradle.kts b/DiziYou/build.gradle.kts new file mode 100644 index 0000000000..e28844b612 --- /dev/null +++ b/DiziYou/build.gradle.kts @@ -0,0 +1,18 @@ +version = 7 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Diziyou en kaliteli Türkçe dublaj ve altyazılı yabancı dizi izleme sitesidir. Güncel ve efsanevi dizileri 1080p Full HD kalitede izlemek için hemen tıkla!" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=www.diziyou.co&sz=%size%" +} \ No newline at end of file diff --git a/DiziYou/src/main/AndroidManifest.xml b/DiziYou/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/DiziYou/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/DiziYou/src/main/kotlin/com/keyiflerolsun/DiziYou.kt b/DiziYou/src/main/kotlin/com/keyiflerolsun/DiziYou.kt new file mode 100644 index 0000000000..40e320f258 --- /dev/null +++ b/DiziYou/src/main/kotlin/com/keyiflerolsun/DiziYou.kt @@ -0,0 +1,154 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class DiziYou : MainAPI() { + override var mainUrl = "https://www.diziyou3.com" + override var name = "DiziYou" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.TvSeries) + + override val mainPage = mainPageOf( + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Aile" to "Aile", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Aksiyon" to "Aksiyon", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Animasyon" to "Animasyon", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Belgesel" to "Belgesel", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Bilim+Kurgu" to "Bilim Kurgu", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Dram" to "Dram", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Fantazi" to "Fantazi", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Gerilim" to "Gerilim", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Gizem" to "Gizem", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Komedi" to "Komedi", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Korku" to "Korku", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Macera" to "Macera", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Sava%C5%9F" to "Savaş", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Su%C3%A7" to "Suç", + "${mainUrl}/dizi-arsivi/page/SAYFA/?tur=Vah%C5%9Fi+Bat%C4%B1" to "Vahşi Batı" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val url = request.data.replace("SAYFA", "$page") + val document = app.get(url).document + val home = document.select("div.single-item").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("div#categorytitle a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("div#categorytitle 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<SearchResponse> { + val document = app.get("${mainUrl}/?s=${query}").document + + return document.select("div.incontent div#list-series").mapNotNull { it.toMainPageResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.category_image img")?.attr("src")) + val description = document.selectFirst("div.diziyou_desc")?.ownText()?.trim() + val year = document.selectFirst("span.dizimeta:contains(Yapım Yılı)")?.nextSibling()?.toString()?.trim()?.toIntOrNull() + val tags = document.select("div.genres a").map { it.text() } + val rating = document.selectFirst("span.dizimeta:contains(IMDB)")?.nextSibling()?.toString()?.trim()?.toRatingInt() + val actors = document.selectFirst("span.dizimeta:contains(Oyuncular)")?.nextSibling()?.toString()?.trim()?.split(", ")?.map { Actor(it) } + val trailer = document.selectFirst("iframe.trailer-video")?.attr("src") + + val episodes = document.select("div.bolumust").mapNotNull { + val epName = it.selectFirst("div.baslik")?.ownText()?.trim() ?: return@mapNotNull null + val epHref = it.closest("a")?.attr("href")?.let { href -> fixUrlNull(href) } ?: return@mapNotNull null + val epEpisode = Regex("""(\d+)\. Bölüm""").find(epName)?.groupValues?.get(1)?.toIntOrNull() + val epSeason = Regex("""(\d+)\. Sezon""").find(epName)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + newEpisode(epHref) { + this.name = it.selectFirst("div.bolumismi")?.text()?.trim()?.replace(Regex("""[()]"""), "")?.trim() ?: epName + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + addActors(actors) + addTrailer(trailer) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("DZY", "data » $data") + val document = app.get(data).document + + val itemId = document.selectFirst("iframe#diziyouPlayer")?.attr("src")?.split("/")?.lastOrNull()?.substringBefore(".html") ?: return false + Log.d("DZY", "itemId » $itemId") + + val subTitles = mutableListOf<DiziyouSubtitle>() + val streamUrls = mutableListOf<DiziyouStream>() + val storage = mainUrl.replace("www", "storage") + + document.select("span.diziyouOption").forEach { + val optId = it.attr("id") + + if (optId == "turkceAltyazili") { + subTitles.add(DiziyouSubtitle("Turkish", "${storage}/subtitles/${itemId}/tr.vtt")) + streamUrls.add(DiziyouStream("Orjinal Dil", "${storage}/episodes/${itemId}/play.m3u8")) + } + + if (optId == "ingilizceAltyazili") { + subTitles.add(DiziyouSubtitle("English", "${storage}/subtitles/${itemId}/en.vtt")) + streamUrls.add(DiziyouStream("Orjinal Dil", "${storage}/episodes/${itemId}/play.m3u8")) + } + + if (optId == "turkceDublaj") { + streamUrls.add(DiziyouStream("Türkçe Dublaj", "${storage}/episodes/${itemId}_tr/play.m3u8")) + } + } + + for (sub in subTitles) { + subtitleCallback.invoke( + SubtitleFile( + lang = sub.name, + url = fixUrl(sub.url) + ) + ) + } + + for (stream in streamUrls) { + callback.invoke( + ExtractorLink( + source = stream.name, + name = stream.name, + url = stream.url, + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } + + return true + } + + data class DiziyouSubtitle(val name: String, val url: String) + data class DiziyouStream(val name: String, val url: String) +} \ No newline at end of file diff --git a/DiziYou/src/main/kotlin/com/keyiflerolsun/DiziYouPlugin.kt b/DiziYou/src/main/kotlin/com/keyiflerolsun/DiziYouPlugin.kt new file mode 100644 index 0000000000..9948f6e5b8 --- /dev/null +++ b/DiziYou/src/main/kotlin/com/keyiflerolsun/DiziYouPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class DiziYouPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(DiziYou()) + } +} \ No newline at end of file diff --git a/Dizilla/build.gradle.kts b/Dizilla/build.gradle.kts new file mode 100644 index 0000000000..c128eb2b6e --- /dev/null +++ b/Dizilla/build.gradle.kts @@ -0,0 +1,18 @@ +version = 14 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Dizilla tüm yabancı dizileri ücretsiz olarak Türkçe Dublaj ve altyazılı seçenekleri ile 1080P kalite izleyebileceğiniz yeni nesil yabancı dizi izleme siteniz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=dizilla.club&sz=%size%" +} \ No newline at end of file diff --git a/Dizilla/src/main/AndroidManifest.xml b/Dizilla/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/Dizilla/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/Dizilla/src/main/kotlin/com/keyiflerolsun/ContentXExtractor.kt b/Dizilla/src/main/kotlin/com/keyiflerolsun/ContentXExtractor.kt new file mode 100644 index 0000000000..c37a34a228 --- /dev/null +++ b/Dizilla/src/main/kotlin/com/keyiflerolsun/ContentXExtractor.kt @@ -0,0 +1,69 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class ContentX : ExtractorApi() { + override val name = "ContentX" + override val mainUrl = "https://contentx.me" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + Log.d("Kekik_${this.name}", "url » $url") + + val iSource = app.get(url, referer=extRef).text + val iExtract = Regex("""window\.openPlayer\('([^']+)'""").find(iSource)!!.groups[1]?.value ?: throw ErrorLoadingException("iExtract is null") + + val subUrls = mutableSetOf<String>() + Regex(""""file":"([^"]+)","label":"([^"]+)"""").findAll(iSource).forEach { + val (subUrl, subLang) = it.destructured + + if (subUrl in subUrls) { return@forEach } + subUrls.add(subUrl) + + subtitleCallback.invoke( + SubtitleFile( + lang = subLang.replace("\\u0131", "ı").replace("\\u0130", "İ").replace("\\u00fc", "ü").replace("\\u00e7", "ç"), + url = fixUrl(subUrl.replace("\\", "")) + ) + ) + } + + val vidSource = app.get("${mainUrl}/source2.php?v=${iExtract}", referer=extRef).text + val vidExtract = Regex("""file":"([^"]+)""").find(vidSource)!!.groups[1]?.value ?: throw ErrorLoadingException("vidExtract is null") + val m3uLink = vidExtract.replace("\\", "") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + + val iDublaj = Regex(""","([^']+)","Türkçe""").find(iSource)!!.groups[1]?.value + if (iDublaj != null) { + val dublajSource = app.get("${mainUrl}/source2.php?v=${iDublaj}", referer=extRef).text + val dublajExtract = Regex("""file":"([^"]+)""").find(dublajSource)!!.groups[1]?.value ?: throw ErrorLoadingException("dublajExtract is null") + val dublajLink = dublajExtract.replace("\\", "") + + callback.invoke( + ExtractorLink( + source = "${this.name} Türkçe Dublaj", + name = "${this.name} Türkçe Dublaj", + url = dublajLink, + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } + } +} \ No newline at end of file diff --git a/Dizilla/src/main/kotlin/com/keyiflerolsun/Dizilla.kt b/Dizilla/src/main/kotlin/com/keyiflerolsun/Dizilla.kt new file mode 100644 index 0000000000..902aa31faf --- /dev/null +++ b/Dizilla/src/main/kotlin/com/keyiflerolsun/Dizilla.kt @@ -0,0 +1,212 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class Dizilla : MainAPI() { + override var mainUrl = "https://dizilla.nl" + override var name = "Dizilla" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.TvSeries) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + // override var sequentialMainPageDelay = 250L // ? 0.25 saniye + // override var sequentialMainPageScrollDelay = 250L // ? 0.25 saniye + + override val mainPage = mainPageOf( + "${mainUrl}/tum-bolumler" to "Altyazılı Bölümler", + "${mainUrl}/dublaj-bolumler" to "Dublaj Bölümler", + "${mainUrl}/dizi-turu/aile" to "Aile", + "${mainUrl}/dizi-turu/aksiyon" to "Aksiyon", + "${mainUrl}/dizi-turu/bilim-kurgu" to "Bilim Kurgu", + "${mainUrl}/dizi-turu/romantik" to "Romantik", + "${mainUrl}/dizi-turu/komedi" to "Komedi" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data).document + val home = if (request.data.contains("dizi-turu")) { + document.select("div.grid-cols-3 a").mapNotNull { it.diziler() } + } else { + document.select("div.grid a").mapNotNull { it.sonBolumler() } + } + + return newHomePageResponse(request.name, home) + } + + private fun Element.diziler(): SearchResponse? { + val title = this.selectFirst("h2")?.text() ?: return null + val href = fixUrlNull(this.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) ?: fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } + + private suspend fun Element.sonBolumler(): SearchResponse? { + val name = this.selectFirst("h2")?.text() ?: return null + val epName = this.selectFirst("div.opacity-80")!!.text().replace(". Sezon ", "x").replace(". Bölüm", "") + val title = "$name - $epName" + + val epDoc = app.get(this.attr("href")).document + val href = fixUrlNull(epDoc.selectFirst("a.relative")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(epDoc.selectFirst("img.imgt")?.attr("onerror")?.substringAfter("= '")?.substringBefore("';")) + + return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } + + private fun SearchItem.toSearchResponse(): SearchResponse? { + return newTvSeriesSearchResponse( + title ?: return null, + "${mainUrl}/${slug}", + TvType.TvSeries, + ) { + this.posterUrl = poster + } + } + + override suspend fun search(query: String): List<SearchResponse> { + val mainReq = app.get(mainUrl) + val mainPage = mainReq.document + val cKey = mainPage.selectFirst("input[name='cKey']")?.attr("value") ?: return emptyList() + val cValue = mainPage.selectFirst("input[name='cValue']")?.attr("value") ?: return emptyList() + + val veriler = mutableListOf<SearchResponse>() + + val searchReq = app.post( + "${mainUrl}/bg/searchcontent", + data = mapOf( + "cKey" to cKey, + "cValue" to cValue, + "searchterm" to query + ), + headers = mapOf( + "Accept" to "application/json, text/javascript, */*; q=0.01", + "X-Requested-With" to "XMLHttpRequest" + ), + referer = "${mainUrl}/", + cookies = mapOf( + "showAllDaFull" to "true", + "PHPSESSID" to mainReq.cookies["PHPSESSID"].toString(), + ) + ).parsedSafe<SearchResult>() + + if (searchReq?.data?.state != true) { + throw ErrorLoadingException("Invalid Json response") + } + + searchReq.data.result?.forEach { searchItem -> + veriler.add(searchItem.toSearchResponse() ?: return@forEach) + } + + return veriler + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.page-top h1")?.text() ?: return null + val poster = fixUrlNull(document.selectFirst("div.page-top img")?.attr("src")) ?: fixUrlNull(document.selectFirst("div.page-top img")?.attr("data-src")) + val year = document.selectXpath("//span[text()='Yayın tarihi']//following-sibling::span").text().trim().split(" ").last().toIntOrNull() + val description = document.selectFirst("div.mv-det-p")?.text()?.trim() ?: document.selectFirst("div.w-full div.text-base")?.text()?.trim() + val tags = document.select("[href*='dizi-turu']").map { it.text() } + val rating = document.selectFirst("a[href*='imdb.com'] span")?.text()?.trim().toRatingInt() + val duration = Regex("(\\d+)").find(document.select("div.gap-3 span.text-sm")[1].text())?.value?.toIntOrNull() + val actors = document.select("[href*='oyuncu']").map { + Actor(it.text()) + } + + val episodeList = mutableListOf<Episode>() + document.selectXpath("//div[contains(@class, 'gap-2')]/a[contains(@href, '-sezon')]").forEach { + val epDoc = app.get(fixUrlNull(it.attr("href")) ?: return@forEach).document + + epDoc.select("div.episodes div.cursor-pointer").forEach ep@ { episodeElement -> + val epName = episodeElement.select("a").last()?.text()?.trim() ?: return@ep + val epHref = fixUrlNull(episodeElement.selectFirst("a.opacity-60")?.attr("href")) ?: return@ep + val epDescription = episodeElement.selectFirst("span.t-content")?.text()?.trim() + val epPoster = epDoc.selectFirst("img.object-cover")?.attr("src") + val epEpisode = episodeElement.selectFirst("a.opacity-60")?.text()?.toIntOrNull() + + val parentDiv = episodeElement.parent() + val seasonClass = parentDiv?.className()?.split(" ")?.find { className -> className.startsWith("szn") } + val epSeason = seasonClass?.substringAfter("szn")?.toIntOrNull() + + episodeList.add(newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + this.description = epDescription + this.posterUrl = epPoster + }) + } + + epDoc.select("div.dub-episodes div.cursor-pointer").forEach epDub@ { dubEpisodeElement -> + val epName = dubEpisodeElement.select("a").last()?.text()?.trim() ?: return@epDub + val epHref = fixUrlNull(dubEpisodeElement.selectFirst("a.opacity-60")?.attr("href")) ?: return@epDub + val epDescription = dubEpisodeElement.selectFirst("span.t-content")?.text()?.trim() + val epPoster = epDoc.selectFirst("img.object-cover")?.attr("src") + val epEpisode = dubEpisodeElement.selectFirst("a.opacity-60")?.text()?.toIntOrNull() + + val parentDiv = dubEpisodeElement.parent() + val seasonClass = parentDiv?.className()?.split(" ")?.find { className -> className.startsWith("szn") } + val epSeason = seasonClass?.substringAfter("szn")?.toIntOrNull() + + episodeList.add(newEpisode(epHref) { + this.name = "$epName Dublaj" + this.season = epSeason + this.episode = epEpisode + this.description = epDescription + this.posterUrl = epPoster + }) + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodeList) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("DZL", "data » $data") + val document = app.get(data).document + val iframes = mutableSetOf<String>() + + val alternatifler = document.select("a[href*='player']") + if (alternatifler.isEmpty()) { + val iframe = fixUrlNull(document.selectFirst("div#playerLsDizilla iframe")?.attr("src")) ?: return false + + Log.d("DZL", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } else { + alternatifler.forEach { + val playerDoc = app.get(fixUrlNull(it.attr("href")) ?: return@forEach).document + val iframe = fixUrlNull(playerDoc.selectFirst("div#playerLsDizilla iframe")?.attr("src")) ?: return false + + if (iframe in iframes) { return@forEach } + iframes.add(iframe) + + Log.d("DZL", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + } + + return true + } +} diff --git a/Dizilla/src/main/kotlin/com/keyiflerolsun/DizillaModels.kt b/Dizilla/src/main/kotlin/com/keyiflerolsun/DizillaModels.kt new file mode 100644 index 0000000000..1f6e4d5bcf --- /dev/null +++ b/Dizilla/src/main/kotlin/com/keyiflerolsun/DizillaModels.kt @@ -0,0 +1,23 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class SearchResult( + @JsonProperty("data") val data: SearchData? +) + +data class SearchData( + @JsonProperty("state") val state: Boolean? = null, + @JsonProperty("result") val result: List<SearchItem>? = arrayListOf(), + @JsonProperty("message") val message: String? = null, + @JsonProperty("html") val html: String? = null +) + +data class SearchItem( + @JsonProperty("used_slug") val slug: String? = null, + @JsonProperty("object_name") val title: String? = null, + @JsonProperty("object_poster_url") val poster: String? = null, +) \ No newline at end of file diff --git a/Dizilla/src/main/kotlin/com/keyiflerolsun/DizillaPlugin.kt b/Dizilla/src/main/kotlin/com/keyiflerolsun/DizillaPlugin.kt new file mode 100644 index 0000000000..e518d8a218 --- /dev/null +++ b/Dizilla/src/main/kotlin/com/keyiflerolsun/DizillaPlugin.kt @@ -0,0 +1,19 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class DizillaPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(Dizilla()) + registerExtractorAPI(ContentX()) + registerExtractorAPI(Hotlinger()) + registerExtractorAPI(FourCX()) + registerExtractorAPI(PlayRu()) + registerExtractorAPI(FourPlayRu()) + registerExtractorAPI(FourPichive()) + registerExtractorAPI(Pichive()) + } +} \ No newline at end of file diff --git a/Dizilla/src/main/kotlin/com/keyiflerolsun/HotlingerExtractor.kt b/Dizilla/src/main/kotlin/com/keyiflerolsun/HotlingerExtractor.kt new file mode 100644 index 0000000000..bac462e310 --- /dev/null +++ b/Dizilla/src/main/kotlin/com/keyiflerolsun/HotlingerExtractor.kt @@ -0,0 +1,33 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +class Hotlinger : ContentX() { + override var name = "Hotlinger" + override var mainUrl = "https://hotlinger.com" +} + +class FourCX : ContentX() { + override var name = "FourCX" + override var mainUrl = "https://four.contentx.me" +} + +class PlayRu : ContentX() { + override var name = "PlayRu" + override var mainUrl = "https://playru.net" +} + +class FourPlayRu : ContentX() { + override var name = "FourPlayRu" + override var mainUrl = "https://four.playru.net" +} + +class Pichive : ContentX() { + override var name = "Pichive" + override var mainUrl = "https://pichive.online" +} + +class FourPichive : ContentX() { + override var name = "FourPichive" + override var mainUrl = "https://four.pichive.online" +} \ No newline at end of file diff --git a/Dizilla/src/main/kotlin/com/keyiflerolsun/bakalim.py b/Dizilla/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..9e302d6bc9 --- /dev/null +++ b/Dizilla/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,37 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +# from cloudscraper import CloudScraper as Session +from httpx import Client as Session +from parsel import Selector + +mainUrl = "https://dizilla.club" +oturum = Session() + +istek = oturum.get(mainUrl) +secici = Selector(istek.text) +c_key = secici.css("input[name=cKey]::attr(value)").get() +c_value = secici.css("input[name=cValue]::attr(value)").get() + + + +oturum.cookies.clear() +oturum.headers.update({ + "Accept" : "application/json, text/javascript, */*; q=0.01", + "X-Requested-With" : "XMLHttpRequest", + "Referer" : f"{mainUrl}/", +}) +oturum.cookies.set("showAllDaFull", "true") +oturum.cookies.set("PHPSESSID", istek.cookies["PHPSESSID"]) +istek = oturum.post( + f"{mainUrl}/bg/searchcontent", + data = { + "cKey" : c_key, + "cValue" : c_value, + "searchterm" : "the" + } +) +try: + konsol.print(istek.json()["data"]["result"]) +except KeyError: + konsol.print(istek.json()) \ No newline at end of file diff --git a/ExampleProvider/build.gradle.kts b/ExampleProvider/build.gradle.kts deleted file mode 100644 index ef6b475451..0000000000 --- a/ExampleProvider/build.gradle.kts +++ /dev/null @@ -1,38 +0,0 @@ -dependencies { - implementation("androidx.legacy:legacy-support-v4:1.0.0") - implementation("com.google.android.material:material:1.4.0") - implementation("androidx.recyclerview:recyclerview:1.2.1") -} -// use an integer for version numbers -version = -1 - - -cloudstream { - // All of these properties are optional, you can safely remove them - - description = "Lorem ipsum" - authors = listOf("Cloudburst") - - /** - * Status int as the following: - * 0: Down - * 1: Ok - * 2: Slow - * 3: Beta only - * */ - status = 1 - - tvTypes = listOf("NSFW") - - requiresResources = true - language = "en" - - // random cc logo i found - iconUrl = "https://upload.wikimedia.org/wikipedia/commons/2/2f/Korduene_Logo.png" -} - -android { - buildFeatures { - viewBinding = true - } -} diff --git a/ExampleProvider/src/main/kotlin/com/example/BlankFragment.kt b/ExampleProvider/src/main/kotlin/com/example/BlankFragment.kt deleted file mode 100644 index e4a9c849f0..0000000000 --- a/ExampleProvider/src/main/kotlin/com/example/BlankFragment.kt +++ /dev/null @@ -1,88 +0,0 @@ -package com.example - -import android.content.res.ColorStateList -import android.graphics.drawable.Drawable -import android.os.Build -import android.os.Bundle -import androidx.fragment.app.Fragment -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import com.lagradost.cloudstream3.R -import android.widget.ImageView -import android.widget.TextView -import androidx.annotation.RequiresApi -import androidx.core.content.res.ResourcesCompat -import com.google.android.material.bottomsheet.BottomSheetDialogFragment -import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute - -// TODO: Rename parameter arguments, choose names that match -// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER -private const val ARG_PARAM1 = "param1" -private const val ARG_PARAM2 = "param2" - -/** - * A simple [Fragment] subclass. - * Use the [BlankFragment.newInstance] factory method to - * create an instance of this fragment. - */ -class BlankFragment(val plugin: TestPlugin) : BottomSheetDialogFragment() { - // TODO: Rename and change types of parameters - private var param1: String? = null - private var param2: String? = null - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - arguments?.let { - param1 = it.getString(ARG_PARAM1) - param2 = it.getString(ARG_PARAM2) - } - } - - private fun getDrawable(name: String): Drawable? { - val id = plugin.resources!!.getIdentifier(name, "drawable", BuildConfig.LIBRARY_PACKAGE_NAME) - return ResourcesCompat.getDrawable(plugin.resources!!, id, null) - } - - private fun getString(name: String): String? { - val id = plugin.resources!!.getIdentifier(name, "string", BuildConfig.LIBRARY_PACKAGE_NAME) - return plugin.resources!!.getString(id) - } - - private fun <T : View> View.findView(name: String): T { - val id = plugin.resources!!.getIdentifier(name, "id", BuildConfig.LIBRARY_PACKAGE_NAME) - return this.findViewById(id) - } - - override fun onCreateView( - inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - // Inflate the layout for this fragment - val id = plugin.resources!!.getIdentifier("fragment_blank", "layout", "com.example") - val layout = plugin.resources!!.getLayout(id) - return inflater.inflate(layout, container, false) - } - - @RequiresApi(Build.VERSION_CODES.M) - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - val imageView = view.findView<ImageView>("imageView") - val imageView2 = view.findView<ImageView>("imageView2") - val textView = view.findView<TextView>("textView") - val textView2 = view.findView<TextView>("textView2") - - textView.text = getString("hello_fragment") - textView.setTextAppearance(view.context, R.style.ResultInfoText) - textView2.text = view.context.resources.getText(R.string.legal_notice_text) - - imageView.setImageDrawable( - getDrawable("ic_android_24dp") - ) - imageView.imageTintList = ColorStateList.valueOf(view.context.getColor(R.color.white)) - - imageView2.setImageDrawable( - getDrawable("ic_android_24dp") - ) - imageView2.imageTintList = ColorStateList.valueOf(view.context.colorFromAttribute(R.attr.white)) - } -} diff --git a/ExampleProvider/src/main/kotlin/com/example/ExamplePlugin.kt b/ExampleProvider/src/main/kotlin/com/example/ExamplePlugin.kt deleted file mode 100644 index 06970eadef..0000000000 --- a/ExampleProvider/src/main/kotlin/com/example/ExamplePlugin.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.example - -import com.lagradost.cloudstream3.plugins.CloudstreamPlugin -import com.lagradost.cloudstream3.plugins.Plugin -import com.lagradost.cloudstream3.APIHolder -import android.content.Context -import android.util.Log -import androidx.appcompat.app.AppCompatActivity - -@CloudstreamPlugin -class TestPlugin: Plugin() { - var activity: AppCompatActivity? = null - - override fun load(context: Context) { - activity = context as AppCompatActivity - // All providers should be added in this manner - registerMainAPI(ExampleProvider(this)) - - openSettings = { ctx -> - val frag = BlankFragment(this) - frag.show(activity!!.supportFragmentManager, "sexFrag") - } - } -} \ No newline at end of file diff --git a/ExampleProvider/src/main/kotlin/com/example/ExampleProvider.kt b/ExampleProvider/src/main/kotlin/com/example/ExampleProvider.kt deleted file mode 100644 index 5d975ef6d6..0000000000 --- a/ExampleProvider/src/main/kotlin/com/example/ExampleProvider.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.example - -import androidx.appcompat.app.AppCompatActivity -import com.lagradost.cloudstream3.TvType -import com.lagradost.cloudstream3.MainAPI -import com.lagradost.cloudstream3.SearchResponse - -class ExampleProvider(val plugin: TestPlugin) : MainAPI() { // all providers must be an intstance of MainAPI - override var mainUrl = "https://example.com/" - override var name = "Example sex provider" - override val supportedTypes = setOf(TvType.NSFW) - - override var lang = "en" - - // enable this when your provider has a main page - override val hasMainPage = true - - // this function gets called when you search for something - override suspend fun search(query: String): List<SearchResponse> { - return listOf<SearchResponse>() - } -} \ No newline at end of file diff --git a/ExampleProvider/src/main/res/drawable/ic_android_24dp.xml b/ExampleProvider/src/main/res/drawable/ic_android_24dp.xml deleted file mode 100644 index fe51230740..0000000000 --- a/ExampleProvider/src/main/res/drawable/ic_android_24dp.xml +++ /dev/null @@ -1,5 +0,0 @@ -<vector android:height="24dp" android:tint="#000000" - android:viewportHeight="24" android:viewportWidth="24" - android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> - <path android:fillColor="#FF000000" android:pathData="M17.6,11.48 L19.44,8.3a0.63,0.63 0,0 0,-1.09 -0.63l-1.88,3.24a11.43,11.43 0,0 0,-8.94 0L5.65,7.67a0.63,0.63 0,0 0,-1.09 0.63L6.4,11.48A10.81,10.81 0,0 0,1 20L23,20A10.81,10.81 0,0 0,17.6 11.48ZM7,17.25A1.25,1.25 0,1 1,8.25 16,1.25 1.25,0 0,1 7,17.25ZM17,17.25A1.25,1.25 0,1 1,18.25 16,1.25 1.25,0 0,1 17,17.25Z"/> -</vector> diff --git a/ExampleProvider/src/main/res/layout/fragment_blank.xml b/ExampleProvider/src/main/res/layout/fragment_blank.xml deleted file mode 100644 index 4c4dbf64e7..0000000000 --- a/ExampleProvider/src/main/res/layout/fragment_blank.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/mainFragmentLayout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:orientation="vertical" - tools:context=".BlankFragment"> - - <TextView - android:id="@+id/textView" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/hello_fragment" /> - - <TextView - android:id="@+id/textView2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="[loaded from app trans]" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:orientation="horizontal"> - - <ImageView - android:id="@+id/imageView" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - tools:src="@drawable/ic_android_24dp" /> - - <ImageView - android:id="@+id/imageView2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - tools:src="@drawable/ic_android_24dp" /> - </LinearLayout> - -</LinearLayout> \ No newline at end of file diff --git a/ExampleProvider/src/main/res/values-pl/strings.xml b/ExampleProvider/src/main/res/values-pl/strings.xml deleted file mode 100644 index cdcf0b5ac2..0000000000 --- a/ExampleProvider/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string name="hello_fragment">Witaj zabawny fragmencie!!</string> -</resources> \ No newline at end of file diff --git a/ExampleProvider/src/main/res/values/strings.xml b/ExampleProvider/src/main/res/values/strings.xml deleted file mode 100644 index 9ed67e24f3..0000000000 --- a/ExampleProvider/src/main/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string name="hello_fragment">Hello funny fragment!!</string> -</resources> \ No newline at end of file diff --git a/FilmMakinesi/build.gradle.kts b/FilmMakinesi/build.gradle.kts new file mode 100644 index 0000000000..464e1d29ba --- /dev/null +++ b/FilmMakinesi/build.gradle.kts @@ -0,0 +1,18 @@ +version = 6 + +cloudstream { + authors = listOf("keyiflerolsun", "usdogu") + language = "tr" + description = "Film Makinesi, en yeni ve en güncel filmleri sitemizde full HD kalite farkı ile izleyebilirsiniz. HD film izle denildiğinde akla gelen en kaliteli film izleme sitesi." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=filmmakinesi.film&sz=%size%" +} diff --git a/FilmMakinesi/src/main/AndroidManifest.xml b/FilmMakinesi/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/FilmMakinesi/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/CloseLoadExtractor.kt b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/CloseLoadExtractor.kt new file mode 100644 index 0000000000..3ecf4d4294 --- /dev/null +++ b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/CloseLoadExtractor.kt @@ -0,0 +1,55 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import android.util.Base64 + +private fun getm3uLink(data: String): String { + val first = Base64.decode(data,Base64.DEFAULT).reversedArray() + val second = Base64.decode(first, Base64.DEFAULT) + val result = second.toString(Charsets.UTF_8).split("|")[1] + + return result +} + +open class CloseLoad : ExtractorApi() { + override val name = "CloseLoad" + override val mainUrl = "https://closeload.filmmakinesi.de" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + Log.d("Kekik_${this.name}", "url » $url") + + val iSource = app.get(url, referer = extRef) + + iSource.document.select("track").forEach { + subtitleCallback.invoke( + SubtitleFile( + lang = it.attr("label"), + url = fixUrl(it.attr("src")) + ) + ) + } + + val obfuscatedScript = iSource.document.select("script[type=text/javascript]")[1].data().trim() + val rawScript = getAndUnpack(obfuscatedScript) + val (data) = Regex("""return result\}var .*?=.*?\("(.*?)"\)""").find(rawScript)?.destructured ?: throw ErrorLoadingException("data not found") + val m3uLink = getm3uLink(data) + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = mainUrl, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} diff --git a/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/FilmMakinesi.kt b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/FilmMakinesi.kt new file mode 100644 index 0000000000..8a36d2b331 --- /dev/null +++ b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/FilmMakinesi.kt @@ -0,0 +1,134 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class FilmMakinesi : MainAPI() { + override var mainUrl = "https://filmmakinesi.de" + override var name = "FilmMakinesi" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + override var sequentialMainPageDelay = 50L // ? 0.05 saniye + override var sequentialMainPageScrollDelay = 50L // ? 0.05 saniye + + override val mainPage = mainPageOf( + "${mainUrl}/page/" to "Son Filmler", + "${mainUrl}/film-izle/olmeden-izlenmesi-gerekenler/page/" to "Ölmeden İzle", + "${mainUrl}/film-izle/aksiyon-filmleri-izle/page/" to "Aksiyon", + "${mainUrl}/film-izle/bilim-kurgu-filmi-izle/page/" to "Bilim Kurgu", + "${mainUrl}/film-izle/macera-filmleri/page/" to "Macera", + "${mainUrl}/film-izle/komedi-filmi-izle/page/" to "Komedi", + "${mainUrl}/film-izle/romantik-filmler-izle/page/" to "Romantik", + "${mainUrl}/film-izle/belgesel/page/" to "Belgesel", + "${mainUrl}/film-izle/fantastik-filmler-izle/page/" to "Fantastik", + "${mainUrl}/film-izle/polisiye-filmleri-izle/page/" to "Polisiye Suç", + "${mainUrl}/film-izle/korku-filmleri-izle-hd/page/" to "Korku", + // "${mainUrl}/film-izle/savas/page/" to "Tarihi ve Savaş", + // "${mainUrl}/film-izle/gerilim-filmleri-izle/page/" to "Gerilim Heyecan", + // "${mainUrl}/film-izle/gizemli/page/" to "Gizem", + // "${mainUrl}/film-izle/aile-filmleri/page/" to "Aile", + // "${mainUrl}/film-izle/animasyon-filmler/page/" to "Animasyon", + // "${mainUrl}/film-izle/western/page/" to "Western", + // "${mainUrl}/film-izle/biyografi/page/" to "Biyografik", + // "${mainUrl}/film-izle/dram/page/" to "Dram", + // "${mainUrl}/film-izle/muzik/page/" to "Müzik", + // "${mainUrl}/film-izle/spor/page/" to "Spor" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = if (request.data.contains("/film-izle/")) { + document.select("section#film_posts article").mapNotNull { it.toSearchResult() } + } else { + document.select("section#film_posts div.tooltip").mapNotNull { it.toSearchResult() } + } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("h6 a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("h6 a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) ?: fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + private fun Element.toRecommendResult(): SearchResponse? { + val title = this.select("a").last()?.text() ?: return null + val href = fixUrlNull(this.select("a").last()?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}?s=${query}").document + + return document.select("section#film_posts article").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div#film_izle h1")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("[property='og:image']")?.attr("content")) + val description = document.select("section#film_single article p").last()?.text()?.trim() + val tags = document.selectFirst("dt:contains(Tür:) + dd")?.text()?.split(", ") + val rating = document.selectFirst("dt:contains(IMDB Puanı:) + dd")?.text()?.trim()?.toRatingInt() + val year = document.selectFirst("dt:contains(Yapım Yılı:) + dd")?.text()?.trim()?.toIntOrNull() + + val durationElement = document.select("dt:contains(Film Süresi:) + dd time").attr("datetime") + // ? ISO 8601 süre formatını ayrıştırma (örneğin "PT129M") + val duration = if (durationElement.startsWith("PT") && durationElement.endsWith("M")) { + durationElement.drop(2).dropLast(1).toIntOrNull() ?: 0 + } else { + 0 + } + + val recommendations = document.select("div.hidden-mobile li").mapNotNull { it.toRecommendResult() } + val actors = document.selectFirst("dt:contains(Oyuncular:) + dd")?.text()?.split(", ")?.map { + Actor(it.trim()) + } + + val trailer = fixUrlNull(document.selectXpath("//iframe[@title='Fragman']").attr("data-src")) + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } + + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("FLMM", "data » $data") + val document = app.get(data).document + val iframeElement = document.selectFirst("div.player-div iframe") + val iframe = iframeElement?.attr("src") ?: iframeElement?.attr("data-src") ?: return false + Log.d("FLMM", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + + return true + } +} diff --git a/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/FilmMakinesiPlugin.kt b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/FilmMakinesiPlugin.kt new file mode 100644 index 0000000000..0e6b74a88f --- /dev/null +++ b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/FilmMakinesiPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class FilmMakinesiPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(FilmMakinesi()) + registerExtractorAPI(CloseLoad()) + } +} \ No newline at end of file diff --git a/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/bakalim.py b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..2c64b20b52 --- /dev/null +++ b/FilmMakinesi/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,42 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from parsel import Selector +from re import findall +from base64 import b64decode + +oturum = CloudScraper() +oturum.headers.update({"User-Agent":"Mozilla/5.0", "Referer":"https://filmmakinesi.film/"}) + +film_link = "https://filmmakinesi.film/film/yaban-kedisi-izle-2022/" + +istek = oturum.get(film_link) +secici = Selector(istek.text) +iframe = secici.css("div.player-div iframe::attr(data-src)").get() +konsol.print(iframe) + +i_source = oturum.get(iframe) +atob = findall(r"""aHR0[0-9a-zA-Z+\/=]*""", i_source.text)[0] +if padding_needed := len(atob) % 4: + atob += "=" * (4 - padding_needed) + +m3u_link = b64decode(atob).decode("utf-8") +konsol.print(m3u_link) + +i_selector = Selector(i_source.text) +for track in i_selector.css("track"): + label = track.css("::attr(label)").get() + src = track.css("::attr(src)").get() + konsol.print(f"{label} | {src}") + +# m3u_link = findall(r"""contentUrl\": \"([^\"]+)""", i_source.text)[0] +# print(m3u_link) +# oturum.headers.update({"Referer": "https://closeload.filmmakinesi.film/"}) +# konsol.print(oturum.get(m3u_link).text) + + +# thumbnail = findall(r"""closeload\.filmmakinesi\.film\/img\/([^\"]+)\.jpg""", i_source.text)[0] +# posible = f"https://balancehls6.closeload.com/hls/{thumbnail}.mp4/master.txt" +# oturum.headers.update({"Referer": "https://closeload.filmmakinesi.film/"}) +# konsol.print(oturum.get(posible)) \ No newline at end of file diff --git a/FilmModu/build.gradle.kts b/FilmModu/build.gradle.kts new file mode 100644 index 0000000000..e57650b2af --- /dev/null +++ b/FilmModu/build.gradle.kts @@ -0,0 +1,18 @@ +version = 8 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Film modun geldiyse yüksek kalitede en yeni filmleri izle, 1080p izleyebileceğiniz reklamsiz film sitesi." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=www.filmmodu17.com&sz=%size%" +} \ No newline at end of file diff --git a/FilmModu/src/main/AndroidManifest.xml b/FilmModu/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/FilmModu/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModu.kt b/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModu.kt new file mode 100644 index 0000000000..9b6ab4b4fc --- /dev/null +++ b/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModu.kt @@ -0,0 +1,139 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class FilmModu : MainAPI() { + override var mainUrl = "https://www.filmmodu.io" + override var name = "FilmModu" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/hd-film-kategori/4k-film-izle" to "4K", + "${mainUrl}/hd-film-kategori/aile-filmleri" to "Aile", + "${mainUrl}/hd-film-kategori/aksiyon" to "Aksiyon", + "${mainUrl}/hd-film-kategori/animasyon" to "Animasyon", + "${mainUrl}/hd-film-kategori/belgeseller" to "Belgesel", + "${mainUrl}/hd-film-kategori/bilim-kurgu-filmleri" to "Bilim-Kurgu", + "${mainUrl}/hd-film-kategori/dram-filmleri" to "Dram", + "${mainUrl}/hd-film-kategori/fantastik-filmler" to "Fantastik", + "${mainUrl}/hd-film-kategori/gerilim" to "Gerilim", + "${mainUrl}/hd-film-kategori/gizem-filmleri" to "Gizem", + "${mainUrl}/hd-film-kategori/hd-hint-filmleri" to "Hint Filmleri", + "${mainUrl}/hd-film-kategori/kisa-film" to "Kısa Film", + "${mainUrl}/hd-film-kategori/hd-komedi-filmleri" to "Komedi", + "${mainUrl}/hd-film-kategori/komedi" to "Komedi", + "${mainUrl}/hd-film-kategori/korku-filmleri" to "Korku", + "${mainUrl}/hd-film-kategori/kult-filmler-izle" to "Kült Filmler", + "${mainUrl}/hd-film-kategori/macera-filmleri" to "Macera", + "${mainUrl}/hd-film-kategori/muzik" to "Müzik", + "${mainUrl}/hd-film-kategori/odullu-filmler-izle" to "Oscar Ödüllü Filmler", + "${mainUrl}/hd-film-kategori/romantik-filmler" to "Romantik", + "${mainUrl}/hd-film-kategori/savas" to "Savaş", + "${mainUrl}/hd-film-kategori/savas-filmleri" to "Savaş", + "${mainUrl}/hd-film-kategori/stand-up" to "Stand Up", + "${mainUrl}/hd-film-kategori/suc-filmleri" to "Suç", + "${mainUrl}/hd-film-kategori/tarih" to "Tarih", + "${mainUrl}/hd-film-kategori/tavsiye-filmler" to "Tavsiye Filmler", + "${mainUrl}/hd-film-kategori/tv-film" to "TV film", + "${mainUrl}/hd-film-kategori/vahsi-bati-filmleri" to "Vahşi Batı", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}?page=${page}").document + val home = document.select("div.movie").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("picture img")?.attr("src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/film-ara?term=${query}").document + + return document.select("div.movie").mapNotNull { it.toMainPageResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val orgTitle = document.selectFirst("div.titles h1")?.text()?.trim() ?: return null + val altTitle = document.selectFirst("div.titles h2")?.text()?.trim() ?: "" + val title = if (altTitle.isNotEmpty()) "$orgTitle - $altTitle" else orgTitle + val poster = fixUrlNull(document.selectFirst("img.img-responsive")?.attr("src")) + val description = document.selectFirst("p[itemprop='description']")?.text()?.trim() + val year = document.selectFirst("span[itemprop='dateCreated']")?.text()?.trim()?.toIntOrNull() + val tags = document.select("div.description a[href*='-kategori/']").map { it.text() } + val rating = document.selectFirst("div.description p")?.ownText()?.split(" ")?.last()?.trim()?.toRatingInt() + val actors = document.select("div.description a[href*='-oyuncu-']").map { Actor(it.selectFirst("span")!!.text()) } + val trailer = document.selectFirst("div.container iframe")?.attr("src") + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + addActors(actors) + addTrailer(trailer) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("FLMMD", "data » $data") + val document = app.get(data).document + + document.select("div.alternates a").forEach { + val altLink = fixUrlNull(it.attr("href")) ?: return@forEach + val altName = it.text() + if (altName == "Fragman") return@forEach + + val altReq = app.get(altLink) + val vidId = Regex("""var videoId = '(.*)'""").find(altReq.text)?.groupValues?.get(1) ?: return@forEach + val vidType = Regex("""var videoType = '(.*)'""").find(altReq.text)?.groupValues?.get(1) ?: return@forEach + + val vidReq = app.get("${mainUrl}/get-source?movie_id=${vidId}&type=${vidType}").parsedSafe<GetSource>() ?: return@forEach + + if (vidReq.subtitle != null) { + subtitleCallback.invoke( + SubtitleFile( + lang = "Türkçe", + url = fixUrl(vidReq.subtitle) + ) + ) + } + + vidReq.sources?.forEach { source -> + callback.invoke( + ExtractorLink( + source = "${this.name} - $altName", + name = "${this.name} - $altName", + url = fixUrl(source.src), + referer = "${mainUrl}/", + quality = getQualityFromName(source.label), + type = INFER_TYPE + ) + ) + } + } + + return true + } +} \ No newline at end of file diff --git a/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModuModels.kt b/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModuModels.kt new file mode 100644 index 0000000000..d09f4924f8 --- /dev/null +++ b/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModuModels.kt @@ -0,0 +1,16 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class GetSource( + @JsonProperty("subtitle") val subtitle: String? = null, + @JsonProperty("sources") val sources: List<Sources>? = arrayListOf() +) + +data class Sources( + @JsonProperty("src") val src: String, + @JsonProperty("label") val label: String, +) \ No newline at end of file diff --git a/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModuPlugin.kt b/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModuPlugin.kt new file mode 100644 index 0000000000..d1ea6a684d --- /dev/null +++ b/FilmModu/src/main/kotlin/com/keyiflerolsun/FilmModuPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class FilmModuPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(FilmModu()) + } +} \ No newline at end of file diff --git a/FullHDFilm/build.gradle.kts b/FullHDFilm/build.gradle.kts new file mode 100644 index 0000000000..863c9f2f66 --- /dev/null +++ b/FullHDFilm/build.gradle.kts @@ -0,0 +1,18 @@ +version = 12 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Fullhdfilm ile en yeni vizyon filmler Full HD ve kesintisiz film sizlerle. Özgün film arşivimizle en üstün kaliteli film izle keyfini sunuyoruz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=fullhdfilm.pro&sz=%size%" +} \ No newline at end of file diff --git a/FullHDFilm/src/main/AndroidManifest.xml b/FullHDFilm/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/FullHDFilm/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/FullHDFilm/src/main/kotlin/com/keyiflerolsun/FullHDFilm.kt b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/FullHDFilm.kt new file mode 100644 index 0000000000..83ace5e7a7 --- /dev/null +++ b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/FullHDFilm.kt @@ -0,0 +1,188 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class FullHDFilm : MainAPI() { + override var mainUrl = "https://fullhdfilm.site" + override var name = "FullHDFilm" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) + + override val mainPage = mainPageOf( + "${mainUrl}/yabanci-dizi-izle/page" to "Yabancı Dizi", + "${mainUrl}/yabanci-film-izle/page" to "Yabancı Filmler", + "${mainUrl}/yerli-film-izle/page" to "Yerli Film", + "${mainUrl}/netflix-filmleri-izle/page" to "Netflix", + "${mainUrl}/aile-filmleri/page" to "Aile", + "${mainUrl}/aksiyon-filmleri-izle-hd1/page" to "Aksiyon", + "${mainUrl}/animasyon-filmleri-izlesene/page" to "Animasyon", + "${mainUrl}/anime-izle/page" to "Anime", + "${mainUrl}/belgesel/page" to "Belgesel", + "${mainUrl}/bilim-kurgu-filmleri/page" to "Bilim-Kurgu", + "${mainUrl}/biyografi-filmleri/page" to "Biyografi", + "${mainUrl}/dram-filmleri/page" to "Dram", + "${mainUrl}/fantastik-filmler-izle/page" to "Fantastik", + "${mainUrl}/gerilim-filmleri-izle-hd/page" to "Gerilim", + "${mainUrl}/gizem-filmleri/page" to "Gizem", + "${mainUrl}/komedi-filmleri/page" to "Komedi", + "${mainUrl}/korku-filmleri-izle/page" to "Korku", + "${mainUrl}/macera-filmleri-izle-hd/page" to "Macera", + "${mainUrl}/romantik-filmler/page" to "Romantik", + "${mainUrl}/savas-filmleri-izle-hd/page" to "Savaş", + "${mainUrl}/suc-filmleri-izle/page" to "Suç" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}/${page}/").document + val home = document.select("div.movie_box").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("h2")?.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 } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/arama/?s=${query}").document + + return document.select("div.movie_box").mapNotNull { it.toMainPageResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1 span")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("[property='og:image']")?.attr("content")) + val description = document.selectFirst("div[itemprop='description']")?.text()?.substringAfter("⭐")?.substringAfter("izleyin.")?.substringAfter("konusu:")?.trim() + val year = document.selectFirst("span[itemprop='dateCreated'] a")?.text()?.trim()?.toIntOrNull() + val tags = document.select("div.detail ul.bottom li:nth-child(5) span a").map { it.text() } + val rating = document.selectFirst("ul.right li:nth-child(2) span")?.text()?.trim()?.toRatingInt() + val duration = document.selectFirst("span[itemprop='duration']")?.text()?.split(" ")?.first()?.trim()?.toIntOrNull() + val actors = document.select("sc[itemprop='actor'] span").map { Actor(it.text()) } + val trailer = fixUrlNull(document.selectFirst("[property='og:video']")?.attr("content")) + + if (url.contains("-dizi") || tags.any { it.lowercase().contains("dizi") }) { + val episodes = mutableListOf<Episode>() + + val iframeSkici = IframeKodlayici() + + val partNumbers = document.select("li.psec").map { it.attr("id") } + val partNames = document.select("li.psec a").map { it.text().trim() } + val pdataMatches = Regex("""pdata\['(.*?)'] = '(.*?)';""").findAll(document.html()) + val pdataList = pdataMatches.map { it.destructured }.toList() + + partNumbers.forEachIndexed { index, partNumber -> + val partName = partNames.getOrNull(index) + val pdata = pdataList.getOrNull(index) + + val value = pdata?.component2() + + if (partName!!.lowercase().contains("fragman") || partNumber.lowercase().contains("fragman")) return@forEachIndexed + + val iframeData = iframeSkici.iframeCoz(value!!) + val iframeLink = app.get(iframeData, referer="${mainUrl}/").url + + val szNum = partNumber.takeIf { it.contains("sezon") }?.substringBefore("sezon")?.toIntOrNull() ?: 1 + val epNum = partName.substringBefore(".").trim().toIntOrNull() ?: 1 + + episodes.add(newEpisode(iframeLink) { + this.name = "${szNum}. Sezon ${epNum}. Bölüm" + this.season = szNum + this.episode = epNum + }) + } + + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.duration = duration + addActors(actors) + addTrailer(trailer) + } + } else { + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.year = year + 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 { + Log.d("FHDF", "data » $data") + + if (!data.contains(mainUrl)) { + loadExtractor(data, "${mainUrl}/", subtitleCallback, callback) + + return true + } + + val document = app.get(data).document + + val iframeSkici = IframeKodlayici() + + val partNumbers = document.select("li.psec").map { it.attr("id") } + val partNames = document.select("li.psec a").map { it.text().trim() } + val pdataMatches = Regex("""pdata\['(.*?)'] = '(.*?)';""").findAll(document.html()) + val pdataList = pdataMatches.map { it.destructured }.toList() + + partNumbers.forEachIndexed { index, partNumber -> + val partName = partNames.getOrNull(index) + val pdata = pdataList.getOrNull(index) + + val key = pdata?.component1() + val value = pdata?.component2() + + if (partName!!.lowercase().contains("fragman") || partNumber.lowercase().contains("fragman")) return@forEachIndexed + + Log.d("FHDF", "partNumber » $partNumber") // ! fragman0 + Log.d("FHDF", "partName » $partName") // ! Fragman + Log.d("FHDF", "key » $key") // ! prt_fragman0 + // Log.d("FHDF", "value » ${value}") // ! Şifreli veri + + val iframeData = iframeSkici.iframeCoz(value!!) + val iframeLink = app.get(iframeData, referer="${mainUrl}/").url + Log.d("FHDF", "iframeLink » $iframeLink") + + loadExtractor(iframeLink, "${mainUrl}/", subtitleCallback) { extractor -> + callback.invoke ( + ExtractorLink ( + source = "$partName - ${extractor.source}", + name = "$partName - ${extractor.name}", + url = extractor.url, + referer = extractor.referer, + quality = extractor.quality, + type = extractor.type + ) + ) + } + } + + return true + } +} \ No newline at end of file diff --git a/FullHDFilm/src/main/kotlin/com/keyiflerolsun/FullHDFilmPlugin.kt b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/FullHDFilmPlugin.kt new file mode 100644 index 0000000000..e49d35cb2f --- /dev/null +++ b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/FullHDFilmPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class FullHDFilmPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(FullHDFilm()) + } +} \ No newline at end of file diff --git a/FullHDFilm/src/main/kotlin/com/keyiflerolsun/IframeKodlayici.kt b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/IframeKodlayici.kt new file mode 100644 index 0000000000..816103dd1a --- /dev/null +++ b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/IframeKodlayici.kt @@ -0,0 +1,33 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Base64 + +class IframeKodlayici { + companion object { + fun tersCevir(metin: String): String { + return metin.reversed() + } + + fun base64Coz(encodedString: String): String { + val decodedBytes = Base64.decode(encodedString, Base64.DEFAULT) + return String(decodedBytes, Charsets.UTF_8) + } + + fun iframeParse(htmlIcerik: String): String { + val iframePattern = """<iframe[^>]+src=["']([^"']+)["'][^>]*>""".toRegex() + val match = iframePattern.find(htmlIcerik) + return match?.groupValues?.get(1) ?: throw IllegalArgumentException("Iframe src bulunamadı") + } + } + + fun iframeCoz(veri: String): String { + var tempVeri = veri + if (!tempVeri.startsWith("PGltZyB3aWR0aD0iMTAwJSIgaGVpZ2")) { + tempVeri = tersCevir("BSZtFmcmlGP") + tempVeri + } + val iframe = base64Coz(tempVeri) + return iframeParse(iframe) + } +} \ No newline at end of file diff --git a/FullHDFilm/src/main/kotlin/com/keyiflerolsun/IframeKodlayici.py b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/IframeKodlayici.py new file mode 100644 index 0000000000..c27c709b19 --- /dev/null +++ b/FullHDFilm/src/main/kotlin/com/keyiflerolsun/IframeKodlayici.py @@ -0,0 +1,36 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +import re, base64 + +class IframeKodlayici: + @staticmethod + def ters_cevir(metin: str) -> str: + return metin[::-1] + + @staticmethod + def base64_coz(encoded_string: str) -> str: + return base64.b64decode(encoded_string).decode("utf-8") + + @staticmethod + def iframe_parse(html_icerik: str) -> list: + iframe_pattern = r'<iframe[^>]+src=["\']([^"\']+)["\'][^>]*>' + return re.search(iframe_pattern, html_icerik).group(1) + + def iframe_coz(self, veri: str) -> str: + if not veri.startswith("PGltZyB3aWR0aD0iMTAwJSIgaGVpZ2"): + veri = self.ters_cevir("BSZtFmcmlGP") + veri + + iframe = self.base64_coz(veri) + return self.iframe_parse(iframe) + + +oturum = CloudScraper() +istek = oturum.get("https://fullhdfilm.pro/american-sports-story-izle/") +partlar = re.findall(r"pdata\[\'(.*?)'\] = \'(.*?)\';", istek.text) +kodlayici = IframeKodlayici() + +for parca_id, parca_veri in partlar: + iframe = kodlayici.iframe_coz(parca_veri) + konsol.log(f"{parca_id:<6} » {iframe}") \ No newline at end of file diff --git a/FullHDFilmizlesene/build.gradle.kts b/FullHDFilmizlesene/build.gradle.kts new file mode 100644 index 0000000000..96da9fa319 --- /dev/null +++ b/FullHDFilmizlesene/build.gradle.kts @@ -0,0 +1,18 @@ +version = 4 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Sinema zevkini evinize kadar getirdik. Türkiye'nin lider Film sitesinde, en yeni filmleri Full HD izleyin." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=www.fullhdfilmizlesene.de&sz=%size%" +} diff --git a/FullHDFilmizlesene/src/main/AndroidManifest.xml b/FullHDFilmizlesene/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/FullHDFilmizlesene/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/FullHDFilmizlesene.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/FullHDFilmizlesene.kt new file mode 100644 index 0000000000..f02b3f039f --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/FullHDFilmizlesene.kt @@ -0,0 +1,218 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import android.util.Base64 +import org.jsoup.nodes.Element +import org.jsoup.nodes.Document +import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class FullHDFilmizlesene : MainAPI() { + override var mainUrl = "https://www.fullhdfilmizlesene.de" + override var name = "FullHDFilmizlesene" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/en-cok-izlenen-filmler-izle-hd/" to "En Çok izlenen Filmler", + "${mainUrl}/filmizle/imdb-puani-yuksek-filmler-izle-1/" to "IMDB Puanı Yüksek Filmler", + "${mainUrl}/filmizle/aile-filmleri-izle-2/" to "Aile Filmleri", + "${mainUrl}/filmizle/aksiyon-filmler-izle-1/" to "Aksiyon Filmleri", + "${mainUrl}/filmizle/animasyon-filmleri-izle-4/" to "Animasyon Filmleri", + "${mainUrl}/filmizle/belgesel-filmleri-izle-2/" to "Belgeseller", + "${mainUrl}/filmizle/bilim-kurgu-filmleri-izle-1/" to "Bilim Kurgu Filmleri", + "${mainUrl}/filmizle/bluray-filmler-izle-1/" to "Blu Ray Filmler", + "${mainUrl}/filmizle/cizgi-filmler-izle-1/" to "Çizgi Filmler", + "${mainUrl}/filmizle/dram-filmleri-izle/" to "Dram Filmleri", + "${mainUrl}/filmizle/fantastik-filmleri-izle-2/" to "Fantastik Filmler", + "${mainUrl}/filmizle/gerilim-filmleri-izle-3/" to "Gerilim Filmleri", + "${mainUrl}/filmizle/gizem-filmleri-izle/" to "Gizem Filmleri", + "${mainUrl}/filmizle/hint-filmler-fh-hd-izle/" to "Hint Filmleri", + "${mainUrl}/filmizle/komedi-filmleri-izle-2/" to "Komedi Filmleri", + "${mainUrl}/filmizle/korku-filmleri-izle-2/" to "Korku Filmleri", + "${mainUrl}/filmizle/macera-filmleri-izle-1/" to "Macera Filmleri", + "${mainUrl}/filmizle/muzikal-filmleri-izle/" to "Müzikal Filmler", + "${mainUrl}/filmizle/polisiye-filmleri-izle-1/" to "Polisiye Filmleri", + "${mainUrl}/filmizle/psikolojik-filmleri-izle/" to "Psikolojik Filmler", + "${mainUrl}/filmizle/romantik-filmler-izle-1/" to "Romantik Filmler", + "${mainUrl}/filmizle/savas-filmleri-izle-2/" to "Savaş Filmleri", + "${mainUrl}/filmizle/suc-filmleri-izle-3/" to "Suç Filmleri", + "${mainUrl}/filmizle/tarih-filmleri-izle/" to "Tarih Filmleri", + "${mainUrl}/filmizle/western-filmleri-izle/" to "Western Filmler", + "${mainUrl}/filmizle/yerli-filmler-izle-3/" to "Yerli Filmler", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("li.film").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("span.film-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 } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/arama/${query}").document + + return document.select("li.film").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div[class=izle-titles]")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div img")?.attr("data-src")) + val year = document.selectFirst("div.dd a.category")?.text()?.split(" ")?.get(0)?.trim()?.toIntOrNull() + val description = document.selectFirst("div.ozet-ic > p")?.text()?.trim() + val tags = document.select("a[rel='category tag']").map { it.text() } + val rating = document.selectFirst("div.puanx-puan")?.text()?.split(" ")?.last()?.toRatingInt() + val duration = document.selectFirst("span.sure")?.text()?.split(" ")?.get(0)?.trim()?.toIntOrNull() + val trailer = Regex("""embedUrl": "(.*)"""").find(document.html())?.groupValues?.get(1) + val actors = document.select("div.film-info ul li:nth-child(2) a > span").map { + Actor(it.text()) + } + + + val recommendations = document.selectXpath("//div[span[text()='Benzer Filmler']]/following-sibling::section/ul/li").mapNotNull { + val recName = it.selectFirst("span.film-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")) + newMovieSearchResponse(recName, recHref, TvType.Movie) { + this.posterUrl = recPosterUrl + } + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } + + private fun atob(s: String): String { + return String(Base64.decode(s, Base64.DEFAULT)) + } + + private fun rtt(s: String): String { + fun rot13Char(c: Char): Char { + return when (c) { + in 'a'..'z' -> ((c - 'a' + 13) % 26 + 'a'.code).toChar() + in 'A'..'Z' -> ((c - 'A' + 13) % 26 + 'A'.code).toChar() + else -> c + } + } + + return s.map { rot13Char(it) }.joinToString("") + } + + private fun getVideoLinks(document: Document): List<Map<String, String>> { + val scriptElement = document.select("script").firstOrNull { it.data().isNotEmpty() } + val scriptContent = scriptElement?.data()?.trim() ?: return emptyList() + + val scxData = Regex("scx = (.*?);").find(scriptContent)?.groupValues?.get(1) ?: return emptyList() + val scxMap: SCXData = jacksonObjectMapper().readValue(scxData) + val keys = listOf("atom", "advid", "advidprox", "proton", "fast", "fastly", "tr", "en") + + val linkList = mutableListOf<Map<String, String>>() + + for (key in keys) { + val t = when (key) { + "atom" -> scxMap.atom?.sx?.t + "advid" -> scxMap.advid?.sx?.t + "advidprox" -> scxMap.advidprox?.sx?.t + "proton" -> scxMap.proton?.sx?.t + "fast" -> scxMap.fast?.sx?.t + "fastly" -> scxMap.fastly?.sx?.t + "tr" -> scxMap.tr?.sx?.t + "en" -> scxMap.en?.sx?.t + else -> null + } + + when (t) { + is List<*> -> { + val links = t.filterIsInstance<String>().map { link -> atob(rtt(link)) } + linkList.add(mapOf(key to links.joinToString(","))) + } + is Map<*, *> -> { + val links = t.mapValues { (_, value) -> + if (value is String) atob(rtt(value)) else "" + } + val safeLinks = links.mapKeys { (key, _) -> + key?.toString() ?: "Unknown" + } + linkList.add(safeLinks) + } + } + } + + return linkList + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("FHD", "data » $data") + val document = app.get(data).document + val videoLinks = getVideoLinks(document) + Log.d("FHD", "videoLinks » $videoLinks") + if (videoLinks.isEmpty()) return false + + + for (videoMap in videoLinks) { + for ((key, value) in videoMap) { + val videoUrl = fixUrlNull(value) ?: continue + if (videoUrl.contains("turbo.imgz.me")) { + loadExtractor("${key}||${videoUrl}", "${mainUrl}/", subtitleCallback, callback) + } else { + loadExtractor(videoUrl, "${mainUrl}/", subtitleCallback, callback) + } + } + } + + return true + } + + @JsonIgnoreProperties(ignoreUnknown = true) + data class SCXData( + @JsonProperty("atom") val atom: AtomData? = null, + @JsonProperty("advid") val advid: AtomData? = null, + @JsonProperty("advidprox") val advidprox: AtomData? = null, + @JsonProperty("proton") val proton: AtomData? = null, + @JsonProperty("fast") val fast: AtomData? = null, + @JsonProperty("fastly") val fastly: AtomData? = null, + @JsonProperty("tr") val tr: AtomData? = null, + @JsonProperty("en") val en: AtomData? = null, + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class AtomData( + @JsonProperty("sx") var sx: SXData + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class SXData( + @JsonProperty("t") var t: Any + ) +} diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/FullHDFilmizlesenePlugin.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/FullHDFilmizlesenePlugin.kt new file mode 100644 index 0000000000..4654dc2138 --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/FullHDFilmizlesenePlugin.kt @@ -0,0 +1,17 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class FullHDFilmizlesenePlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(FullHDFilmizlesene()) + registerExtractorAPI(RapidVid()) + registerExtractorAPI(TRsTX()) + registerExtractorAPI(VidMoxy()) + registerExtractorAPI(Sobreatsesuyp()) + registerExtractorAPI(TurboImgz()) + } +} \ No newline at end of file diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/RapidVidExtractor.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/RapidVidExtractor.kt new file mode 100644 index 0000000000..8ba8ed4d8f --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/RapidVidExtractor.kt @@ -0,0 +1,61 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class RapidVid : ExtractorApi() { + override val name = "RapidVid" + override val mainUrl = "https://rapidvid.net" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val videoReq = app.get(url, referer=extRef).text + + val subUrls = mutableSetOf<String>() + Regex("""captions","file":"([^"]+)","label":"([^"]+)"""").findAll(videoReq).forEach { + val (subUrl, subLang) = it.destructured + + if (subUrl in subUrls) { return@forEach } + subUrls.add(subUrl) + + subtitleCallback.invoke( + SubtitleFile( + lang = subLang.replace("\\u0131", "ı").replace("\\u0130", "İ").replace("\\u00fc", "ü").replace("\\u00e7", "ç"), + url = fixUrl(subUrl.replace("\\", "")) + ) + ) + } + + var extractedValue = Regex("""file": "(.*)",""").find(videoReq)?.groupValues?.get(1) + val decoded: String? + + if (extractedValue != null) { + val bytes = extractedValue.split("\\x").filter { it.isNotEmpty() }.map { it.toInt(16).toByte() }.toByteArray() + decoded = String(bytes, Charsets.UTF_8) + } else { + val evalJWSsetup = Regex("""\};\s*(eval\(function[\s\S]*?)var played = \d+;""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("File not found") + @Suppress("LocalVariableName") + val JWSsetup = getAndUnpack(getAndUnpack(evalJWSsetup)).replace("\\\\", "\\") + extractedValue = Regex("""file":"(.*)","label""").find(JWSsetup)?.groupValues?.get(1)?.replace("\\\\x", "") + + val bytes = extractedValue?.chunked(2)?.map { it.toInt(16).toByte() }?.toByteArray() + decoded = bytes?.toString(Charsets.UTF_8) ?: throw ErrorLoadingException("File not found") + } + Log.d("Kekik_${this.name}", "decoded » $decoded") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = decoded, + referer = extRef, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/SobreatsesuypExtractor.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/SobreatsesuypExtractor.kt new file mode 100644 index 0000000000..0270478c8b --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/SobreatsesuypExtractor.kt @@ -0,0 +1,55 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class Sobreatsesuyp : ExtractorApi() { + override val name = "Sobreatsesuyp" + override val mainUrl = "https://sobreatsesuyp.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + + val videoReq = app.get(url, referer = extRef).text + + val file = Regex("""file":"([^"]+)""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("File not found") + val postLink = "${mainUrl}/" + file.replace("\\", "") + val rawList = app.post(postLink, referer = extRef).parsedSafe<List<Any>>() ?: throw ErrorLoadingException("Post link not found") + + val postJson: List<SobreatsesuypVideoData> = rawList.drop(1).map { item -> + val mapItem = item as Map<*, *> + SobreatsesuypVideoData( + title = mapItem["title"] as? String, + file = mapItem["file"] as? String + ) + } + Log.d("Kekik_${this.name}", "postJson » $postJson") + + for (item in postJson) { + if (item.file == null || item.title == null) continue + + val videoData = app.post("${mainUrl}/playlist/${item.file.substring(1)}.txt", referer = extRef).text + + callback.invoke( + ExtractorLink( + source = this.name, + name = "${this.name} - ${item.title}", + url = videoData, + referer = extRef, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + } + + data class SobreatsesuypVideoData( + @JsonProperty("title") val title: String? = null, + @JsonProperty("file") val file: String? = null + ) +} \ No newline at end of file diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/TRsTXExtractor.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/TRsTXExtractor.kt new file mode 100644 index 0000000000..e833c4c565 --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/TRsTXExtractor.kt @@ -0,0 +1,73 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class TRsTX : ExtractorApi() { + override val name = "TRsTX" + override val mainUrl = "https://trstx.org" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + + val videoReq = app.get(url, referer=extRef).text + + val file = Regex("""file":"([^"]+)""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("File not found") + val postLink = "${mainUrl}/" + file.replace("\\", "") + val rawList = app.post(postLink, referer=extRef).parsedSafe<List<Any>>() ?: throw ErrorLoadingException("Post link not found") + + val postJson: List<TrstxVideoData> = rawList.drop(1).map { item -> + val mapItem = item as Map<*, *> + TrstxVideoData( + title = mapItem["title"] as? String, + file = mapItem["file"] as? String + ) + } + Log.d("Kekik_${this.name}", "postJson » $postJson") + + val vidLinks = mutableSetOf<String>() + val vidMap = mutableListOf<Map<String, String>>() + for (item in postJson) { + if (item.file == null || item.title == null) continue + + val fileUrl = "${mainUrl}/playlist/" + item.file.substring(1) + ".txt" + val videoData = app.post(fileUrl, referer=extRef).text + + if (videoData in vidLinks) { continue } + vidLinks.add(videoData) + + vidMap.add(mapOf( + "title" to item.title, + "videoData" to videoData + )) + } + + + for (mapEntry in vidMap) { + Log.d("Kekik_${this.name}", "mapEntry » $mapEntry") + val title = mapEntry["title"] ?: continue + val m3uLink = mapEntry["videoData"] ?: continue + + callback.invoke( + ExtractorLink( + source = this.name, + name = "${this.name} - $title", + url = m3uLink, + referer = extRef, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + } + + data class TrstxVideoData( + @JsonProperty("title") val title: String? = null, + @JsonProperty("file") val file: String? = null + ) +} diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/TurboImgzExtractor.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/TurboImgzExtractor.kt new file mode 100644 index 0000000000..e70cc6bda9 --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/TurboImgzExtractor.kt @@ -0,0 +1,32 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class TurboImgz : ExtractorApi() { + override val name = "TurboImgz" + override val mainUrl = "https://turbo.imgz.me" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val videoReq = app.get(url.substringAfter("||"), referer=extRef).text + + val videoLink = Regex("""file: "(.*)",""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("File not found") + Log.d("Kekik_${this.name}", "videoLink » $videoLink") + + callback.invoke( + ExtractorLink( + source = "${this.name} - " + url.substringBefore("||").uppercase(), + name = "${this.name} - " + url.substringBefore("||").uppercase(), + url = videoLink, + referer = extRef, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/VidMoxyExtractor.kt b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/VidMoxyExtractor.kt new file mode 100644 index 0000000000..2d1b233472 --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/VidMoxyExtractor.kt @@ -0,0 +1,60 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class VidMoxy : ExtractorApi() { + override val name = "VidMoxy" + override val mainUrl = "https://vidmoxy.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val videoReq = app.get(url, referer=extRef).text + + val subUrls = mutableSetOf<String>() + Regex("""captions","file":"([^"]+)","label":"([^"]+)"""").findAll(videoReq).forEach { + val (subUrl, subLang) = it.destructured + + if (subUrl in subUrls) { return@forEach } + subUrls.add(subUrl) + + subtitleCallback.invoke( + SubtitleFile( + lang = subLang.replace("\\u0131", "ı").replace("\\u0130", "İ").replace("\\u00fc", "ü").replace("\\u00e7", "ç"), + url = fixUrl(subUrl.replace("\\", "")) + ) + ) + } + + var extractedValue = Regex("""file": "(.*)",""").find(videoReq)?.groupValues?.get(1) + val decoded: String? + + if (extractedValue != null) { + val bytes = extractedValue.split("\\x").filter { it.isNotEmpty() }.map { it.toInt(16).toByte() }.toByteArray() + decoded = String(bytes, Charsets.UTF_8) + } else { + val evaljwSetup = Regex("""\};\s*(eval\(function[\s\S]*?)var played = \d+;""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("File not found") + val jwSetup = getAndUnpack(getAndUnpack(evaljwSetup)).replace("\\\\", "\\") + extractedValue = Regex("""file":"(.*)","label""").find(jwSetup)?.groupValues?.get(1)?.replace("\\\\x", "") + + val bytes = extractedValue?.chunked(2)?.map { it.toInt(16).toByte() }?.toByteArray() + decoded = bytes?.toString(Charsets.UTF_8) ?: throw ErrorLoadingException("File not found") + } + Log.d("Kekik_${this.name}", "decoded » $decoded") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = decoded, + referer = extRef, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/bakalim.py b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..4514734d02 --- /dev/null +++ b/FullHDFilmizlesene/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,124 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from httpx import Client as Session +from parsel import Selector +from Kekik.Sifreleme import StringCodec, Packer, HexCodec +import re, json + +def rapid2m3u8(url:str) -> str: + oturum = Session() + oturum.headers.update({"User-Agent":"Mozilla/5.0"}) + + istek = oturum.get(url) + try: + escaped_hex = re.findall(r'file": "(.*)",', istek.text)[0] + except Exception: + eval_jwsetup = re.compile(r'\};\s*(eval\(function[\s\S]*?)var played = \d+;').findall(istek.text)[0] + jwsetup = Packer.unpack(Packer.unpack(eval_jwsetup)) + escaped_hex = re.findall(r'file":"(.*)","label', jwsetup)[0] + + return HexCodec.decode(escaped_hex) + +def trstx2m3u8(url:str) -> list[dict]: + oturum = Session() + oturum.headers.update({"User-Agent":"Mozilla/5.0", "Referer":"https://www.fullhdfilmizlesene.de/"}) + + istek = oturum.get(url) + file = re.findall(r"file\":\"([^\"]+)", istek.text)[0] + post_link = file.replace("\\", "") + + post_istek = oturum.post(f"https://trstx.org/{post_link}").json() + + veriler = [] + for bak in post_istek[1:]: + vid_url = "https://trstx.org/playlist/" + bak.get("file")[1:] + ".txt" + veriler.append({bak.get("title") : oturum.post(vid_url).text}) + + return veriler + +def sobreatsesuyp2m3u8(url:str) -> list[dict]: + oturum = Session() + oturum.headers.update({"User-Agent":"Mozilla/5.0", "Referer":"https://www.fullhdfilmizlesene.de/"}) + + istek = oturum.get(url) + file = re.findall(r"file\":\"([^\"]+)", istek.text)[0] + post_link = file.replace("\\", "") + + post_istek = oturum.post(f"https://sobreatsesuyp.com/{post_link}").json() + + veriler = [] + for bak in post_istek[1:]: + vid_url = "https://sobreatsesuyp.com/playlist/" + bak.get("file")[1:] + ".txt" + veriler.append({bak.get("title") : oturum.post(vid_url).text}) + + return veriler + +def turboimgz2m3u8(url:str) -> str: + oturum = Session() + oturum.headers.update({"User-Agent":"Mozilla/5.0"}) + + istek = oturum.get(url) + video_url = re.findall(r'file: "(.*)",', istek.text)[0] + + return video_url + +def fullhdfilmizlesene(url:str) -> list: + oturum = Session() + oturum.headers.update({"User-Agent":"Mozilla/5.0"}) + + konsol.print(f"\n\n{url}") + istek = oturum.get(url, follow_redirects=True) + secici = Selector(istek.text) + + script = secici.xpath("(//script)[1]").get() + scx_data = json.loads(re.findall(r'scx = (.*?);', script)[0]) + scx_keys = list(scx_data.keys()) + + link_list = [] + for key in scx_keys: + t = scx_data[key]["sx"]["t"] + if isinstance(t, list): + link_list.append({key: StringCodec.decode(elem) for elem in t}) + if isinstance(t, dict): + link_list.append({k: StringCodec.decode(v) for k, v in t.items()}) + + vid_links = [] + for elem in link_list: + for key, value in elem.items(): + if "rapidvid" in value: + vid_links.append({key: rapid2m3u8(value)}) + continue + + if "trstx.org" in value: + vid_links.append({key: trstx2m3u8(value)}) + continue + + if "sobreatsesuyp.com" in value: + vid_links.append({key: sobreatsesuyp2m3u8(value)}) + continue + + if "turbo.imgz.me" in value: + vid_links.append({key: turboimgz2m3u8(value)}) + continue + + if "vidmoxy.com" in value: + vid_links.append({key: rapid2m3u8(value)}) + continue + + vid_links.extend( + {key: value} + for bidi in ("proton", "fast", "tr", "en") + if bidi in key + ) + + + return vid_links + +# konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/makine-2/")) +konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/iskence-okulu/")) +# konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/yedi-yasam/")) +# konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/cilgin-cocuklar-oyun-bitti-izle-1/")) +# konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/suclu-den-skyldige/")) +# konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/vahsiler-hostiles/")) +# konsol.print(fullhdfilmizlesene("https://www.fullhdfilmizlesene.de/film/satranc-oyuncusu/")) \ No newline at end of file diff --git a/FullPorner/build.gradle.kts b/FullPorner/build.gradle.kts new file mode 100644 index 0000000000..319ab24b92 --- /dev/null +++ b/FullPorner/build.gradle.kts @@ -0,0 +1,18 @@ +version = 3 + +cloudstream { + authors = listOf("coxju", "SaurabhKaperwan") + language = "en" + description = "(VPN) FullPorner is the best free full length porn video site. Choose from millions of hardcore videos that stream quickly and in high quality and only full length" + + /** + * 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=fullporner.com&sz=%size%" +} \ No newline at end of file diff --git a/FullPorner/src/main/AndroidManifest.xml b/FullPorner/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/FullPorner/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/FullPorner/src/main/kotlin/com/keyiflerolsun/FullPorner.kt b/FullPorner/src/main/kotlin/com/keyiflerolsun/FullPorner.kt new file mode 100644 index 0000000000..a0438e39f3 --- /dev/null +++ b/FullPorner/src/main/kotlin/com/keyiflerolsun/FullPorner.kt @@ -0,0 +1,131 @@ +// ! https://codeberg.org/coxju/cs-ext-coxju/src/branch/master/FullPorner/src/main/kotlin/com/coxju/FullPorner.kt +// ! https://github.com/SaurabhKaperwan/CSX/blob/master/FullPorner/src/main/kotlin/com/megix/FullPorner.kt + +package com.keyiflerolsun + +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class FullPorner : MainAPI() { + override var mainUrl = "https://fullporner.com" + override var name = "FullPorner" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.NSFW) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/home/" to "Featured", + "${mainUrl}/category/hd-porn/" to "HD", + "${mainUrl}/category/amateur/" to "Amateur", + "${mainUrl}/category/teen/" to "Teen", + "${mainUrl}/category/cumshot/" to "CumShot", + "${mainUrl}/category/deepthroat/" to "DeepThroat", + "${mainUrl}/category/orgasm/" to "Orgasm", + "${mainUrl}/category/threesome/" to "ThreeSome", + "${mainUrl}/category/group-sex/" to "Group Sex", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.video-block div.video-card").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("div.video-card div.video-card-body div.video-title a")?.text() ?: return null + val href = fixUrl(this.selectFirst("div.video-card div.video-card-body div.video-title a")!!.attr("href")) + val posterUrl = fixUrlNull(this.select("div.video-card div.video-card-image a img").attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val searchResponse = mutableListOf<SearchResponse>() + + for (i in 1..15) { + val document = app.get("${mainUrl}/search?q=${query.replace(" ", "+")}&p=$i").document + + val results = document.select("div.video-block div.video-card").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-block div.single-video-left div.single-video-title h2")?.text()?.trim().toString() + val iframeUrl = fixUrlNull(document.selectFirst("div.video-block div.single-video-left div.single-video iframe")?.attr("src")) ?: "" + + val iframeDocument = app.get(iframeUrl).document + + val videoID = Regex("""var id = "(.+?)"""").find(iframeDocument.html())?.groupValues?.get(1) + val pornTrexDocument = app.get("https://www.porntrex.com/embed/${videoID}").document + val matchResult = Regex("""preview_url:\s*'([^']+)'""").find(pornTrexDocument.html()) + val poster = matchResult?.groupValues?.get(1) + val posterUrl = fixUrlNull("https:$poster") + + val tags = document.select("div.video-block div.single-video-left div.single-video-title p.tag-link span a").map { it.text() } + val description = document.selectFirst("div.video-block div.single-video-left div.single-video-title h2")?.text()?.trim().toString() + val actors = document.select("div.video-block div.single-video-left div.single-video-info-content p a").map { it.text() } + val recommendations = document.select("div.video-block div.video-recommendation div.video-card").mapNotNull { it.toSearchResult() } + + return newMovieLoadResponse(title, url, TvType.NSFW, url) { + this.posterUrl = posterUrl + this.plot = description + this.tags = tags + this.recommendations = recommendations + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + val document = app.get(data).document + val iframeUrl = fixUrlNull(document.selectFirst("div.video-block div.single-video-left div.single-video iframe")?.attr("src")) ?: "" + val iframeDocument = app.get(iframeUrl).document + val videoID = Regex("""var id = "(.+?)"""").find(iframeDocument.html())?.groupValues?.getOrNull(1) + + val extlinkList = mutableListOf<ExtractorLink>() + + if (videoID != null) { + val pornTrexDocument = app.get("https://www.porntrex.com/embed/${videoID}").document + val videoUrlsRegex = Regex("""(?:video_url|video_alt_url2|video_alt_url3): '(.+?)',""") + val matchResults = videoUrlsRegex.findAll(pornTrexDocument.html()) + + val videoUrls = matchResults.map { it.groupValues[1] }.toList() + + videoUrls.forEach { videoUrl -> + extlinkList.add( + ExtractorLink( + source = name, + name = name, + url = videoUrl, + referer = "", + quality = Regex("""_(1080|720|480|360)p\.mp4""").find(videoUrl)?.groupValues?.getOrNull(1)?.toIntOrNull() ?: Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + } + + extlinkList.forEach(callback) + + return true + } +} \ No newline at end of file diff --git a/FullPorner/src/main/kotlin/com/keyiflerolsun/FullPornerProvider.kt b/FullPorner/src/main/kotlin/com/keyiflerolsun/FullPornerProvider.kt new file mode 100644 index 0000000000..d39260dba0 --- /dev/null +++ b/FullPorner/src/main/kotlin/com/keyiflerolsun/FullPornerProvider.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import android.content.Context +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin + +@CloudstreamPlugin +class FullPornerProvider : Plugin() { + override fun load(context: Context) { + registerMainAPI(FullPorner()) + } +} \ No newline at end of file diff --git a/GolgeTV/build.gradle.kts b/GolgeTV/build.gradle.kts new file mode 100644 index 0000000000..849028b9c6 --- /dev/null +++ b/GolgeTV/build.gradle.kts @@ -0,0 +1,18 @@ +version = 4 + +cloudstream { + authors = listOf("usdogu", "keyiflerolsun") + language = "tr" + description = "GolgeTV cloudstream eklentisidir. Sevdiğiniz yayın platformlarını ve canlı maçları burada bulabilirsiniz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 3 // will be 3 if unspecified + tvTypes = listOf("Live") + iconUrl = "https://www.apkdelisi.net/wp-content/uploads/2022/03/golge-tv-reklamsiz-mod-apk-canli-tv-apkdelisi-0.jpg" +} \ No newline at end of file diff --git a/GolgeTV/src/main/AndroidManifest.xml b/GolgeTV/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/GolgeTV/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge16Extractor.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge16Extractor.kt new file mode 100644 index 0000000000..ff7e72fe03 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge16Extractor.kt @@ -0,0 +1,67 @@ +package com.keyiflerolsun + +import com.lagradost.api.Log +import com.lagradost.cloudstream3.ErrorLoadingException +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.Qualities + +open class Golge16 : ExtractorApi() { + override val name = "Golge16" + override val mainUrl = "golge16://" + override val requiresReferer = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val data = url.split("||")[1] + val content = AppUtils.tryParseJson<OrmoxChnlx>(data) + ?: throw ErrorLoadingException("can't parse json") + val link = content.link.split(this.mainUrl)[1].split("%7C")[0] + val firstResp = app.get(link).parsedSafe<Golge16FirstResponse>() + ?: throw ErrorLoadingException("can't reach url") + + val headers = mapOf( + "User-Agent" to firstResp.headers.userAgent, + "Referer" to firstResp.headers.referer, + "Origin" to firstResp.headers.origin, + "X-Requested-With" to firstResp.headers.xRequestedWith, + "X-Forwarded-For" to firstResp.headers.xForwardedFor, + "Content-Type" to firstResp.headers.contentType, + ) + val secondResp = app.post(firstResp.apiUrl, headers = headers, json = firstResp.jsonData) + .parsedSafe<Golge16SecondResponse>() ?: throw ErrorLoadingException("can't reach url") + + val secondHeaders = mapOf( + "watched-sig" to secondResp.addonSig, + "mediahubmx-signature" to secondResp.addonSig, + "user-agent" to firstResp.headers.userAgent, + "X-Requested-With" to "com.golge.golgetv", + "Content-Type" to "application/json" + ) + val body = mapOf( + "language" to "tr", + "region" to "TR", + "url" to firstResp.medyaurl + ) + val thirdResp = app.post(firstResp.proxyurl, headers = secondHeaders, json = body).text + val (streamLink) = Regex(""""url":"(.*?)"""").find(thirdResp)!!.destructured + Log.d("GOLGE16", "streamLink: $streamLink") + callback.invoke( + ExtractorLink( + source = this.name, + name = content.isim, + url = streamLink, + referer = "", + quality = Qualities.Unknown.value, + isM3u8 = true, + ) + ) + } +} diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge17Extractor.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge17Extractor.kt new file mode 100644 index 0000000000..0779e7fa2e --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge17Extractor.kt @@ -0,0 +1,124 @@ +package com.keyiflerolsun + +import android.util.Base64 +import com.lagradost.api.Log +import com.lagradost.cloudstream3.ErrorLoadingException +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.Qualities +import java.util.regex.Matcher +import java.util.regex.Pattern + +open class Golge17 : ExtractorApi() { + override val name = "Golge17" + override val mainUrl = "golge17://" + override val requiresReferer = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val data = url.split("||")[1] + val content = AppUtils.tryParseJson<OrmoxChnlx>(data) + ?: throw ErrorLoadingException("can't parse json") + val (link, originAndReferer) = content.link.split(this.mainUrl)[1].split("%7C") + val headers = mapOf( + "Connection" to "keep-alive", + "Cache-Control" to "max-age=0", + "sec-ch-ua" to """"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"""", + "sec-ch-ua-mobile" to "?0", + "sec-ch-ua-platform" to """"Windows"""", + "Upgrade-Insecure-Requests" to "1", + "User-Agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36", + "Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", + "Sec-Fetch-Site" to "none", + "Sec-Fetch-Mode" to "navigate", + "Sec-Fetch-User" to "?1", + "Sec-Fetch-Dest" to "document", + "Accept-Language" to "tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie" to "reklamgosterimx=ok", + "Origin" to originAndReferer, + "Referer" to originAndReferer + ) + val resp = app.get(link, headers = headers).text + val streamLink = parseHtml(resp) + Log.d("GOLGE17", "streamLink: $streamLink") + callback.invoke( + ExtractorLink( + source = this.name, + name = content.isim, + url = streamLink, + referer = link, + quality = Qualities.Unknown.value, + isM3u8 = true, + headers = mapOf( + "origin" to link, + "Accept" to "*/*", + "Cache-Control" to "max-age=0", + "sec-ch-ua-platform" to """"Windows"""", + "User-Agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" + ) + ) + ) + } + + private fun parseHtml(str: String): String { + val trim = str.replace("\\s+".toRegex(), "").trim { it <= ' ' } + try { + val str2 = String( + Base64.decode( + extractDataWithRegex("=window\\['atob'\\]\\(\"(.*?)\"", trim), + Base64.DEFAULT + ) + ) + val extractMultipleDataWithRegex = extractMultipleDataWithRegex( + extractDataWithRegex("window.stnbnb=\\[(.*?)\\]", trim)!! + ) + val str3: String? = if (extractMultipleDataWithRegex.isNotEmpty()) String( + Base64.decode( + extractMultipleDataWithRegex[(Math.random() * extractMultipleDataWithRegex.size).toInt()], + Base64.DEFAULT + ) + ) else null + val str4 = buildString { + append("https://$str3") + append( + String( + Base64.decode( + extractDataWithRegex( + "window.streamradardomil=\\[atob\\(\"(.*?)\"\\)", + trim + ), Base64.DEFAULT + ), + Charsets.UTF_8 + ) + ) + append("/i/1.1.1.1/") + append(str2) + append("/playlist.m3u8") + } + return str4 + } catch (e: Exception) { + throw ErrorLoadingException(e.message) + } + } + + private fun extractDataWithRegex(str: String, str2: String): String? { + val matcher: Matcher = Pattern.compile(str).matcher(str2) + return if (matcher.find()) matcher.group(1) else "" + } + + private fun extractMultipleDataWithRegex(str: String): Array<String> { + val matcher: Matcher = Pattern.compile("atob\\(\"(.*?)\"\\)").matcher(str) + val arrayList = mutableListOf<String>() + while (matcher.find()) { + arrayList.add(matcher.group(1)!!) + } + return arrayList.toTypedArray() + } +} \ No newline at end of file diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge19Extractor.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge19Extractor.kt new file mode 100644 index 0000000000..7b5273ca67 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge19Extractor.kt @@ -0,0 +1,71 @@ +package com.keyiflerolsun + +import android.util.Base64 +import com.lagradost.api.Log +import com.lagradost.cloudstream3.ErrorLoadingException +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.Qualities +import java.nio.charset.StandardCharsets +import javax.crypto.Cipher +import javax.crypto.spec.IvParameterSpec +import javax.crypto.spec.SecretKeySpec + +open class Golge19 : ExtractorApi() { + override val name = "Golge19" + override val mainUrl = "golge19://" + override val requiresReferer = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val data = url.split("||")[1] + val content = AppUtils.tryParseJson<OrmoxChnlx>(data) ?: throw ErrorLoadingException("can't parse json") + val headers = mapOf( + "origin" to "https://google.com", + "Referer" to "https://google.com/", + "x-requested-with" to "XMLHttpRequest", + "x-forwarded-for" to "1.1.1.1", + "User-Agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" + ) + val link = content.link.split(this.mainUrl)[1].split("%7C%7C")[0] + val resp = app.get(link, headers = headers).text + val chUrl = getChUrl(resp) + Log.d("GOLGE19", "chUrl: $chUrl") + callback.invoke(ExtractorLink( + source = this.name, + name = content.isim, + url = chUrl, + referer = "https://google.com", + quality = Qualities.Unknown.value, + isM3u8 = true, + headers = mapOf("origin" to "https://google.com") + )) + } + + private fun getChUrl(data: String): String { + val split = data.split(":") + val content1 = split[0] + val key1 = Base64.decode(split[1], Base64.DEFAULT) + val decrypt1 = decryptAES(content1, key1).split(":") + val content2 = decrypt1[0] + val key2 = Base64.decode(decrypt1[1], Base64.DEFAULT) + val decrypt2 = decryptAES(content2, key2) + val (chUrl) = Regex(""""chUrl": "(.*?)"""").find(decrypt2)!!.destructured + return chUrl + } + + private fun decryptAES(data: String, key: ByteArray): String { + val charset = StandardCharsets.UTF_8 + val secretKeySpec = SecretKeySpec(key, "AES") + val cipher = Cipher.getInstance("AES/CBC/PKCS5Padding") + cipher.init(2, secretKeySpec, IvParameterSpec(key)) + return String(cipher.doFinal(Base64.decode(data, 0)), charset) + } +} \ No newline at end of file diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge7Extractor.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge7Extractor.kt new file mode 100644 index 0000000000..9893866836 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge7Extractor.kt @@ -0,0 +1,25 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.ErrorLoadingException +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink + +open class Golge7 : ExtractorApi() { + override val name = "Golge7" + override val mainUrl = "golge7://" + override val requiresReferer = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val data = url.split("||")[1] + val content = AppUtils.tryParseJson<OrmoxChnlx>(data) + ?: throw ErrorLoadingException("can't parse json") + val link = content.link.split(this.mainUrl)[1] + } +} \ No newline at end of file diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge8Extractor.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge8Extractor.kt new file mode 100644 index 0000000000..1362c095a2 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/Golge8Extractor.kt @@ -0,0 +1,25 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.ErrorLoadingException +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink + +open class Golge8 : ExtractorApi() { + override val name = "Golge8" + override val mainUrl = "golge8://" + override val requiresReferer = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val data = url.split("||")[1] + val content = AppUtils.tryParseJson<OrmoxChnlx>(data) + ?: throw ErrorLoadingException("can't parse json") + val (link, drmUrl) = content.link.split(this.mainUrl)[1].split("%7C") + } +} \ No newline at end of file diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTV.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTV.kt new file mode 100644 index 0000000000..920811e3d6 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTV.kt @@ -0,0 +1,116 @@ +package com.keyiflerolsun + +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.lagradost.cloudstream3.HomePageResponse +import com.lagradost.cloudstream3.LoadResponse +import com.lagradost.cloudstream3.MainAPI +import com.lagradost.cloudstream3.MainPageRequest +import com.lagradost.cloudstream3.SearchResponse +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.TvType +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.mainPageOf +import com.lagradost.cloudstream3.newHomePageResponse +import com.lagradost.cloudstream3.newLiveSearchResponse +import com.lagradost.cloudstream3.newLiveStreamLoadResponse +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.Qualities +import com.lagradost.cloudstream3.utils.loadExtractor + +class GolgeTV : MainAPI() { + override var name = "GolgeTV" + override var mainUrl = "https://panel.cloudgolge.shop/appMainGetData.php" + override val hasMainPage = true + override var lang = "tr" + override val supportedTypes = setOf(TvType.Live) + + override val mainPage = mainPageOf( + this.mainUrl to "ULUSAL", + this.mainUrl to "SPOR", + this.mainUrl to "HABER", + this.mainUrl to "BELGESEL", + this.mainUrl to "SİNEMA", + this.mainUrl to "ÇOCUK", + this.mainUrl to "MÜZİK", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val home = app.post( + request.data, + headers = mapOf( + "x-requested-with" to "com.golge.golgetv2", + "user-agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/79.0" + ), + data = mapOf( + "ormoxRoks" to "D8C42BC6CD20C00E85659003F62B1F4A7A882DCB", + "ormxArmegedEryxc" to "", + "asize" to "oZT%2BZxn8zjH8LOwj%2FUwiYA%3D%3D", + "serverurl" to "https://raw.githubusercontent.com/sevdaliyim/sevdaliyim/refs/heads/main/ssl2.key", + "glg1Key" to "1FbcLGctAooQU7L6LQ2YaDtpNHNryPGMde7wUd47Jc53lOikXegk4LKREvfKqZYk" + ) + ) + + val contents = mutableListOf<SearchResponse>() + AppUtils.tryParseJson<MainPageResp>(home.text)!!.ormoxChnlx + .filter { + if (it.kategori != request.name || it.player == "m3u") return@filter false + if (it.player == "iframe" && !it.link.contains("golge")) return@filter false + return@filter true + } + .forEach { + val toDict = jacksonObjectMapper().writeValueAsString(it) + contents.add(newLiveSearchResponse(it.isim, toDict, TvType.Live) { + this.posterUrl = it.resim + }) + } + return newHomePageResponse(request.name, contents) + } + + override suspend fun load(url: String): LoadResponse? { + val content = AppUtils.tryParseJson<OrmoxChnlx>(url) ?: return null + return newLiveStreamLoadResponse(content.isim, url, url) { + this.posterUrl = content.resim + } + } + + override suspend fun loadLinks( + data: String, + isCasting: Boolean, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ): Boolean { + val content = AppUtils.tryParseJson<OrmoxChnlx>(data) ?: return false + if (content.player == "iframe") { + val golgeMatch = Regex("^(golge(?:2|3|4|5|6|7|8|9|1[0-9])://).*").find(content.link) + if (golgeMatch != null) { + val (golgeProtocol) = golgeMatch.destructured + loadExtractor("$golgeProtocol||$data", subtitleCallback, callback) + return true + } + return false + } + + var headers = mapOf( + content.h1Key to content.h1Val, + content.h2Key to content.h2Val, + content.h3Key to content.h3Val, + content.h4Key to content.h4Val, + content.h5Key to content.h5Val + ) + headers = headers.filterKeys { it != "0" } + callback.invoke( + ExtractorLink( + source = this.name, + name = content.isim, + url = content.link, + referer = headers["Referer"] ?: "", + quality = Qualities.Unknown.value, + headers = headers, + isM3u8 = true + ) + ) + return true + } +} + diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTVModels.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTVModels.kt new file mode 100644 index 0000000000..7e46c07ac4 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTVModels.kt @@ -0,0 +1,58 @@ +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonProperty + +@JsonIgnoreProperties(ignoreUnknown = true) +data class MainPageResp( + val ormoxChnlx: List<OrmoxChnlx>, +) + +data class OrmoxChnlx( + val id: String, + val isim: String, + val resim: String, + val link: String, + val kategori: String, + val player: String, + val tip: String, + val userAgent: String, + val h1Key: String, + val h2Key: String, + val h3Key: String, + val h4Key: String, + val h1Val: String, + val h2Val: String, + val h3Val: String, + val h4Val: String, + val h5Key: String, + val h5Val: String, +) + +data class Golge16FirstResponse( + @JsonProperty("api_url") + val apiUrl: String, + val medyaurl: String, + val proxyurl: String, + val headers: Headers, + @JsonProperty("json_data") + val jsonData: Any, +) + +data class Headers( + @JsonProperty("user-agent") + val userAgent: String, + val referer: String, + val origin: String, + @JsonProperty("x-requested-with") + val xRequestedWith: String, + @JsonProperty("x-forwarded-for") + val xForwardedFor: String, + @JsonProperty("content-type") + val contentType: String, +) + +@JsonIgnoreProperties(ignoreUnknown = true) +data class Golge16SecondResponse( + val addonSig: String, +) \ No newline at end of file diff --git a/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTVPlugin.kt b/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTVPlugin.kt new file mode 100644 index 0000000000..d650b11a58 --- /dev/null +++ b/GolgeTV/src/main/kotlin/com/keyiflerolsun/GolgeTVPlugin.kt @@ -0,0 +1,18 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class GolgeTVPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(GolgeTV()) + registerExtractorAPI(Golge19()) + registerExtractorAPI(Golge16()) + // TODO: apiler bozuk uygulamada da hata donuyo duzeldiginde tamamlanicak + //registerExtractorAPI(Golge17()) + //registerExtractorAPI(Golge7()) + //registerExtractorAPI(Golge8()) + } +} \ No newline at end of file diff --git a/HDFilmCehennemi/build.gradle.kts b/HDFilmCehennemi/build.gradle.kts new file mode 100644 index 0000000000..57358e83c4 --- /dev/null +++ b/HDFilmCehennemi/build.gradle.kts @@ -0,0 +1,18 @@ +version = 18 + +cloudstream { + authors = listOf("hexated", "keyiflerolsun") + language = "tr" + description = "Türkiye'nin en hızlı hd film izleme sitesi" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=hdfilmcehennemi.com&sz=%size%" +} \ No newline at end of file diff --git a/HDFilmCehennemi/src/main/AndroidManifest.xml b/HDFilmCehennemi/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/HDFilmCehennemi/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/HDFilmCehennemi/src/main/kotlin/com/keyiflerolsun/HDFilmCehennemi.kt b/HDFilmCehennemi/src/main/kotlin/com/keyiflerolsun/HDFilmCehennemi.kt new file mode 100644 index 0000000000..81caaaf792 --- /dev/null +++ b/HDFilmCehennemi/src/main/kotlin/com/keyiflerolsun/HDFilmCehennemi.kt @@ -0,0 +1,211 @@ +// ! https://github.com/hexated/cloudstream-extensions-hexated/blob/master/Hdfilmcehennemi/src/main/kotlin/com/hexated/Hdfilmcehennemi.kt + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer +import com.fasterxml.jackson.annotation.JsonProperty +import org.jsoup.Jsoup + +class HDFilmCehennemi : MainAPI() { + override var mainUrl = "https://www.hdfilmcehennemi.nl" + override var name = "HDFilmCehennemi" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) + + override val mainPage = mainPageOf( + mainUrl to "Yeni Eklenen Filmler", + "${mainUrl}/yabancidiziizle-2" to "Yeni Eklenen Diziler", + "${mainUrl}/category/tavsiye-filmler-izle2" to "Tavsiye Filmler", + "${mainUrl}/imdb-7-puan-uzeri-filmler" to "IMDB 7+ Filmler", + "${mainUrl}/en-cok-yorumlananlar-1" to "En Çok Yorumlananlar", + "${mainUrl}/en-cok-begenilen-filmleri-izle" to "En Çok Beğenilenler", + "${mainUrl}/tur/aile-filmleri-izleyin-6" to "Aile Filmleri", + "${mainUrl}/tur/aksiyon-filmleri-izleyin-3" to "Aksiyon Filmleri", + "${mainUrl}/tur/animasyon-filmlerini-izleyin-4" to "Animasyon Filmleri", + "${mainUrl}/tur/belgesel-filmlerini-izle-1" to "Belgesel Filmleri", + "${mainUrl}/tur/bilim-kurgu-filmlerini-izleyin-2" to "Bilim Kurgu Filmleri", + "${mainUrl}/tur/komedi-filmlerini-izleyin-1" to "Komedi Filmleri", + "${mainUrl}/tur/korku-filmlerini-izle-2/" to "Korku Filmleri", + "${mainUrl}/tur/romantik-filmleri-izle-1" to "Romantik Filmleri" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data).document + + val home: List<SearchResponse>? + + home = document.select("div.section-content a.poster").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("strong.poster-title")?.text() ?: return null + val href = fixUrlNull(this.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun search(query: String): List<SearchResponse> { + val response = app.get( + "${mainUrl}/search?q=${query}", + headers = mapOf("X-Requested-With" to "fetch") + ).parsedSafe<Results>() ?: return emptyList() + val searchResults = mutableListOf<SearchResponse>() + + response.results.forEach { resultHtml -> + val document = Jsoup.parse(resultHtml) + + val title = document.selectFirst("h4.title")?.text() ?: return@forEach + val href = fixUrlNull(document.selectFirst("a")?.attr("href")) ?: return@forEach + val posterUrl = fixUrlNull(document.selectFirst("img")?.attr("src")) ?: fixUrlNull(document.selectFirst("img")?.attr("data-src")) + + searchResults.add( + newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl?.replace("/thumb/", "/list/") } + ) + } + + return searchResults + } + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1.section-title")?.text()?.substringBefore(" izle") ?: return null + val poster = fixUrlNull(document.select("aside.post-info-poster img.lazyload").lastOrNull()?.attr("data-src")) + val tags = document.select("div.post-info-genres a").map { it.text() } + val year = document.selectFirst("div.post-info-year-country a")?.text()?.trim()?.toIntOrNull() + val tvType = if (document.select("div.seasons").isEmpty()) TvType.Movie else TvType.TvSeries + val description = document.selectFirst("article.post-info-content > p")?.text()?.trim() + val rating = document.selectFirst("div.post-info-imdb-rating span")?.text()?.substringBefore("(")?.trim()?.toRatingInt() + val actors = document.select("div.post-info-cast a").map { + Actor(it.selectFirst("strong")!!.text(), it.select("img").attr("data-src")) + } + + val recommendations = document.select("div.section-slider-container div.slider-slide").mapNotNull { + val recName = it.selectFirst("a")?.attr("title") ?: return@mapNotNull null + val recHref = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null + val recPosterUrl = fixUrlNull(it.selectFirst("img")?.attr("data-src")) ?: fixUrlNull(it.selectFirst("img")?.attr("src")) + + newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { + this.posterUrl = recPosterUrl + } + } + + return if (tvType == TvType.TvSeries) { + val trailer = document.selectFirst("div.post-info-trailer button")?.attr("data-modal")?.substringAfter("trailer/")?.let { "https://www.youtube.com/embed/$it" } + val episodes = document.select("div.seasons-tab-content a").mapNotNull { + val epName = it.selectFirst("h4")?.text()?.trim() ?: return@mapNotNull null + val epHref = fixUrlNull(it.attr("href")) ?: return@mapNotNull null + val epEpisode = Regex("""(\d+)\. ?Bölüm""").find(epName)?.groupValues?.get(1)?.toIntOrNull() + val epSeason = Regex("""(\d+)\. ?Sezon""").find(epName)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } else { + val trailer = document.selectFirst("div.post-info-trailer button")?.attr("data-modal")?.substringAfter("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 + this.recommendations = recommendations + addActors(actors) + 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, + name = source, + url = base64Decode(videoData), + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + type = INFER_TYPE + // isM3u8 = true + ) + ) + + AppUtils.tryParseJson<List<SubSource>>("[${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 { + Log.d("HDCH", "data » $data") + val document = app.get(data).document + + document.select("div.alternative-links").map { element -> + element to element.attr("data-lang").uppercase() + }.forEach { (element, langCode) -> + element.select("button.alternative-link").map { button -> + button.text().replace("(HDrip Xbet)", "").trim() + " $langCode" to button.attr("data-video") + }.forEach { (source, videoID) -> + val apiGet = app.get( + "${mainUrl}/video/$videoID/", + headers = mapOf( + "Content-Type" to "application/json", + "X-Requested-With" to "fetch" + ), + referer = data + ).text + + var iframe = Regex("""data-src=\\"([^"]+)""").find(apiGet)?.groupValues?.get(1)!!.replace("\\", "") + if (iframe.contains("?rapidrame_id=")) { + iframe = "${mainUrl}/playerr/" + iframe.substringAfter("?rapidrame_id=") + } + + Log.d("HDCH", "$source » $videoID » $iframe") + invokeLocalSource(source, iframe, subtitleCallback, callback) + } + } + + 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 Results( + @JsonProperty("results") val results: List<String> = arrayListOf() + ) +} \ No newline at end of file diff --git a/HDFilmCehennemi/src/main/kotlin/com/keyiflerolsun/HDFilmCehennemiPlugin.kt b/HDFilmCehennemi/src/main/kotlin/com/keyiflerolsun/HDFilmCehennemiPlugin.kt new file mode 100644 index 0000000000..998ef1d5cc --- /dev/null +++ b/HDFilmCehennemi/src/main/kotlin/com/keyiflerolsun/HDFilmCehennemiPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +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) { + registerMainAPI(HDFilmCehennemi()) + } +} \ No newline at end of file diff --git a/HQPorner/build.gradle.kts b/HQPorner/build.gradle.kts new file mode 100644 index 0000000000..d3e54d182c --- /dev/null +++ b/HQPorner/build.gradle.kts @@ -0,0 +1,18 @@ +version = 3 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "en" + description = "Truly high definition porn videos and truly for free! We're sure you'll like our best collection containing thousands of 4K, 60FPS and 1080p free HD porn videos with the hottest girls ever!" + + /** + * 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=hqporner.com&sz=%size%" +} \ No newline at end of file diff --git a/HQPorner/src/main/AndroidManifest.xml b/HQPorner/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/HQPorner/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/HQPorner/src/main/kotlin/com/keyiflerolsun/HQPorner.kt b/HQPorner/src/main/kotlin/com/keyiflerolsun/HQPorner.kt new file mode 100644 index 0000000000..25e49f466f --- /dev/null +++ b/HQPorner/src/main/kotlin/com/keyiflerolsun/HQPorner.kt @@ -0,0 +1,162 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.utils.AppUtils.toJson +import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson + +class HQPorner : MainAPI() { + override var mainUrl = "https://hqporner.com" + override var name = "HQPorner" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.NSFW) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/top/month" to "Month TOP", + "${mainUrl}/top/week" to "Week TOP", + "${mainUrl}/category/1080p-porn" to "1080p", + "${mainUrl}/category/4k-porn" to "4K", + "${mainUrl}/category/60fps-porn" to "60FPS", + "${mainUrl}/category/amateur" to "Amateur", + "${mainUrl}/category/teen-porn" to "Teen", + "${mainUrl}/category/babe" to "Babe", + "${mainUrl}/category/pov" to "POV", + "${mainUrl}/category/orgasm" to "Orgasm", + "${mainUrl}/category/porn-massage" to "Sex Massage", + "${mainUrl}/category/threesome" to "Threesome", + "${mainUrl}/category/group-sex" to "Group Sex", + "${mainUrl}/category/lesbian" to "Lesbian", + "${mainUrl}/category/milf" to "Milf", + "${mainUrl}/category/mature" to "Mature", + "${mainUrl}/category/long-hair" to "Long Hair", + "${mainUrl}/category/big-tits" to "Big Tits", + "${mainUrl}/category/small-tits" to "Small tits", + "${mainUrl}/category/squeezing-tits" to "Squeezing Tits", + "${mainUrl}/category/big-ass" to "Big Ass", + "${mainUrl}/category/latina" to "Latina", + "${mainUrl}/category/russian" to "Russian", + "${mainUrl}/category/blonde" to "Blonde", + "${mainUrl}/category/redhead" to "Redhead", + "${mainUrl}/category/blowjob" to "Blowjob", + "${mainUrl}/category/brunette" to "Brunette", + "${mainUrl}/category/undressing" to "Undressing", + "${mainUrl}/category/cumshot" to "Cumshot", + "${mainUrl}/category/outdoor" to "Outdoor", + "${mainUrl}/category/deepthroat" to "Deepthroat", + "${mainUrl}/category/handjob" to "Handjob", + "${mainUrl}/category/pussy-licking" to "Pussy Licking", + "${mainUrl}/category/moaning" to "Moaning", + "${mainUrl}/category/vintage" to "Vintage", + "${mainUrl}/category/tattooed" to "Tattooed", + "${mainUrl}/category/beach-porn" to "Beach" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}/${page}").document + val home = document.select("div.box.page-content div.row section").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse( + list = HomePageList( + name = request.name, + list = home, + isHorizontalImages = true + ), + hasNext = true + ) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val lowerCaseTitle = this.selectFirst("h3 a")?.text() ?:"No Title" + val title = lowerCaseTitle.split(" ").joinToString(" ") { it.replaceFirstChar { char -> char.uppercase() } } + val href = fixUrlNull(this.selectFirst("h3 a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newMovieSearchResponse(title, LoadUrl(href, posterUrl).toJson(), TvType.NSFW) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val searchResponse = mutableListOf<SearchResponse>() + + for (i in 1..5) { + val document = app.get("${mainUrl}/?q=${query.replace(" ", "+")}&p=${i}").document + + val results = document.select("div.box.page-content div.row section").mapNotNull { it.toMainPageResult() } + + searchResponse.addAll(results) + + if (results.isEmpty()) break + } + + return searchResponse + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + private fun convertTimeToMinutes(timeText: String): Int { + if (timeText == "") { + return 0 + } + + val regex = Regex("""(\d+)m (\d+)s""") + val matchResult = regex.find(timeText) + return if (matchResult != null) { + val minutes = matchResult.groupValues[1].toInt() + val seconds = matchResult.groupValues[2].toInt() + minutes + seconds / 60 + } else { + 0 + } + } + + override suspend fun load(url: String): LoadResponse? { + val loadData = tryParseJson<LoadUrl>(url) ?: return null + val document = app.get(loadData.href).document + + val lowerCaseTitle = document.selectFirst("h1.main-h1")?.text() ?: "No Title" + val title = lowerCaseTitle.split(" ").joinToString(" ") { it.replaceFirstChar { char -> char.uppercase() } } + val poster = loadData.posterUrl + val tags = document.select("p a[href*='/category']").map { it.text() } + val duration = convertTimeToMinutes(document.selectFirst("li.fa-clock-o")?.text()?.trim() ?: "") + val recommendations = document.select("div.row div.row section").mapNotNull { it.toMainPageResult() } + val actors = document.select("li a[href*='/actress']").map { Actor(it.text()) } + + if (actors.isEmpty() && duration == 0 && tags.isEmpty()) { + return null + } + + return newMovieLoadResponse(title, url, TvType.NSFW, loadData.href) { + this.posterUrl = poster + this.plot = title + this.tags = tags + this.duration = duration + this.recommendations = recommendations + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("HPRN", "data » $data") + val document = app.get(data).document + + val rawURL = Regex("""url: '/blocks/altplayer\.php\?i=//(.*?)',""").find(document.toString())?.groupValues?.get(1) ?: return false + val vidURL = "https://${rawURL}" + Log.d("HPRN", "vidURL » $vidURL") + + loadExtractor(vidURL, "${mainUrl}/", subtitleCallback, callback) + + return true + } +} + +data class LoadUrl( + val href: String, + val posterUrl: String? +) \ No newline at end of file diff --git a/HQPorner/src/main/kotlin/com/keyiflerolsun/HQPornerPlugin.kt b/HQPorner/src/main/kotlin/com/keyiflerolsun/HQPornerPlugin.kt new file mode 100644 index 0000000000..a964017e11 --- /dev/null +++ b/HQPorner/src/main/kotlin/com/keyiflerolsun/HQPornerPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class HQPornerPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(HQPorner()) + registerExtractorAPI(MyDaddy()) + } +} \ No newline at end of file diff --git a/HQPorner/src/main/kotlin/com/keyiflerolsun/MyDaddyExtractor.kt b/HQPorner/src/main/kotlin/com/keyiflerolsun/MyDaddyExtractor.kt new file mode 100644 index 0000000000..ec3bae6b15 --- /dev/null +++ b/HQPorner/src/main/kotlin/com/keyiflerolsun/MyDaddyExtractor.kt @@ -0,0 +1,51 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class MyDaddy : ExtractorApi() { + override val name = "MyDaddy" + override val mainUrl = "https://www.mydaddy.cc" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + Log.d("Kekik_${this.name}", "url » $url") + + val document = app.get(url).document.selectFirst("script:containsData(do_pl())")?.toString() + val jw = document?.substringAfter("replaceAll")?.substringAfter(",")?.substringBefore(")") ?: "" + + val (one, _, three) = jw.split("+").map { it.trim().removeSurrounding("\"") } + val first = document?.let { Regex("""${one}\s*=\s*"(.*?)";""").find(it)?.groupValues?.get(1) }?.removePrefix("//")?.removeSuffix("/") ?:"" + val third = document?.let { Regex("""${three}\s*=\s*"(.*?)";""").find(it)?.groupValues?.get(1) } ?:"" + val finalurl = "https://${first}/pubs/${third}" + val regex = Regex("""title=\\"(\d+p|4K)""") + val matches = regex.findAll(document.toString()) + + val qualities = mutableListOf<String>() + for (match in matches) { + val quality = match.groupValues[1] + + if (quality == "4K") { + qualities.add("2160") + } else { + qualities.add(quality.dropLast(1)) + } + } + + for (quality in qualities) { + callback.invoke( + ExtractorLink( + source = name, + name = name, + url = "${finalurl}/${quality}.mp4", + referer = extRef, + quality = getQualityFromName(quality) + ) + ) + } + } +} \ No newline at end of file diff --git a/InatBox/build.gradle.kts b/InatBox/build.gradle.kts new file mode 100644 index 0000000000..341069e4c3 --- /dev/null +++ b/InatBox/build.gradle.kts @@ -0,0 +1,18 @@ +version = 14 + +cloudstream { + authors = listOf("Barış") + language = "tr" + description = "Archive.org film ve belgesel eklentisi" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 3 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries", "Live") + iconUrl = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3vCp6N1K4bECoYRQD-cisJF2_6V_Hk01ZhDmoPR2JuM8O5qr4MqrPO1munM9cRlleBBSK6odYhLtDBWv4E3vhPhynlmS5hVVtJZShHoGA5REQ8_3v8SIlccTEqzVQu2UJyNYQdJNrKIfWy66RQeT0D-CcmFCbHPz5023H6p2v5fv4NVloZ5Rqo_yGrIY/s320/iNat-Box-App.png" +} diff --git a/InatBox/src/main/AndroidManifest.xml b/InatBox/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/InatBox/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/CDNJWPlayer.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/CDNJWPlayer.kt new file mode 100644 index 0000000000..f88864c9e0 --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/CDNJWPlayer.kt @@ -0,0 +1,28 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class CDNJWPlayer : ExtractorApi() { + override val name: String = "CDN JWPlayer" + override val mainUrl: String = "https://cdn.jwplayer.com" + override val requiresReferer: Boolean = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = url, + referer = referer ?: "", + quality = Qualities.Unknown.value, + type = ExtractorLinkType.M3U8 + ) + ) + } +} \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/DiskYandexComTrExtractor.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/DiskYandexComTrExtractor.kt new file mode 100644 index 0000000000..711b576f31 --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/DiskYandexComTrExtractor.kt @@ -0,0 +1,55 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.ExtractorLinkType +import com.lagradost.cloudstream3.utils.Qualities +import java.util.regex.Pattern + +class DiskYandexComTr : ExtractorApi() { + override val name: String = "DiskYandexComTr" + override val mainUrl: String = "https://disk.yandex.com.tr" + override val requiresReferer: Boolean = false + + // Regex pattern to extract master-playlist.m3u8 URLs + private val masterPlaylistRegex = Pattern.compile("https?://[^\\s\"]*?master-playlist\\.m3u8") + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + // Create a request with headers + val request = app.get( + url = url, + referer = "https://disk.yandex.com.tr/", + headers = mapOf( + "X-Requested-With" to "XMLHttpRequest" + ) + ) + + // Check if the request was successful + if (!request.isSuccessful) { + throw Exception("Failed to fetch URL: ${request.code}") + } + + // Extract the master-playlist.m3u8 URL using regex + val htmlContent = request.text + val matcher = masterPlaylistRegex.matcher(htmlContent) + if (matcher.find()) { + val masterPlaylistUrl = matcher.group() + + // Create an ExtractorLink for the master-playlist.m3u8 URL + val extractorLink = ExtractorLink( + source = "Yandex Disk", + name = "Yandex Disk", + url = masterPlaylistUrl, + referer = referer ?: "", + quality = Qualities.Unknown.value, + type = ExtractorLinkType.M3U8 + ) + + // Invoke the callback with the ExtractorLink + callback.invoke(extractorLink) + } else { + throw Exception("No master-playlist.m3u8 URL found in the response") + } + } +} \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/DzenExtractor.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/DzenExtractor.kt new file mode 100644 index 0000000000..4790984fb8 --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/DzenExtractor.kt @@ -0,0 +1,40 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class Dzen : ExtractorApi(){ + override val name = "Dzen" + override val mainUrl = "https://cdn.dzen.ru/" + override val requiresReferer = false + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val type = if (url.contains(".m3u8")) "m3u8" else if(url.contains(".mpd")) "dash" else null + + val extractorLink = when(type) { + "m3u8" -> ExtractorLink( + source = this.name, + name = this.name, + url = url, + referer = "", + quality = Qualities.Unknown.value, + type = ExtractorLinkType.M3U8 + ) + + "dash" -> ExtractorLink( + source = this.name, + name = this.name, + url = url, + referer = "", + quality = Qualities.Unknown.value, + type = ExtractorLinkType.DASH + ) + + else -> null + } + + if (extractorLink != null) { + callback.invoke(extractorLink) + } + } +} \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/InatBox.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/InatBox.kt new file mode 100644 index 0000000000..151220c978 --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/InatBox.kt @@ -0,0 +1,524 @@ +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import okhttp3.Interceptor +import org.json.JSONArray +import java.net.URI +import javax.crypto.Cipher +import javax.crypto.spec.SecretKeySpec +import javax.crypto.spec.IvParameterSpec +import android.util.Base64 +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.RequestBody.Companion.toRequestBody +import org.json.JSONException +import org.json.JSONObject + +class InatBox : MainAPI() { + private val contentUrl = "https://dizibox.rest" + + override var name = "InatBox" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries, TvType.Live) + override var sequentialMainPage = false + + private val urlToSearchResponse = mutableMapOf<String, SearchResponse>() + private val aesKey = "ywevqtjrurkwtqgz" //Master secret and iv key + + override val mainPage = mainPageOf( + "https://boxbc.sbs/CDN/001_STR/boxbc.sbs/spor_v2.php" to "Spor Kanalları", + "${contentUrl}/tv/cable.php" to "Kanallar Liste 1", + "${contentUrl}/tv/list2.php" to "Kanallar Liste 2", + "${contentUrl}/tv/sinema.php" to "Sinema Kanalları", + "${contentUrl}/tv/belgesel.php" to "Belgesel Kanalları", + "${contentUrl}/tv/ulusal.php" to "Ulusal Kanallar", + "${contentUrl}/tv/haber.php" to "Haber Kanalları", + "${contentUrl}/tv/cocuk.php" to "Çocuk Kanalları", + "${contentUrl}/tv/dini.php" to "Dini Kanallar", + "${contentUrl}/ex/index.php" to "EXXEN", + "${contentUrl}/ga/index.php" to "Gain", + "${contentUrl}/blu/index.php" to "BluTV", + "${contentUrl}/nf/index.php" to "Netflix", + "${contentUrl}/dsny/index.php" to "Disney+", + "${contentUrl}/amz/index.php" to "Amazon Prime", + "${contentUrl}/hb/index.php" to "HBO Max", + "${contentUrl}/tbi/index.php" to "Tabii", + "${contentUrl}/film/mubi.php" to "Mubi", + "${contentUrl}/ccc/index.php" to "TOD", + "${contentUrl}/yabanci-dizi/index.php" to "Yabancı Diziler", + "${contentUrl}/yerli-dizi/index.php" to "Yerli Diziler", + "${contentUrl}/film/yerli-filmler.php" to "Yerli Filmler", + "${contentUrl}/film/4k-film-exo.php" to "4K Film İzle | Exo" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val jsonResponse = + makeInatRequest(request.data) ?: return newHomePageResponse(request.name, emptyList()) + + val searchResults = getSearchResponseList(jsonResponse) + + for (searchResponse in searchResults) { + val url = searchResponse.url + if (!urlToSearchResponse.containsKey(url)) { + urlToSearchResponse[url] = searchResponse + } + } + + // Return a HomePageResponse with the parsed results + return newHomePageResponse(request.name, searchResults) + } + + override suspend fun search(query: String): List<SearchResponse> { + if (urlToSearchResponse.isEmpty()) { + for (pageData in mainPage) { + val url = pageData.data + val jsonResponse = makeInatRequest(url) ?: continue + + val searchResults = getSearchResponseList(jsonResponse) + + for (searchResponse in searchResults) { + val contentUrl = searchResponse.url + if (!urlToSearchResponse.containsKey(contentUrl)) { + urlToSearchResponse[contentUrl] = searchResponse + } + } + } + } + + val matchingResults = mutableListOf<SearchResponse>() + + val regex = try { + Regex(query, RegexOption.IGNORE_CASE) + } catch (e: Exception) { + Regex(Regex.escape(query), RegexOption.IGNORE_CASE) + } + + for ((_, searchResponse) in urlToSearchResponse) { + if (regex.containsMatchIn(searchResponse.name)) { + matchingResults.add(searchResponse) + } + } + + return matchingResults.distinctBy { it.name } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> { + return search(query) + } + + override suspend fun load(url: String): LoadResponse? { + val item = JSONObject(url) + + if (!inatContentAllowed(item)) { + return null + } + + if (item.has("diziType")) { + item.getString("diziName") + val type = item.getString("diziType") + + return when (type) { + "dizi" -> parseTvSeriesResponse(item) + "film" -> parseMovieResponse(item) + else -> null + } + + } else if (item.has("chName") && item.has("chUrl") && item.has("chImg")) { + item.getString("chName") + val chType = item.getString("chType") + + val loadResponse = when (chType) { + "live_url", "cable_sh" -> parseLiveStreamLoadResponse(item) + "tekli_regex_lb_sh_3" -> parseLiveSportsStreamLoadResponse(item) + else -> parseMovieResponse(item) + } + return loadResponse + } else { + return null + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("InatBox", "data: $data") + return try { + if (data.startsWith("[")) { + val chContentJsonArray = JSONArray(data) + for (i in 0 until chContentJsonArray.length()) { + val chContentJsonObject = chContentJsonArray.getJSONObject(i) + val chContent = parseToChContent(chContentJsonObject) + loadChContentLinks(chContent, subtitleCallback, callback) + } + } else { + val chContentJsonArray = JSONObject(data) + val chContent = parseToChContent(chContentJsonArray) + loadChContentLinks(chContent, subtitleCallback, callback) + } + true + } catch (e: Exception) { + Log.e("InatBox", "Error on loadLinks:${e::class.simpleName} - ${e.message}") + false + } + } + + private suspend fun parseTvSeriesResponse(item: JSONObject, tvType: TvType = TvType.TvSeries): LoadResponse? { + val episodes = mutableMapOf<DubStatus, MutableList<Episode>>() + val seasonDataList = mutableListOf<SeasonData>() + + val name = item.getString("diziName") + val url = item.getString("diziUrl") + val plot = item.getString("diziDetay") + + val jsonResponse = makeInatRequest(url) ?: return null + val jsonArray = JSONArray(jsonResponse) + + try { + for (i in 0 until jsonArray.length()) { + val seasonItem = jsonArray.getJSONObject(i) + val seasonName = seasonItem.getString("diziName") + val seasonData = SeasonData(season = (i + 1), name = seasonName) + seasonDataList.add(seasonData) + + val seasonUrl = seasonItem.getString("diziUrl") + + // Fetch the episode data for this season + val episodeResponse = makeInatRequest(seasonUrl) ?: continue + val episodeArray = try { + JSONArray(episodeResponse) + } catch (e: Exception) { + Log.e("InatBox", "Failed to parse episode JSON for season: $seasonName", e) + continue + } + + for (j in 0 until episodeArray.length()) { + try { + val episodeItem = episodeArray.getJSONObject(j) + val episodeName = episodeItem.getString("chName") + val episodePoster = episodeItem.getString("chImg") + episodes.getOrPut(DubStatus.None) { mutableListOf() }.add( + newEpisode(episodeItem.toString()) { + this.name = episodeName + this.posterUrl = episodePoster + this.season = i + 1 + this.episode = j + 1 + } + ) + } catch (e: JSONException) { + continue + } + } + } + + // Get the poster URL from the first season + val firstSeason = jsonArray.getJSONObject(0) + val posterUrl = firstSeason.getString("diziImg") + + return newAnimeLoadResponse( + name = name, + url = item.toString(), + type = tvType, + comingSoonIfNone = false + ) { + this.episodes = episodes.mapValues { it.value.toList() }.toMutableMap() + this.posterUrl = posterUrl + this.plot = plot + this.seasonNames = seasonDataList + } + } catch (e: Exception) { + Log.e( + "InatBox", + "Failed to parse TV series response: ${e.message}\nStacktrace:${ + e.stackTrace.joinToString("\n") + }" + ) + return null + } + } + + private suspend fun parseMovieResponse(item: JSONObject): LoadResponse? { + try { + if (item.has("diziType")) { + val name = item.getString("diziName") + val url = item.getString("diziUrl") + val posterUrl = item.getString("diziImg") + val plot = item.getString("diziDetay") + + val jsonResponse = makeInatRequest(url) ?: return null + val jsonArray = JSONArray(jsonResponse) + + return newMovieLoadResponse(name = name,url = item.toString(), type = TvType.Movie, dataUrl = jsonArray.toString()){ + this.posterUrl = posterUrl + this.plot = plot + } + } else { + val name = item.getString("chName") + item.getString("chUrl") + val posterUrl = item.getString("chImg") + return newMovieLoadResponse(name, item.toString(), TvType.Movie, item.toString()) { + this.posterUrl = posterUrl + } + } + } catch (e: Exception) { + Log.e("InatBox", "Failed to parse movie response: ${e.message}") + return null + } + } + + private suspend fun parseLiveSportsStreamLoadResponse(item: JSONObject): LiveStreamLoadResponse? { + try { + val chContent = parseToChContent(item) + val posterUrl = chContent.chImg + + return newLiveStreamLoadResponse(name, item.toString(), item.toString()) { + this.posterUrl = posterUrl + } + } catch (e: Exception) { + Log.e("InatBox", "Failed to parse sports live stream response: ${e.message}") + return null + } + } + + private suspend fun parseLiveStreamLoadResponse(item: JSONObject): LiveStreamLoadResponse? { + try { + val chContent = parseToChContent(item) + val name = chContent.chName + val posterUrl = chContent.chImg + + return newLiveStreamLoadResponse(name, item.toString(), item.toString()) { + this.posterUrl = posterUrl + } + } catch (e: Exception) { + Log.e("InatBox", "Failed to parse movie response: ${e.message}") + return null + } + } + + private fun inatContentAllowed(item: JSONObject): Boolean { + val type: String = if (item.has("diziType")) { + item.getString("diziType") + } else { + item.getString("chType") + } + + return when (type) { + "link", "web" -> false + else -> true + } + } + + private fun String.vkSourceFix(): String { + if (this.startsWith("act")) { + return "https://vk.com/al_video.php?${this}" + } + return this + } + + private fun parseToChContent(item: JSONObject): ChContent { + return ChContent( + chName = item.getString("chName"), + chUrl = item.getString("chUrl").vkSourceFix(), + chImg = item.getString("chImg"), + chHeaders = item.getString("chHeaders"), + chReg = item.getString("chReg"), + chType = item.getString("chType") + ) + } + + private suspend fun loadChContentLinks(chContent: ChContent, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit){ + val chType = chContent.chType + val contentToProcess : ChContent + + if(chType == "tekli_regex_lb_sh_3"){ + val name = chContent.chName + val url = chContent.chUrl + val posterUrl = chContent.chImg + val headers = chContent.chHeaders + val reg = chContent.chReg + val type = chContent.chType + + val jsonResponse = runCatching { makeInatRequest(url) }.getOrNull() ?: getJsonFromEncryptedInatResponse(app.get(url).text) ?: return + val firstItem = JSONObject(jsonResponse) + firstItem.put("chHeaders", headers) + firstItem.put("chReg", reg) + firstItem.put("chName",name) + firstItem.put("chImg",posterUrl) + firstItem.put("chType",type) + contentToProcess = parseToChContent(firstItem) + } else{ + contentToProcess = chContent + } + + val sourceUrl = contentToProcess.chUrl + + val headers: MutableMap<String, String> = mutableMapOf() + try { + val chHeaders = contentToProcess.chHeaders + val chReg = contentToProcess.chReg + if (chHeaders != "null") { + val jsonHeaders = JSONArray(chHeaders).getJSONObject(0) + for (entry in jsonHeaders.keys()) { + headers[entry] = jsonHeaders[entry].toString() + } + } + if (chReg != "null") { + val jsonReg = JSONArray(chReg).getJSONObject(0) + val cookie = jsonReg.getString("playSH2") + headers["Cookie"] = cookie + } + } catch (_: Exception) { + + } + + val extractorFound = + loadExtractor(sourceUrl, headers["Referer"], subtitleCallback){ + callback.invoke( + ExtractorLink(source = it.source,name = contentToProcess.chName, url = it.url, referer = it.referer, quality = it.quality, headers = it.headers, type = it.type) + ) + } + + //When no extractor found, try to load as generic + if (!extractorFound) { + callback.invoke( + ExtractorLink( + source = this.name, + name = contentToProcess.chName, + url = sourceUrl, + referer = "", + quality = Qualities.Unknown.value, + headers = headers, + type = if(sourceUrl.contains(".m3u8")) ExtractorLinkType.M3U8 else if(sourceUrl.contains(".mpd")) ExtractorLinkType.DASH else ExtractorLinkType.VIDEO + ) + ) + } + } + + private suspend fun makeInatRequest(url: String): String? { + // Extract hostname using URI + val hostName = try { + URI(url).host ?: throw IllegalArgumentException("Invalid URL: $url") + } catch (e: Exception) { + Log.e("InatBox", "Failed to extract hostname from URL: $url", e) + return null + } + + val headers = mapOf( + "Cache-Control" to "no-cache", + "Content-Length" to "37", + "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", + "Host" to hostName, + "Referer" to "https://speedrestapi.com/", + "X-Requested-With" to "com.bp.box" + ) + + val requestBody = "1=${aesKey}&0=${aesKey}" + + val interceptor = Interceptor { chain -> + val request = chain.request() + val newRequest = request.newBuilder().header("User-Agent", "speedrestapi").build() + chain.proceed(newRequest) + } + + val response = app.post( + url = url, + headers = headers, + requestBody = requestBody.toRequestBody(contentType = "application/x-www-form-urlencoded; charset=UTF-8".toMediaType()), + interceptor = interceptor + ) + + if (response.isSuccessful) { + val encryptedResponse = response.text + // Log.d("InatBox", "Encrypted response: ${encryptedResponse}") + return getJsonFromEncryptedInatResponse(encryptedResponse) + } else { + Log.e("InatBox", "Request failed") + return null + } + } + + private fun getJsonFromEncryptedInatResponse(response: String): String? { + try { + val algorithm = "AES/CBC/PKCS5Padding" + val keySpec = SecretKeySpec(aesKey.toByteArray(), "AES") + + // First decryption iteration + val cipher1 = Cipher.getInstance(algorithm) + cipher1.init(Cipher.DECRYPT_MODE, keySpec, IvParameterSpec(aesKey.toByteArray())) + val firstIterationData = + cipher1.doFinal(Base64.decode(response.split(":")[0], Base64.DEFAULT)) + + // Second decryption iteration + val cipher2 = Cipher.getInstance(algorithm) + cipher2.init(Cipher.DECRYPT_MODE, keySpec, IvParameterSpec(aesKey.toByteArray())) + val secondIterationData = cipher2.doFinal( + Base64.decode( + String(firstIterationData).split(":")[0], + Base64.DEFAULT + ) + ) + + // Parse JSON + val jsonString = String(secondIterationData) + return jsonString + } catch (e: Exception) { + Log.e("InatBox", "Decryption failed: ${e.message}") + return null + } + } + + private fun getSearchResponseList(jsonResponse: String): List<SearchResponse> { + val searchResults = mutableListOf<SearchResponse>() + try { + val jsonArray = JSONArray(jsonResponse) + + for (i in 0 until jsonArray.length()) { + val item = jsonArray.getJSONObject(i) + + if (!inatContentAllowed(item)) { + continue + } + + //Let's pass item directly to the next step + if (item.has("diziType")) { + val name = item.getString("diziName") + val type = item.getString("diziType") + val posterUrl = item.getString("diziImg") + + val searchResponse = when (type) { + "dizi" -> newTvSeriesSearchResponse(name, item.toString()) { + this.posterUrl = posterUrl + } + + "film" -> newMovieSearchResponse(name, item.toString()) { + this.posterUrl = posterUrl + } + + else -> null // Ignore unsupported types + } + searchResponse?.let { searchResults.add(it) } + } else if (item.has("chName") && item.has("chUrl") && item.has("chImg")) { + // Handle the case where diziType is missing but chName, chUrl, and chImg are present + val name = item.getString("chName") + val posterUrl = item.getString("chImg") + val chType = item.getString("chType") + + val searchResponse = when (chType) { + "live_url", "tekli_regex_lb_sh_3" -> newLiveSearchResponse(name, item.toString(), TvType.Live) { + this.posterUrl = posterUrl + } + + else -> newMovieSearchResponse(name, item.toString()) { + this.posterUrl = posterUrl + } + } + searchResults.add(searchResponse) + } + } + } catch (e: Exception) { + Log.e("InatBox", "Failed to parse JSON response: ${e.message}") + } + + return searchResults + } +} \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/InatBoxModels.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/InatBoxModels.kt new file mode 100644 index 0000000000..df03552154 --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/InatBoxModels.kt @@ -0,0 +1,10 @@ +package com.keyiflerolsun + +data class ChContent( + val chName : String, + val chUrl : String, + val chImg : String, + val chHeaders : String, + val chReg : String, + val chType: String +) \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/InatBoxPlugin.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/InatBoxPlugin.kt new file mode 100644 index 0000000000..de4c27cd6b --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/InatBoxPlugin.kt @@ -0,0 +1,16 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class InatBoxPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(InatBox()) + registerExtractorAPI(DiskYandexComTr()) + registerExtractorAPI(Vk()) + registerExtractorAPI(Dzen()) + registerExtractorAPI(CDNJWPlayer()) + } +} \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/VkExtractor.kt b/InatBox/src/main/kotlin/com/keyiflerolsun/VkExtractor.kt new file mode 100644 index 0000000000..682350a18d --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/VkExtractor.kt @@ -0,0 +1,36 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class Vk : ExtractorApi() { + override val name = "Vk" + override val mainUrl = "https://vk.com/" + override val requiresReferer = false + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val response = app.get( + url = url, + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + referer = this.mainUrl, + ) + + val m3u8Regex = Regex(""""([^"]*m3u8[^"]*)"""") + val m3u8SourceUrl = m3u8Regex.find(response.text)?.groupValues?.get(1)?.replace("\\/", "/") + + if (m3u8SourceUrl != null) { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3u8SourceUrl, + referer = this.mainUrl, + quality = Qualities.Unknown.value, + type = ExtractorLinkType.M3U8 + ) + ) + } else { + return + } + } +} \ No newline at end of file diff --git a/InatBox/src/main/kotlin/com/keyiflerolsun/bakalim.py b/InatBox/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..2c6c91714b --- /dev/null +++ b/InatBox/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,84 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from urllib.parse import urlparse +from Crypto.Cipher import AES +from Crypto.Util.Padding import unpad +import requests, base64, json + +class InatIstek: + def __init__(self, aes_key: bytes = b"C3V4HUpUbGDOjxEl"): + self.aes_key = aes_key + + def hostname_al(self, url: str) -> str: + parsed_url = urlparse(url) + if hostname := parsed_url.hostname: + return hostname + + raise ValueError(f"Geçersiz URL: {url}") + + def istek_yap(self, url: str) -> str | None: + try: + hostname = self.hostname_al(url) + except ValueError as hata: + raise ValueError(f"URL'den hostname çıkarılamadı: {url}") from hata + + headers = { + "Cache-Control" : "no-cache", + "Content-Length" : "37", + "Content-Type" : "application/x-www-form-urlencoded; charset=UTF-8", + "Host" : hostname, + "Referer" : "https://speedrestapi.com/", + "X-Requested-With" : "com.bp.box", + "User-Agent" : "speedrestapi" + } + + key_str = self.aes_key.decode() + body = f"1={key_str}&0={key_str}" + + try: + response = requests.post(url, headers=headers, data=body) + if response.status_code != 200: + raise ValueError(f"İstek başarısız. HTTP Durum Kodu: {response.status_code}") + + json_str = self.sifre_coz(response.text) + return json.loads(json_str) + except Exception as hata: + raise ValueError(f"İstek sırasında hata oluştu: {url}") from hata + + def sifre_coz(self, sifreli_metin: str) -> str | None: + try: + iv = self.aes_key + + parcalar = sifreli_metin.split(":") + if not parcalar or not parcalar[0]: + raise ValueError("Geçersiz şifreli metin formatı.") + + cipher1 = AES.new(self.aes_key, AES.MODE_CBC, iv) + ilk_adim_veri = unpad(cipher1.decrypt(base64.b64decode(parcalar[0])), AES.block_size) + + ara_parcalar = ilk_adim_veri.decode().split(":") + if not ara_parcalar or not ara_parcalar[0]: + raise ValueError("Ara şifre çözme adımı geçersiz çıktı üretti.") + + cipher2 = AES.new(self.aes_key, AES.MODE_CBC, iv) + ikinci_adim_veri = unpad(cipher2.decrypt(base64.b64decode(ara_parcalar[0])), AES.block_size) + + return ikinci_adim_veri.decode() + except Exception as hata: + raise ValueError(f"Şifre çözme işlemi başarısız. : {hata}") from hata + + +inat = InatIstek() +veriler = inat.istek_yap("https://dizibox.rest/amz/index.php") +for veri in veriler: + baslik = veri.get("diziName") or veri.get("chName") + if baslik == "@inattvapk": + continue + + konsol.print(veri) + + detay_url = veri.get("diziUrl") or veri.get("chUrl") + detay = inat.istek_yap(detay_url) + konsol.print(detay) + break \ No newline at end of file diff --git a/IzleAI/build.gradle.kts b/IzleAI/build.gradle.kts new file mode 100644 index 0000000000..21190c5286 --- /dev/null +++ b/IzleAI/build.gradle.kts @@ -0,0 +1,18 @@ +version = 5 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "1080P yabancı film izle, Türkçe dublaj ve Türkçe altyazılı film seçenekleri ile Türkiye'nin en geniş film arşivi 720pizle Full hd film izle." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=720pizle.ai&sz=%size%" +} \ No newline at end of file diff --git a/IzleAI/src/main/AndroidManifest.xml b/IzleAI/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/IzleAI/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAI.kt b/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAI.kt new file mode 100644 index 0000000000..3b65224cc8 --- /dev/null +++ b/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAI.kt @@ -0,0 +1,153 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class IzleAI : MainAPI() { + override var mainUrl = "https://selcukflix.com" + override var name = "720PizleAI" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = true + override val supportedTypes = setOf(TvType.Movie) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + override var sequentialMainPageDelay = 50L // ? 0.05 saniye + override var sequentialMainPageScrollDelay = 50L // ? 0.05 saniye + + override val mainPage = mainPageOf( + "${mainUrl}/kategori/aile-filmleri" to "Aile", + "${mainUrl}/kategori/aksiyon-filmleri" to "Aksiyon", + "${mainUrl}/kategori/animasyon-filmleri" to "Animasyon", + "${mainUrl}/kategori/belgesel-filmleri" to "Belgesel", + "${mainUrl}/kategori/bilim-kurgu-filmleri" to "Bilim Kurgu", + "${mainUrl}/kategori/dram-filmleri" to "Dram", + "${mainUrl}/kategori/fantastik-filmleri" to "Fantastik", + "${mainUrl}/kategori/film-noir-filmleri" to "Film-Noir", + "${mainUrl}/kategori/gerilim-filmleri" to "Gerilim", + "${mainUrl}/kategori/gizem-filmleri" to "Gizem", + "${mainUrl}/kategori/kisa-filmleri" to "Kısa Film", + "${mainUrl}/kategori/komedi-filmleri" to "Komedi", + "${mainUrl}/kategori/korku-filmleri" to "Korku", + "${mainUrl}/kategori/macera-filmleri" to "Macera", + "${mainUrl}/kategori/muzik-filmleri" to "Müzik", + "${mainUrl}/kategori/romantik-filmleri" to "Romantik", + "${mainUrl}/kategori/savas-filmleri" to "Savaş", + "${mainUrl}/kategori/spor-filmleri" to "Spor", + "${mainUrl}/kategori/suc-filmleri" to "Suç", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data).document + val home = document.select("a.ambilight").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("h2")?.text() ?: return null + val href = fixUrlNull(this.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + private fun SearchItem.toSearchResponse(): SearchResponse? { + return newMovieSearchResponse( + title ?: return null, + "${mainUrl}/${slug}", + TvType.Movie, + ) { + this.posterUrl = poster + } + } + + override suspend fun search(query: String): List<SearchResponse> { + val mainReq = app.get(mainUrl) + val mainPage = mainReq.document + val cKey = mainPage.selectFirst("input[name='cKey']")?.attr("value") ?: return emptyList() + val cValue = mainPage.selectFirst("input[name='cValue']")?.attr("value") ?: return emptyList() + + val veriler = mutableListOf<SearchResponse>() + + val searchReq = app.post( + "${mainUrl}/bg/searchcontent", + data = mapOf( + "cKey" to cKey, + "cValue" to cValue, + "searchterm" to query + ), + headers = mapOf( + "Accept" to "application/json, text/javascript, */*; q=0.01", + "X-Requested-With" to "XMLHttpRequest" + ), + referer = "${mainUrl}/", + cookies = mapOf( + "showAllDaFull" to "true", + "PHPSESSID" to mainReq.cookies["PHPSESSID"].toString(), + ) + ).parsedSafe<SearchResult>() + + if (searchReq?.data?.state != true) { + throw ErrorLoadingException("Invalid Json response") + } + + searchReq.data.result?.forEach { searchItem -> + val title = searchItem.title ?: return@forEach + if (title.endsWith("Serisi") || title.endsWith("Series")) { + return@forEach + } + + veriler.add(searchItem.toSearchResponse() ?: return@forEach) + } + + return veriler + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.gap-3.pt-5 h2")?.text() ?: return null + val poster = fixUrlNull(document.selectFirst("div.col-span-2 img")?.attr("data-src")) + val year = document.selectFirst("a[href*='/yil/']")?.text()?.toIntOrNull() + val description = document.selectFirst("div.mv-det-p")?.text()?.trim() ?: document.selectFirst("div.w-full div.text-base")?.text()?.trim() + val tags = document.select("[href*='kategori']").map { it.text() } + val rating = document.selectFirst("a[href*='imdb.com'] span.font-bold")?.text()?.trim().toRatingInt() + val duration = document.selectXpath("//span[contains(text(), ' dk.')]").text().trim().split(" ").first().toIntOrNull() + val trailer = document.selectFirst("iframe[data-src*='youtube.com/embed/']")?.attr("data-src") + val actors = document.select("div.flex.overflow-auto [href*='oyuncu']").map { + Actor(it.selectFirst("span span")!!.text(), it.selectFirst("img")?.attr("data-srcset")?.split(" ")?.first()) + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addTrailer(trailer) + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("IAI", "data » $data") + val document = app.get(data).document + val iframe = fixUrlNull(document.selectFirst("div.player iframe")?.attr("src")) ?: return false + Log.d("IAI", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + + return true + } +} \ No newline at end of file diff --git a/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAIModels.kt b/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAIModels.kt new file mode 100644 index 0000000000..1f6e4d5bcf --- /dev/null +++ b/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAIModels.kt @@ -0,0 +1,23 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class SearchResult( + @JsonProperty("data") val data: SearchData? +) + +data class SearchData( + @JsonProperty("state") val state: Boolean? = null, + @JsonProperty("result") val result: List<SearchItem>? = arrayListOf(), + @JsonProperty("message") val message: String? = null, + @JsonProperty("html") val html: String? = null +) + +data class SearchItem( + @JsonProperty("used_slug") val slug: String? = null, + @JsonProperty("object_name") val title: String? = null, + @JsonProperty("object_poster_url") val poster: String? = null, +) \ No newline at end of file diff --git a/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAIPlugin.kt b/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAIPlugin.kt new file mode 100644 index 0000000000..6d54c8d453 --- /dev/null +++ b/IzleAI/src/main/kotlin/com/keyiflerolsun/IzleAIPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class IzleAIPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(IzleAI()) + } +} \ No newline at end of file diff --git a/JetFilmizle/build.gradle.kts b/JetFilmizle/build.gradle.kts new file mode 100644 index 0000000000..d85d6a3e20 --- /dev/null +++ b/JetFilmizle/build.gradle.kts @@ -0,0 +1,18 @@ +version = 19 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Binlerce Film İzleme Seçeneğiyle En İyi Film İzleme Sitesi" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=https://jetfilmizle.de&sz=%size%" +} \ No newline at end of file diff --git a/JetFilmizle/src/main/AndroidManifest.xml b/JetFilmizle/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/JetFilmizle/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/JetFilmizle/src/main/kotlin/com/keyiflerolsun/JetFilmizle.kt b/JetFilmizle/src/main/kotlin/com/keyiflerolsun/JetFilmizle.kt new file mode 100644 index 0000000000..4c2e06a1fa --- /dev/null +++ b/JetFilmizle/src/main/kotlin/com/keyiflerolsun/JetFilmizle.kt @@ -0,0 +1,141 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class JetFilmizle : MainAPI() { + override var mainUrl = "https://jetfilmizle.io" + override var name = "JetFilmizle" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/page/" to "Son Filmler", + "${mainUrl}/netflix/page/" to "Netflix", + "${mainUrl}/editorun-secimi/page/" to "Editörün Seçimi", + "${mainUrl}/turk-film-izle/page/" to "Türk Filmleri", + "${mainUrl}/cizgi-filmler-izle/page/" to "Çizgi Filmler", + "${mainUrl}/kategoriler/yesilcam-filmleri-izlee/page/" to "Yeşilçam Filmleri" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("article.movie").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + var title = this.selectFirst("h2 a")?.text() ?: this.selectFirst("h3 a")?.text() ?: this.selectFirst("h4 a")?.text() ?: this.selectFirst("h5 a")?.text() ?: this.selectFirst("h6 a")?.text() ?: return null + title = title.substringBefore(" izle") + + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + var posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + if (posterUrl == null) { + posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + } + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.post( + "${mainUrl}/filmara.php", + referer = "${mainUrl}/", + data = mapOf("s" to query) + ).document + + return document.select("article.movie").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("section.movie-exp div.movie-exp-title")?.text()?.substringBefore(" izle")?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("section.movie-exp img")?.attr("data-src")) ?: fixUrlNull(document.selectFirst("section.movie-exp img")?.attr("src")) + val yearDiv = document.selectXpath("//div[@class='yap' and contains(strong, 'Vizyon') or contains(strong, 'Yapım')]").text().trim() + val year = Regex("""(\d{4})""").find(yearDiv)?.groupValues?.get(1)?.toIntOrNull() + val description = document.selectFirst("section.movie-exp p.aciklama")?.text()?.trim() + val tags = document.select("section.movie-exp div.catss a").map { it.text() } + val rating = document.selectFirst("section.movie-exp div.imdb_puan span")?.text()?.split(" ")?.last()?.toRatingInt() + val actors = document.select("section.movie-exp div.oyuncu").map { + Actor(it.selectFirst("div.name")!!.text(), fixUrlNull(it.selectFirst("img")!!.attr("data-src"))) + } + + val recommendations = document.select("div#benzers article").mapNotNull { + var recName = it.selectFirst("h2 a")?.text() ?: it.selectFirst("h3 a")?.text() ?: it.selectFirst("h4 a")?.text() ?: it.selectFirst("h5 a")?.text() ?: it.selectFirst("h6 a")?.text() ?: return@mapNotNull null + recName = recName.substringBefore(" izle") + + val recHref = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null + val recPosterUrl = fixUrlNull(it.selectFirst("img")?.attr("data-src")) + + newMovieSearchResponse(recName, recHref, TvType.Movie) { + this.posterUrl = recPosterUrl + } + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.recommendations = recommendations + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("JTF", "data » $data") + val document = app.get(data).document + + val iframes = mutableListOf<String>() + val mainIframe = fixUrlNull(document.selectFirst("div#movie iframe")?.attr("data-src")) ?: fixUrlNull(document.selectFirst("div#movie iframe")?.attr("data")) ?: fixUrlNull(document.selectFirst("div#movie iframe")?.attr("src")) + Log.d("JTF", "mainIframe » $mainIframe") + if (mainIframe != null) { + iframes.add(mainIframe) + } + + document.select("div.film_part a").forEach { + val source = it.selectFirst("span")?.text()?.trim() ?: return@forEach + if (source.lowercase().contains("fragman")) return@forEach + + val movDoc = app.get(it.attr("href")).document + val iframe = fixUrlNull(movDoc.selectFirst("div#movie iframe")?.attr("data-src")) ?: fixUrlNull(movDoc.selectFirst("div#movie iframe")?.attr("data")) ?: fixUrlNull(movDoc.selectFirst("div#movie iframe")?.attr("src")) + Log.d("JTF", "iframe » $iframe") + + if (iframe != null) { + iframes.add(iframe) + } else { + movDoc.select("div#movie p a").forEach downloadLinkForEach@{ link -> + val downloadLink = fixUrlNull(link.attr("href")) ?: return@downloadLinkForEach + iframes.add(downloadLink) + } + } + } + + for (iframe in iframes) { + if (iframe.contains("jetv.xyz")) { + Log.d("JTF", "jetv » $iframe") + val jetvDoc = app.get(iframe).document + val jetvIframe = fixUrlNull(jetvDoc.selectFirst("iframe")?.attr("src")) ?: continue + Log.d("JTF", "jetvIframe » $jetvIframe") + + loadExtractor(jetvIframe, "${mainUrl}/", subtitleCallback, callback) + } else { + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + } + + return true + } +} diff --git a/JetFilmizle/src/main/kotlin/com/keyiflerolsun/JetFilmizlePlugin.kt b/JetFilmizle/src/main/kotlin/com/keyiflerolsun/JetFilmizlePlugin.kt new file mode 100644 index 0000000000..115a745963 --- /dev/null +++ b/JetFilmizle/src/main/kotlin/com/keyiflerolsun/JetFilmizlePlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class JetFilmizlePlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(JetFilmizle()) + registerExtractorAPI(PixelDrain()) + } +} \ No newline at end of file diff --git a/JetFilmizle/src/main/kotlin/com/keyiflerolsun/PixelDrainExtractor.kt b/JetFilmizle/src/main/kotlin/com/keyiflerolsun/PixelDrainExtractor.kt new file mode 100644 index 0000000000..fb549e3469 --- /dev/null +++ b/JetFilmizle/src/main/kotlin/com/keyiflerolsun/PixelDrainExtractor.kt @@ -0,0 +1,30 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class PixelDrain : ExtractorApi() { + override val name = "PixelDrain" + override val mainUrl = "https://pixeldrain.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val pixelId = Regex("""([^/]+)(?=\?download)""").find(url)?.groupValues?.get(1) + val downloadLink = "${mainUrl}/api/file/${pixelId}?download" + Log.d("Kekik_${this.name}", "downloadLink » $downloadLink") + + callback.invoke( + ExtractorLink( + source = "pixeldrain - $pixelId", + name = "pixeldrain - $pixelId", + url = downloadLink, + referer = "${mainUrl}/u/${pixelId}?download", + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } +} \ No newline at end of file diff --git a/KONTROL.py b/KONTROL.py new file mode 100644 index 0000000000..84a4bdd43a --- /dev/null +++ b/KONTROL.py @@ -0,0 +1,141 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from Crypto.Cipher import AES +from Crypto.Util.Padding import unpad +import os, re, base64, json + +class MainUrlUpdater: + def __init__(self, base_dir="."): + self.base_dir = base_dir + self.oturum = CloudScraper() + + @property + def eklentiler(self): + return sorted([ + dosya for dosya in os.listdir(self.base_dir) + if os.path.isdir(os.path.join(self.base_dir, dosya)) + and not dosya.startswith(".") + and dosya not in {"gradle", "CanliTV", "OxAx", "__Temel", "SineWix", "YouTube", "NetflixMirror", "HQPorner"} + ]) + + def _kt_dosyasini_bul(self, dizin, dosya_adi): + for kok, alt_dizinler, dosyalar in os.walk(dizin): + if dosya_adi in dosyalar: + return os.path.join(kok, dosya_adi) + + return None + + @property + def kt_dosyalari(self): + return [ + kt_dosya_yolu for eklenti in self.eklentiler + if (kt_dosya_yolu := self._kt_dosyasini_bul(eklenti, f"{eklenti}.kt")) + ] + + def _mainurl_bul(self, kt_dosya_yolu): + with open(kt_dosya_yolu, "r", encoding="utf-8") as file: + icerik = file.read() + if mainurl := re.search(r'override\s+var\s+mainUrl\s*=\s*"([^"]+)"', icerik): + return mainurl[1] + + return None + + def _mainurl_guncelle(self, kt_dosya_yolu, eski_url, yeni_url): + with open(kt_dosya_yolu, "r+", encoding="utf-8") as file: + icerik = file.read() + yeni_icerik = icerik.replace(eski_url, yeni_url) + file.seek(0) + file.write(yeni_icerik) + file.truncate() + + def _versiyonu_artir(self, build_gradle_yolu): + with open(build_gradle_yolu, "r+", encoding="utf-8") as file: + icerik = file.read() + if version_match := re.search(r'version\s*=\s*(\d+)', icerik): + eski_versiyon = int(version_match[1]) + yeni_versiyon = eski_versiyon + 1 + yeni_icerik = icerik.replace(f"version = {eski_versiyon}", f"version = {yeni_versiyon}") + file.seek(0) + file.write(yeni_icerik) + file.truncate() + return yeni_versiyon + + return None + + def _rectv_ver(self): + istek = self.oturum.post( + url = "https://firebaseremoteconfig.googleapis.com/v1/projects/791583031279/namespaces/firebase:fetch", + headers = { + "X-Goog-Api-Key" : "AIzaSyBbhpzG8Ecohu9yArfCO5tF13BQLhjLahc", + "X-Android-Package" : "com.rectv.shot", + "User-Agent" : "Dalvik/2.1.0 (Linux; U; Android 12)", + }, + json = { + "appBuild" : "81", + "appInstanceId" : "evON8ZdeSr-0wUYxf0qs68", + "appId" : "1:791583031279:android:1", + } + ) + return istek.json().get("entries", {}).get("api_url", "").replace("/api/", "") + + def _golgetv_ver(self): + istek = self.oturum.get("https://raw.githubusercontent.com/sevdaliyim/sevdaliyim/refs/heads/main/ssl2.key").text + cipher = AES.new(b"trskmrskslmzbzcnfstkcshpfstkcshp", AES.MODE_CBC, b"trskmrskslmzbzcn") + encrypted_data = base64.b64decode(istek) + decrypted_data = unpad(cipher.decrypt(encrypted_data), AES.block_size).decode("utf-8") + return json.loads(decrypted_data, strict=False)["apiUrl"] + + @property + def mainurl_listesi(self): + return { + dosya: self._mainurl_bul(dosya) for dosya in self.kt_dosyalari + } + + def guncelle(self): + for dosya, mainurl in self.mainurl_listesi.items(): + eklenti_adi = dosya.split("/")[0] + + print("\n") + konsol.log(f"[~] Kontrol Ediliyor : {eklenti_adi}") + if eklenti_adi == "RecTV": + try: + final_url = self._rectv_ver() + konsol.log(f"[+] Kontrol Edildi : {mainurl}") + except Exception as hata: + konsol.log(f"[!] Kontrol Edilemedi : {mainurl}") + konsol.log(f"[!] {type(hata).__name__} : {hata}") + continue + elif eklenti_adi == "GolgeTV": + try: + final_url = self._golgetv_ver() + konsol.log(f"[+] Kontrol Edildi : {mainurl}") + except Exception as hata: + konsol.log(f"[!] Kontrol Edilemedi : {mainurl}") + konsol.log(f"[!] Kontrol Edilemedi : {mainurl}") + konsol.log(f"[!] {type(hata).__name__} : {hata}") + continue + else: + try: + istek = self.oturum.get(mainurl, allow_redirects=True) + konsol.log(f"[+] Kontrol Edildi : {mainurl}") + except Exception as hata: + konsol.log(f"[!] Kontrol Edilemedi : {mainurl}") + konsol.log(f"[!] {type(hata).__name__} : {hata}") + continue + + final_url = istek.url[:-1] if istek.url.endswith("/") else istek.url + + if mainurl == final_url: + continue + + self._mainurl_guncelle(dosya, mainurl, final_url) + + if self._versiyonu_artir(f"{eklenti_adi}/build.gradle.kts"): + konsol.log(f"[»] {mainurl} -> {final_url}") + + +if __name__ == "__main__": + updater = MainUrlUpdater() + updater.guncelle() \ No newline at end of file diff --git a/KoreanTurk/build.gradle.kts b/KoreanTurk/build.gradle.kts new file mode 100644 index 0000000000..e93693b92c --- /dev/null +++ b/KoreanTurk/build.gradle.kts @@ -0,0 +1,18 @@ +version = 5 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Güney Kore sevdalılarının vazgeçemediği ve Türkiye'nin en çok ziyaret edilen Güney Kore Portalı; Koreantürk'e hoşgeldiniz!" + + /** + * 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=www.koreanturk.com&sz=%size%" +} diff --git a/KoreanTurk/src/main/AndroidManifest.xml b/KoreanTurk/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/KoreanTurk/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/KoreanTurk/src/main/kotlin/com/keyiflerolsun/KoreanTurk.kt b/KoreanTurk/src/main/kotlin/com/keyiflerolsun/KoreanTurk.kt new file mode 100644 index 0000000000..e722324f65 --- /dev/null +++ b/KoreanTurk/src/main/kotlin/com/keyiflerolsun/KoreanTurk.kt @@ -0,0 +1,169 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import kotlin.random.Random + +class KoreanTurk : MainAPI() { + override var mainUrl = "https://www.koreanturk.com" + override var name = "KoreanTurk" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.AsianDrama) + + override val mainPage = mainPageOf( + "${mainUrl}/bolumler/page/" to "Son Eklenenler", + "${mainUrl}/Konu-Aile" to "Aile", + "${mainUrl}/Konu-Aksiyon" to "Aksiyon", + "${mainUrl}/Konu-Bilim-Kurgu" to "Bilim Kurgu", + "${mainUrl}/Konu-Donem" to "Dönem", + "${mainUrl}/Konu-Dram" to "Dram", + "${mainUrl}/Konu-Fantastik" to "Fantastik", + "${mainUrl}/Konu-Genclik" to "Gençlik", + "${mainUrl}/Konu-Gerilim" to "Gerilim", + "${mainUrl}/Konu-Gizem" to "Gizem", + "${mainUrl}/Konu-Hukuk" to "Hukuk", + "${mainUrl}/Konu-Komedi" to "Komedi", + "${mainUrl}/Konu-Korku" to "Korku", + "${mainUrl}/Konu-Medikal" to "Medikal", + "${mainUrl}/Konu-Mini-Dizi" to "Mini Dizi", + "${mainUrl}/Konu-Okul" to "Okul", + "${mainUrl}/Konu-Polisiye-Askeri" to "Polisiye-Askeri", + "${mainUrl}/Konu-Romantik" to "Romantik", + "${mainUrl}/Konu-Romantik-Komedi" to "Romantik Komedi", + "${mainUrl}/Konu-Suc" to "Suç", + "${mainUrl}/Konu-Tarih" to "Tarih", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + if (request.data.contains("Konu-")) { + val document = app.get(request.data).document + val home = document.selectXpath("//img[contains(@onload, 'NcodeImageResizer')]") + .shuffled(Random(System.nanoTime())) + .take(12) + .mapNotNull { it.toKonuResult() } + + return newHomePageResponse( + list = HomePageList( + name = request.name, + list = home, + isHorizontalImages = false + ), + hasNext = false + ) + } else { + val document = app.get("${request.data}${page}").document + val home = document.select("div.standartbox").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + } + + private fun removeEpisodePart(url: String): String { + val regex = "-[0-9]+(-final)?-bolum-izle\\.html".toRegex() + return regex.replace(url, "") + } + + private fun Element.toSearchResult(): SearchResponse? { + val dizi = this.selectFirst("h2 span")?.text()?.trim() ?: return null + val bolum = this.selectFirst("h2")?.ownText()?.substringBefore(".Bölüm")?.trim() + val title = "$dizi | $bolum" + + var href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + if (href.contains("izle.html")) { + href = removeEpisodePart(href) + } + + val posterUrl = fixUrlNull(this.selectFirst("div.resimcik img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { this.posterUrl = posterUrl } + } + + private fun Element.toKonuResult(): SearchResponse? { + val title = this.selectXpath("preceding-sibling::a[1]").text().trim() + val href = fixUrlNull(this.selectXpath("preceding-sibling::a[1]").attr("href")) ?: return null + val posterUrl = fixUrlNull(this.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/").document + + val searchResults = document.select(".cat-item").mapNotNull { + val title = it.text() + val href = it.firstElementChild()?.attr("href") + + if (title.contains(query, ignoreCase = true) && href != null) { + // ! i don't want to put posterUrl because already their website slow and getting every page is time consuming + // * val diziPage = app.get(href).document + // * val posterUrl = diziPage.selectFirst("div.resimcik img")?.attr("src")?.removeSuffix("-60x60.jpg") + ".jpg" //Assuming every image has this res, might change in the future + newTvSeriesSearchResponse(title, href) { + this.posterUrl = "" + } + } else { + null + } + } + + return searchResults + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h3")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.resimcik img")?.attr("src")) + val description = document.selectFirst("[property='og:description']")?.attr("content")?.trim() + + val episodes = document.select("div.standartbox a").mapNotNull { + val epName = it.selectFirst("h2")?.ownText()?.trim() ?: return@mapNotNull null + val epHref = fixUrlNull(it.attr("href")) ?: return@mapNotNull null + val epEpisode = Regex("""(\d+)\.Bölüm""").find(epName)?.groupValues?.get(1)?.toIntOrNull() + val epSeason = Regex("""(\d+)\.Sezon""").find(epName)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + + return newTvSeriesLoadResponse(title, url, TvType.AsianDrama, episodes) { + this.posterUrl = poster + this.plot = description + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("KRT", "data » $data") + val document = app.get(data).document + + val iframes = mutableListOf<String>() + + document.select("div.filmcik div.tab-pane iframe").forEach { + val iframe = fixUrlNull(it.attr("src")) ?: return@forEach + iframes.add(iframe) + } + + document.select("div.filmcik div.tab-pane a").forEach { + val iframe = fixUrlNull(it.attr("href")) ?: return@forEach + iframes.add(iframe) + } + + iframes.forEach { iframe -> + Log.d("KRT", "iframe » $iframe") + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } +} diff --git a/KoreanTurk/src/main/kotlin/com/keyiflerolsun/KoreanTurkPlugin.kt b/KoreanTurk/src/main/kotlin/com/keyiflerolsun/KoreanTurkPlugin.kt new file mode 100644 index 0000000000..72cb57be22 --- /dev/null +++ b/KoreanTurk/src/main/kotlin/com/keyiflerolsun/KoreanTurkPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class KoreanTurkPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(KoreanTurk()) + } +} \ No newline at end of file diff --git a/KultFilmler/build.gradle.kts b/KultFilmler/build.gradle.kts new file mode 100644 index 0000000000..05f6b09228 --- /dev/null +++ b/KultFilmler/build.gradle.kts @@ -0,0 +1,18 @@ +version = 7 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Kült Filmler özenle en iyi filmleri derler ve iyi bir altyazılı film izleme deneyimi sunmayı amaçlar" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=kultfilmler.com&sz=%size%" +} diff --git a/KultFilmler/src/main/AndroidManifest.xml b/KultFilmler/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/KultFilmler/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/KultFilmler/src/main/kotlin/com/keyiflerolsun/KultFilmler.kt b/KultFilmler/src/main/kotlin/com/keyiflerolsun/KultFilmler.kt new file mode 100644 index 0000000000..4efaac8d94 --- /dev/null +++ b/KultFilmler/src/main/kotlin/com/keyiflerolsun/KultFilmler.kt @@ -0,0 +1,194 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import android.util.Base64 +import org.jsoup.Jsoup + +class KultFilmler : MainAPI() { + override var mainUrl = "https://kultfilmler.net" + override var name = "KultFilmler" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) + + override val mainPage = mainPageOf( + "${mainUrl}/page/" to "Son Filmler", + "${mainUrl}/category/aile-filmleri-izle/page/" to "Aile", + "${mainUrl}/category/aksiyon-filmleri-izle/page/" to "Aksiyon", + "${mainUrl}/category/animasyon-filmleri-izle/page/" to "Animasyon", + "${mainUrl}/category/belgesel-izle/page/" to "Belgesel", + "${mainUrl}/category/bilim-kurgu-filmleri-izle/page/" to "Bilim Kurgu", + "${mainUrl}/category/biyografi-filmleri-izle/page/" to "Biyografi", + "${mainUrl}/category/dram-filmleri-izle/page/" to "Dram", + "${mainUrl}/category/fantastik-filmleri-izle/page/" to "Fantastik", + "${mainUrl}/category/gerilim-filmleri-izle/page/" to "Gerilim", + "${mainUrl}/category/gizem-filmleri-izle/page/" to "Gizem", + "${mainUrl}/category/kara-filmleri-izle/page/" to "Kara", + "${mainUrl}/category/kisa-film-izle/page/" to "Kısa Metrajlı", + "${mainUrl}/category/komedi-filmleri-izle/page/" to "Komedi", + "${mainUrl}/category/korku-filmleri-izle/page/" to "Korku", + "${mainUrl}/category/macera-filmleri-izle/page/" to "Macera", + "${mainUrl}/category/muzik-filmleri-izle/page/" to "Müzik", + "${mainUrl}/category/polisiye-filmleri-izle/page/" to "Polisiye", + "${mainUrl}/category/politik-filmleri-izle/page/" to "Politik", + "${mainUrl}/category/romantik-filmleri-izle/page/" to "Romantik", + "${mainUrl}/category/savas-filmleri-izle/page/" to "Savaş", + "${mainUrl}/category/spor-filmleri-izle/page/" to "Spor", + "${mainUrl}/category/suc-filmleri-izle/page/" to "Suç", + "${mainUrl}/category/tarih-filmleri-izle/page/" to "Tarih", + "${mainUrl}/category/yerli-filmleri-izle/page/" to "Yerli" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.movie-box").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("div.name a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("div.name a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("div.img img")?.attr("src")) + + return if (href.contains("/dizi/")) { + newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } else { + newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}?s=${query}").document + + return document.select("div.movie-box").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.film h1")?.text()?.trim() ?: document.selectFirst("h1.film")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("[property='og:image']")?.attr("content")) + val description = document.selectFirst("div.description")?.text()?.trim() + var tags = document.select("ul.post-categories a").map { it.text() } + val rating = document.selectFirst("div.imdb-count")?.text()?.trim()?.split(" ")?.first()?.toRatingInt() + val year = Regex("""(\d+)""").find(document.selectFirst("li.release")?.text()?.trim() ?: "")?.groupValues?.get(1)?.toIntOrNull() + val duration = Regex("""(\d+)""").find(document.selectFirst("li.time")?.text()?.trim() ?: "")?.groupValues?.get(1)?.toIntOrNull() + val recommendations = document.select("div.movie-box").mapNotNull { it.toSearchResult() } + val actors = document.select("[href*='oyuncular']").map { + Actor(it.text()) + } + + if (url.contains("/dizi/")) { + tags = document.select("div.category a").map { it.text() } + + val episodes = document.select("div.episode-box").mapNotNull { + val epHref = fixUrlNull(it.selectFirst("div.name a")?.attr("href")) ?: return@mapNotNull null + val ssnDetail = it.selectFirst("span.episodetitle")?.ownText()?.trim() ?: return@mapNotNull null + val epDetail = it.selectFirst("span.episodetitle b")?.ownText()?.trim() ?: return@mapNotNull null + val epName = "$ssnDetail - $epDetail" + val epSeason = ssnDetail.substringBefore(". ").toIntOrNull() + val epEpisode = epDetail.substringBefore(". ").toIntOrNull() + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + } + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + } + } + + private fun getIframe(sourceCode: String): String { + // val atobKey = Regex("""atob\("(.*)"\)""").find(sourceCode)?.groupValues?.get(1) ?: return "" + + // return Jsoup.parse(String(Base64.decode(atobKey))).selectFirst("iframe")?.attr("src") ?: "" + + val atob = Regex("""PHA\+[0-9a-zA-Z+/=]*""").find(sourceCode)?.value ?: return "" + + val padding = 4 - atob.length % 4 + val atobPadded = if (padding < 4) atob.padEnd(atob.length + padding, '=') else atob + + val iframe = Jsoup.parse(String(Base64.decode(atobPadded, Base64.DEFAULT), Charsets.UTF_8)) + + return fixUrlNull(iframe.selectFirst("iframe")?.attr("src")) ?: "" + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("KLT", "data » $data") + val document = app.get(data).document + val iframes = mutableSetOf<String>() + + val mainFrame = getIframe(document.html()) + iframes.add(mainFrame) + + document.select("div.parts-middle").forEach { + val alternatif = it.selectFirst("a")?.attr("href") + if (alternatif != null) { + val alternatifDocument = app.get(alternatif).document + val alternatifFrame = getIframe(alternatifDocument.html()) + iframes.add(alternatifFrame) + } + } + + for (iframe in iframes) { + Log.d("KLT", "iframe » $iframe") + if (iframe.contains("vidmoly")) { + val headers = mapOf( + "User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36", + "Sec-Fetch-Dest" to "iframe" + ) + val iSource = app.get(iframe, headers=headers, referer="${mainUrl}/").text + val m3uLink = Regex("""file:"([^"]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("m3u link not found") + + Log.d("Kekik_VidMoly", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = "VidMoly", + name = "VidMoly", + url = m3uLink, + referer = "https://vidmoly.to/", + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } else { + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + } + + return true + } +} diff --git a/KultFilmler/src/main/kotlin/com/keyiflerolsun/KultFilmlerPlugin.kt b/KultFilmler/src/main/kotlin/com/keyiflerolsun/KultFilmlerPlugin.kt new file mode 100644 index 0000000000..dbe7eaba65 --- /dev/null +++ b/KultFilmler/src/main/kotlin/com/keyiflerolsun/KultFilmlerPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class KultFilmlerPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(KultFilmler()) + registerExtractorAPI(YildizKisaFilm()) + } +} \ No newline at end of file diff --git a/KultFilmler/src/main/kotlin/com/keyiflerolsun/YildizKisaFilm.kt b/KultFilmler/src/main/kotlin/com/keyiflerolsun/YildizKisaFilm.kt new file mode 100644 index 0000000000..408d88e304 --- /dev/null +++ b/KultFilmler/src/main/kotlin/com/keyiflerolsun/YildizKisaFilm.kt @@ -0,0 +1,59 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class YildizKisaFilm : ExtractorApi() { + override val name = "YildizKisaFilm" + override val mainUrl = "https://yildizkisafilm.org" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val vidId = if (url.contains("video/")) { + url.substringAfter("video/") + } else { + url.substringAfter("?data=") + } + val postUrl = "${mainUrl}/player/index.php?data=${vidId}&do=getVideo" + Log.d("Kekik_${this.name}", "postUrl » $postUrl") + + val response = app.post( + postUrl, + data = mapOf( + "hash" to vidId, + "r" to extRef + ), + referer = extRef, + headers = mapOf( + "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", + "X-Requested-With" to "XMLHttpRequest" + ) + ) + + val videoResponse = response.parsedSafe<SystemResponse>() ?: throw ErrorLoadingException("failed to parse response") + val m3uLink = videoResponse.securedLink + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = extRef, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + + data class SystemResponse( + @JsonProperty("hls") val hls: String, + @JsonProperty("videoImage") val videoImage: String? = null, + @JsonProperty("videoSource") val videoSource: String, + @JsonProperty("securedLink") val securedLink: String + ) +} \ No newline at end of file diff --git a/KultFilmler/src/main/kotlin/com/keyiflerolsun/bakalim.py b/KultFilmler/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..4e4ed939b8 --- /dev/null +++ b/KultFilmler/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,41 @@ +# ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +from Kekik.cli import konsol +from cloudscraper import CloudScraper +from parsel import Selector +from re import findall +from base64 import b64decode + +def get_iframe(source_code): + atob = findall(r"""PHA\+[0-9a-zA-Z+\/=]*""", source_code)[0] + if padding_needed := len(atob) % 4: + atob += "=" * (4 - padding_needed) + + iframe = b64decode(atob).decode("utf-8") + return Selector(iframe).css("iframe::attr(src)").get() + +oturum = CloudScraper() +oturum.headers.update({"User-Agent":"Mozilla/5.0", "Referer":"https://kultfilmler.com/"}) + +film_link = "https://kultfilmler.com/perfume-the-story-of-a-murderer-koku-bir-katilin-hikayesi/" + +istek = oturum.get(film_link) +secici = Selector(istek.text) + +iframeler = [get_iframe(istek.text)] + +for bak in secici.css("div.parts-middle"): + alternatif_link = bak.css("a::attr(href)").get() + alternatif_istek = oturum.get(alternatif_link) + + iframeler.append(get_iframe(alternatif_istek.text)) + +konsol.print(iframeler) +for iframe in iframeler: + if "vidmoly" in iframe: + oturum.headers.update({ + "User-Agent" : "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36", + "Sec-Fetch-Dest" : "iframe" + }) + istek = oturum.get(f"https:{iframe}") + konsol.print(findall(r"file:\"([^\"]+)", istek.text)[0]) \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..f288702d2f --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/MiBox.md b/MiBox.md new file mode 100644 index 0000000000..bc778582e5 --- /dev/null +++ b/MiBox.md @@ -0,0 +1,45 @@ +# 📺 Google TV Temel Kurulum Adımları + +`Mi Box`, `Mi Stick`, `Fire Stick`, `Google TV`, `Android TV` vb. cihazların daha az yük altında çalışması için temiz kurulum adımları.. + +> [![Sonuc](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/Sonuc.png)](#) + +--- + +## 1. **Geliştirici seçenekleri**ni aktif edin. +> [![Gelistirici](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/Gelistirici.jpg)](#) + + +## 2. **Animasyon ölçekleri**ni 0.5'e düşürün. +> [![Animasyon](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/Animasyon.jpg)](#) + + +## 3. **USB Hata Ayıklaması**nı aktif edin. +> [![ADB](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/ADB.jpg)](#) + + +## 4. **Hesap Ayarları**ndan fragman otomatik oynatmayı kapatın, yalnızca uygulama modunu açın. +> [![Uygulama](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/Uygulama.jpg)](#) + + +## 5. Bilgisayarınıza _[ADB AppControl](https://adbappcontrol.com/en/#download)_ programını kurun ve TV'deki gereksiz uygulamaları kaldırın. +> [![AppControl](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/AppControl.jpg)](#) + + +## 6. **PlayStore**'dan gerekli uygulamaları kurun; +> - _[Cx Dosya Gezgini](https://play.google.com/store/apps/details?id=com.cxinventor.file.explorer)_ +> - _[Downloader by AFTVnews](https://play.google.com/store/apps/details?id=com.esaba.downloader)_ +> - _[Button Mapper: Remap your keys](https://play.google.com/store/apps/details?id=flar2.homebutton)_ + +> [![PlayStore](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/PlayStore.png)](#) + + +## 7. **Downloader** ile gerekli uygulamarı kurun +> - _[SmartTube](https://github.com/yuliskov/SmartTube)_ » `54794` +> - _[CloudStream](https://github.com/recloudstream/cloudstream)_ » `532423` + +> [![Downloader](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/MiBox/Downloader.png)](#) + + +## 8. **CloudStream**'e _[KekikAkademi deposunu ekleyin](https://github.com/keyiflerolsun/Kekik-cloudstream#-kurulum)_ +> [![KisaKod](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/KisaKod.png)](#) diff --git a/NetflixMirror/build.gradle.kts b/NetflixMirror/build.gradle.kts new file mode 100644 index 0000000000..0cdd568b62 --- /dev/null +++ b/NetflixMirror/build.gradle.kts @@ -0,0 +1,18 @@ +version = 8 + +cloudstream { + authors = listOf("Horis, megix", "keyiflerolsun") + language = "hi" + description = "Netflix, PrimeVideo Content in Multiple Languages" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries") + iconUrl = "https://iosmirror.cc/img/nf2/icon_x192.png" +} \ No newline at end of file diff --git a/NetflixMirror/src/main/AndroidManifest.xml b/NetflixMirror/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/NetflixMirror/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/NetflixMirror.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/NetflixMirror.kt new file mode 100644 index 0000000000..25cced5760 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/NetflixMirror.kt @@ -0,0 +1,252 @@ +// ! https://github.com/SaurabhKaperwan/CSX/blob/master/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/NetflixMirrorProvider.kt + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.keyiflerolsun.entities.EpisodesData +import com.keyiflerolsun.entities.PlayList +import com.keyiflerolsun.entities.PostData +import com.keyiflerolsun.entities.SearchData +import com.lagradost.cloudstream3.utils.AppUtils.toJson +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.httpsify +import com.lagradost.cloudstream3.utils.getQualityFromName +import okhttp3.Interceptor +import okhttp3.Response + +class NetflixMirror : MainAPI() { + override var mainUrl = "https://iosmirror.cc" + override var name = "NetflixMirror" + override val hasMainPage = true + override var lang = "hi" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) + + private var cookieValue = "" + private val headers = mapOf("X-Requested-With" to "XMLHttpRequest") + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + cookieValue = cookieValue.ifEmpty { bypassVerification(mainUrl) } + val cookies = mapOf( + "t_hash_t" to cookieValue, + "ott" to "nf", + "hd" to "on" + ) + + val allItems = listOf("movies", "series").flatMap { endpoint -> + app.get( + "${mainUrl}/${endpoint}", + cookies = cookies + ).document.select(".tray-container, #top10").map { + it.toHomePageList() + } + } + + return newHomePageResponse(allItems, false) + } + + private fun Element.toHomePageList(): HomePageList { + val name = select("h2, span").text() + if (name.contains("Tamil") || name.contains("Hindi") || name.contains("Indian")) { + return HomePageList("", emptyList()) + } + + val items = select("article, .top10-post").mapNotNull { + it.toSearchResult() + } + + return HomePageList(name, items) + } + + private fun Element.toSearchResult(): SearchResponse { + val id = selectFirst("a")?.attr("data-post") ?: attr("data-post") + val posterUrl = fixUrlNull(selectFirst(".card-img-container img, .top10-img img")?.attr("data-src")) + + return newMovieSearchResponse("", Id(id).toJson()) { + this.posterUrl = posterUrl + posterHeaders = mapOf("Referer" to "${mainUrl}/") + } + } + + override suspend fun search(query: String): List<SearchResponse> { + cookieValue = cookieValue.ifEmpty { bypassVerification(mainUrl) } + val cookies = mapOf( + "t_hash_t" to cookieValue, + "hd" to "on" + ) + + val url = "${mainUrl}/search.php?s=${query}&t=${APIHolder.unixTime}" + val data = app.get(url, referer = "${mainUrl}/", cookies = cookies).parsed<SearchData>() + + return data.searchResult.map { + newMovieSearchResponse(it.t, Id(it.id).toJson()) { + posterUrl = "https://img.nfmirrorcdn.top/poster/v/${it.id}.jpg" + posterHeaders = mapOf("Referer" to "${mainUrl}/") + } + } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse { + cookieValue = cookieValue.ifEmpty { bypassVerification(mainUrl) } + val id = parseJson<Id>(url).id + val cookies = mapOf( + "t_hash_t" to cookieValue, + "hd" to "on" + ) + + val data = app.get( + "${mainUrl}/post.php?id=${id}&t=${APIHolder.unixTime}", + headers, + referer = "${mainUrl}/", + cookies = cookies + ).parsed<PostData>() + + val episodes = arrayListOf<Episode>() + + val title = data.title + val castList = data.cast?.split(",")?.map { it.trim() } ?: emptyList() + val cast = castList.map {ActorData(Actor(it))} + val genre = listOf(data.ua.toString()) + (data.genre?.split(",")?.map { it.trim() }?.filter { it.isNotEmpty() } ?: emptyList()) + val rating = data.match?.replace("IMDb ", "")?.toRatingInt() + val runTime = convertRuntimeToMinutes(data.runtime.toString()) + + if (data.episodes.first() == null) { + episodes.add(newEpisode(LoadData(title, id)) {name = data.title}) + } else { + data.episodes.filterNotNull().mapTo(episodes) { + newEpisode(LoadData(title, it.id)) { + this.name = it.t + this.episode = it.ep.replace("E", "").toIntOrNull() + this.season = it.s.replace("S", "").toIntOrNull() + this.posterUrl = "https://img.nfmirrorcdn.top/epimg/150/${it.id}.jpg" + // this.runTime = it.time.replace("m", "").toIntOrNull() + } + } + + if (data.nextPageShow == 1) { + episodes.addAll(getEpisodes(title, url, data.nextPageSeason!!, 2)) + } + + data.season?.dropLast(1)?.amap { + episodes.addAll(getEpisodes(title, url, it.id, 1)) + } + } + + val type = if (data.episodes.first() == null) TvType.Movie else TvType.TvSeries + + return newTvSeriesLoadResponse(title, url, type, episodes) { + posterUrl = "https://img.nfmirrorcdn.top/poster/v/${id}.jpg" + backgroundPosterUrl = "https://img.nfmirrorcdn.top/poster/h/${id}.jpg" + posterHeaders = mapOf("Referer" to "${mainUrl}/") + plot = data.desc + year = data.year.toIntOrNull() + tags = genre + actors = cast + this.rating = rating + this.duration = runTime + this.recommendations = data.suggest?.map { + newMovieSearchResponse("", Id(it.id).toJson()) { + posterUrl = "https://img.nfmirrorcdn.top/poster/v/${it.id}.jpg" + posterHeaders = mapOf("Referer" to "${mainUrl}/") + } + } + } + } + + private suspend fun getEpisodes(title: String, eid: String, sid: String, page: Int): List<Episode> { + val episodes = arrayListOf<Episode>() + val cookies = mapOf( + "t_hash_t" to cookieValue, + "hd" to "on" + ) + var pg = page + + while (true) { + val data = app.get( + "${mainUrl}/episodes.php?s=${sid}&series=${eid}&t=${APIHolder.unixTime}&page=${pg}", + headers, + referer = "${mainUrl}/", + cookies = cookies + ).parsed<EpisodesData>() + data.episodes?.mapTo(episodes) { + newEpisode(LoadData(title, it.id)) { + name = it.t + episode = it.ep.replace("E", "").toIntOrNull() + season = it.s.replace("S", "").toIntOrNull() + this.posterUrl = "https://img.nfmirrorcdn.top/epimg/150/${it.id}.jpg" + // this.runTime = it.time.replace("m", "").toIntOrNull() + } + } + if (data.nextPageShow == 0) break + + pg++ + } + + return episodes + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("NTFX", "data » $data") + val (title, id) = parseJson<LoadData>(data) + val cookies = mapOf( + "t_hash_t" to cookieValue, + "hd" to "on" + ) + + val playlist = app.get( + "${mainUrl}/playlist.php?id=${id}&t=${title}&tm=${APIHolder.unixTime}", + headers, + referer = "${mainUrl}/", + cookies = cookies + ).parsed<PlayList>() + + playlist.forEach { item -> + item.sources.forEach { + callback.invoke( + ExtractorLink( + name, + it.label, + fixUrl(it.file), + "${mainUrl}/", + getQualityFromName(it.file.substringAfter("q=", "")), + true + ) + ) + } + + item.tracks?.filter { it.kind == "captions" }?.map { track -> + subtitleCallback.invoke( + SubtitleFile( + track.label.toString(), + httpsify(track.file.toString()) + ) + ) + } + } + + return true + } + + override fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor { + return object : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + if (request.url.toString().contains(".m3u8")) { + val newRequest = request.newBuilder().header("Cookie", "hd=on").build() + + return chain.proceed(newRequest) + } + + return chain.proceed(request) + } + } + } + + data class Id(val id: String) + + data class LoadData(val title: String, val id: String) +} \ No newline at end of file diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/NetflixMirrorPlugin.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/NetflixMirrorPlugin.kt new file mode 100644 index 0000000000..39780452fe --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/NetflixMirrorPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class NetflixMirrorPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(NetflixMirror()) + registerMainAPI(PrimeVideoMirror()) + } +} \ No newline at end of file diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/PrimeVideoMirror.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/PrimeVideoMirror.kt new file mode 100644 index 0000000000..f0ee977569 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/PrimeVideoMirror.kt @@ -0,0 +1,255 @@ +// ! https://github.com/SaurabhKaperwan/CSX/blob/master/NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/PrimeVideoMirrorProvider.kt + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.keyiflerolsun.entities.EpisodesData +import com.keyiflerolsun.entities.PlayList +import com.keyiflerolsun.entities.PostData +import com.keyiflerolsun.entities.SearchData +import com.lagradost.cloudstream3.utils.AppUtils.toJson +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.httpsify +import com.lagradost.cloudstream3.utils.getQualityFromName +import okhttp3.Interceptor +import okhttp3.Response + +class PrimeVideoMirror : MainAPI() { + override var mainUrl = "https://iosmirror.cc" + override var name = "PrimeVideoMirror" + override val hasMainPage = true + override var lang = "hi" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) + + private var cookieValue = "" + private val headers = mapOf("X-Requested-With" to "XMLHttpRequest") + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + cookieValue = cookieValue.ifEmpty { bypassVerification(mainUrl) } + val cookies = mapOf( + "t_hash_t" to cookieValue, + "ott" to "pv", + "hd" to "on" + ) + + val allItems = listOf("movies", "series").flatMap { endpoint -> + app.get( + "${mainUrl}/${endpoint}", + cookies = cookies + ).document.select(".tray-container, #top10").map { + it.toHomePageList() + } + } + + return newHomePageResponse(allItems, false) + } + + private fun Element.toHomePageList(): HomePageList { + val name = select("h2, span").text() + if (name.contains("Tamil") || name.contains("Hindi") || name.contains("Indian")) { + return HomePageList("", emptyList()) + } + + val items = select("article, .top10-post").mapNotNull { + it.toSearchResult() + } + + return HomePageList(name, items, isHorizontalImages = true) + } + + private fun Element.toSearchResult(): SearchResponse { + val id = selectFirst("a")?.attr("data-post") ?: attr("data-post") + val posterUrl = fixUrlNull(selectFirst(".card-img-container img, img.top10-img-1")?.attr("data-src")) + + return newMovieSearchResponse("", Id(id).toJson()) { + this.posterUrl = posterUrl + posterHeaders = mapOf("Referer" to "${mainUrl}/") + } + } + + override suspend fun search(query: String): List<SearchResponse> { + cookieValue = cookieValue.ifEmpty { bypassVerification(mainUrl) } + val cookies = mapOf( + "t_hash_t" to cookieValue, + "ott" to "pv", + "hd" to "on" + ) + + val url = "${mainUrl}/pv/search.php?s=${query}&t=${APIHolder.unixTime}" + val data = app.get(url, referer = "${mainUrl}/", cookies = cookies).parsed<SearchData>() + + return data.searchResult.map { + newMovieSearchResponse(it.t, Id(it.id).toJson()) { + posterUrl = "https://img.nfmirrorcdn.top/pv/900/${it.id}.jpg" + posterHeaders = mapOf("Referer" to "${mainUrl}/") + } + } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse { + cookieValue = cookieValue.ifEmpty { bypassVerification(mainUrl) } + val id = parseJson<Id>(url).id + val cookies = mapOf( + "t_hash_t" to cookieValue, + "ott" to "pv", + "hd" to "on" + ) + + val data = app.get( + "${mainUrl}/pv/post.php?id=${id}&t=${APIHolder.unixTime}", + headers, + referer = "${mainUrl}/", + cookies = cookies + ).parsed<PostData>() + + val episodes = arrayListOf<Episode>() + + val title = data.title + val castList = data.cast?.split(",")?.map { it.trim() } ?: emptyList() + val cast = castList.map {ActorData(Actor(it))} + val genre = listOf(data.ua.toString()) + (data.genre?.split(",")?.map { it.trim() }?.filter { it.isNotEmpty() } ?: emptyList()) + val rating = data.match?.replace("IMDb ", "")?.toRatingInt() + val runTime = convertRuntimeToMinutes(data.runtime.toString()) + + if (data.episodes.first() == null) { + episodes.add(newEpisode(LoadData(title, id)) {name = data.title}) + } else { + data.episodes.filterNotNull().mapTo(episodes) { + newEpisode(LoadData(title, it.id)) { + this.name = it.t + this.episode = it.ep.replace("E", "").toIntOrNull() + this.season = it.s.replace("S", "").toIntOrNull() + this.posterUrl = "https://img.nfmirrorcdn.top/pvepimg/${it.id}.jpg" + // this.runTime = it.time.replace("m", "").toIntOrNull() + } + } + + if (data.nextPageShow == 1) { + episodes.addAll(getEpisodes(title, url, data.nextPageSeason!!, 2)) + } + + data.season?.dropLast(1)?.amap { + episodes.addAll(getEpisodes(title, url, it.id, 1)) + } + } + + val type = if (data.episodes.first() == null) TvType.Movie else TvType.TvSeries + + return newTvSeriesLoadResponse(title, url, type, episodes) { + posterUrl = "https://img.nfmirrorcdn.top/pv/900/${id}.jpg" + posterHeaders = mapOf("Referer" to "${mainUrl}/") + plot = data.desc + year = data.year.toIntOrNull() + tags = genre + actors = cast + this.rating = rating + this.duration = runTime + this.recommendations = data.suggest?.map { + newMovieSearchResponse("", Id(it.id).toJson()) { + posterUrl = "https://img.nfmirrorcdn.top/pv/900/${it.id}.jpg" + posterHeaders = mapOf("Referer" to "${mainUrl}/") + } + } + } + } + + private suspend fun getEpisodes(title: String, eid: String, sid: String, page: Int): List<Episode> { + val episodes = arrayListOf<Episode>() + val cookies = mapOf( + "t_hash_t" to cookieValue, + "ott" to "pv", + "hd" to "on" + ) + var pg = page + + while (true) { + val data = app.get( + "${mainUrl}/pv/episodes.php?s=${sid}&series=${eid}&t=${APIHolder.unixTime}&page=${pg}", + headers, + referer = "${mainUrl}/", + cookies = cookies + ).parsed<EpisodesData>() + data.episodes?.mapTo(episodes) { + newEpisode(LoadData(title, it.id)) { + name = it.t + episode = it.ep.replace("E", "").toIntOrNull() + season = it.s.replace("S", "").toIntOrNull() + this.posterUrl = "https://img.nfmirrorcdn.top/pvepimg/${it.id}.jpg" + // this.runTime = it.time.replace("m", "").toIntOrNull() + } + } + if (data.nextPageShow == 0) break + + pg++ + } + + return episodes + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("PRM", "data » $data") + val (title, id) = parseJson<LoadData>(data) + val cookies = mapOf( + "t_hash_t" to cookieValue, + "ott" to "pv", + "hd" to "on" + ) + + val playlist = app.get( + "${mainUrl}/pv/playlist.php?id=${id}&t=${title}&tm=${APIHolder.unixTime}", + headers, + referer = "${mainUrl}/", + cookies = cookies + ).parsed<PlayList>() + + playlist.forEach { item -> + item.sources.forEach { + callback.invoke( + ExtractorLink( + name, + it.label, + fixUrl(it.file), + "${mainUrl}/", + getQualityFromName(it.file.substringAfter("q=", "")), + true + ) + ) + } + + item.tracks?.filter { it.kind == "captions" }?.map { track -> + subtitleCallback.invoke( + SubtitleFile( + track.label.toString(), + httpsify(track.file.toString()) + ) + ) + } + } + + return true + } + + override fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor { + return object : Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + if (request.url.toString().contains(".m3u8")) { + val newRequest = request.newBuilder().header("Cookie", "hd=on").build() + + return chain.proceed(newRequest) + } + + return chain.proceed(request) + } + } + } + + data class Id(val id: String) + + data class LoadData(val title: String, val id: String) +} \ No newline at end of file diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/Utils.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/Utils.kt new file mode 100644 index 0000000000..2bf0014ead --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/Utils.kt @@ -0,0 +1,97 @@ +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.USER_AGENT +import com.fasterxml.jackson.core.json.JsonReadFeature +import com.fasterxml.jackson.databind.DeserializationFeature +import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.lagradost.nicehttp.Requests +import com.lagradost.nicehttp.NiceResponse +import com.lagradost.nicehttp.ResponseParser +import kotlin.reflect.KClass +import okhttp3.FormBody +import kotlinx.coroutines.delay + +val jsonParser = object : ResponseParser { + val objectMapper: ObjectMapper = jacksonObjectMapper().configure( + DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false + ).configure( + JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true + ) + + override fun <T : Any> parse(text: String, kClass: KClass<T>): T { + return objectMapper.readValue(text, kClass.java) + } + + override fun <T : Any> parseSafe(text: String, kClass: KClass<T>): T? { + return try { + objectMapper.readValue(text, kClass.java) + } catch (exception: Exception) { + null + } + } + + override fun writeValueAsString(obj: Any): String { + return objectMapper.writeValueAsString(obj) + } +} + +val httpClient = Requests(responseParser = jsonParser).apply { + defaultHeaders = mapOf("User-Agent" to USER_AGENT) +} + +inline fun <reified T : Any> parseJson(text: String): T { + return jsonParser.parse(text, T::class) +} + +fun convertRuntimeToMinutes(runtimeText: String): Int { + var totalMinutes = 0 + val timeParts = runtimeText.split(" ") + + for (timePart in timeParts) { + when { + timePart.endsWith("h") -> { + val hours = timePart.removeSuffix("h").trim().toIntOrNull() ?: 0 + totalMinutes += hours * 60 + } + timePart.endsWith("m") -> { + val minutes = timePart.removeSuffix("m").trim().toIntOrNull() ?: 0 + totalMinutes += minutes + } + } + } + + return totalMinutes +} + +data class VerifyUrl( + val url: String +) + +suspend fun bypassVerification(mainUrl: String): String { + val homePageDocument = httpClient.get("${mainUrl}/home").document + val addHash = homePageDocument.select("body").attr("data-addhash") + + var verificationUrl = "https://raw.githubusercontent.com/SaurabhKaperwan/Utils/refs/heads/main/NF.json" + // https://userverify.netmirror.app/verify?dp1=###&a=y + + verificationUrl = httpClient.get(verificationUrl).parsed<VerifyUrl>().url.replace("###", addHash) + val hashDigits = addHash.filter { it.isDigit() } + val first16Digits = hashDigits.take(16) + Log.d("NFX", "Verification URL: ${verificationUrl}&t=0.${first16Digits}") + httpClient.get("${verificationUrl}&t=0.${first16Digits}") + + var verifyCheck: String + var verifyResponse: NiceResponse + + do { + delay(1000) + val requestBody = FormBody.Builder().add("verify", addHash).build() + verifyResponse = httpClient.post("${mainUrl}/verify2.php", requestBody = requestBody) + verifyCheck = verifyResponse.text + Log.d("NFX", "Verification Check: $verifyCheck") + } while (!verifyCheck.contains("\"statusup\":\"All Done\"")) + + return verifyResponse.cookies["t_hash_t"].orEmpty() +} diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Episode.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Episode.kt new file mode 100644 index 0000000000..405c1c664e --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Episode.kt @@ -0,0 +1,10 @@ +package com.keyiflerolsun.entities + +data class Episode( + val complate: String, + val ep: String, + val id: String, + val s: String, + val t: String, + val time: String +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/EpisodesData.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/EpisodesData.kt new file mode 100644 index 0000000000..249bc0149c --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/EpisodesData.kt @@ -0,0 +1,8 @@ +package com.keyiflerolsun.entities + +data class EpisodesData( + val episodes: List<Episode>?, + val nextPage: Int, + val nextPageSeason: String, + val nextPageShow: Int, +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PlayList.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PlayList.kt new file mode 100644 index 0000000000..c6bd88d5b9 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PlayList.kt @@ -0,0 +1,3 @@ +package com.keyiflerolsun.entities + +class PlayList : ArrayList<PlayListItem>() diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PlayListItem.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PlayListItem.kt new file mode 100644 index 0000000000..fd3f705b15 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PlayListItem.kt @@ -0,0 +1,8 @@ +package com.keyiflerolsun.entities + +data class PlayListItem( + val image: String, + val sources: List<Source>, + val tracks: List<Tracks>?, + val title: String +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PostData.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PostData.kt new file mode 100644 index 0000000000..b55d2b5095 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/PostData.kt @@ -0,0 +1,21 @@ +package com.keyiflerolsun.entities + +data class PostData( + val desc: String?, + val director: String?, + val ua: String?, + val episodes: List<Episode?>, + val genre: String?, + val nextPage: Int?, + val nextPageSeason: String?, + val nextPageShow: Int?, + val season: List<Season>?, + val title: String, + val year: String, + val cast: String?, + val match: String?, + val runtime: String?, + val suggest: List<Id>?, +) + +data class Id(val id: String) \ No newline at end of file diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/SearchData.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/SearchData.kt new file mode 100644 index 0000000000..30f0499ebc --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/SearchData.kt @@ -0,0 +1,7 @@ +package com.keyiflerolsun.entities + +data class SearchData( + val head: String, + val searchResult: List<SearchResult>, + val type: Int +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/SearchResult.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/SearchResult.kt new file mode 100644 index 0000000000..21892f1f42 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/SearchResult.kt @@ -0,0 +1,6 @@ +package com.keyiflerolsun.entities + +data class SearchResult( + val id: String, + val t: String +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Season.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Season.kt new file mode 100644 index 0000000000..ed04cd9e25 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Season.kt @@ -0,0 +1,8 @@ +package com.keyiflerolsun.entities + +data class Season( + val ep: String, + val id: String, + val s: String, + val sele: String +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Source.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Source.kt new file mode 100644 index 0000000000..460eb0d7d7 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Source.kt @@ -0,0 +1,7 @@ +package com.keyiflerolsun.entities + +data class Source( + val file: String, + val label: String, + val type: String +) diff --git a/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Tracks.kt b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Tracks.kt new file mode 100644 index 0000000000..3bbedbec89 --- /dev/null +++ b/NetflixMirror/src/main/kotlin/com/keyiflerolsun/entities/Tracks.kt @@ -0,0 +1,7 @@ +package com.keyiflerolsun.entities + +data class Tracks( + val kind: String?, + val file: String?, + val label: String?, +) diff --git a/OxAx/build.gradle.kts b/OxAx/build.gradle.kts new file mode 100644 index 0000000000..269adbc8d7 --- /dev/null +++ b/OxAx/build.gradle.kts @@ -0,0 +1,18 @@ +version = 1 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "ru" + description = "(VPN) ОХ-АХ.ТВ - сайт для просмотра взрослых ТВ онлайн без каких либо регистраций. Смотрите бесплатно на мобильных устройствах iPad, iPhone и Android." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("NSFW", "Live") + iconUrl = "https://cdn1.iconfinder.com/data/icons/nsfw-1/64/tv-adult-content-porn-512.png" +} \ No newline at end of file diff --git a/OxAx/src/main/AndroidManifest.xml b/OxAx/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/OxAx/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/OxAx/src/main/kotlin/com/keyiflerolsun/OxAx.kt b/OxAx/src/main/kotlin/com/keyiflerolsun/OxAx.kt new file mode 100644 index 0000000000..356c2edb38 --- /dev/null +++ b/OxAx/src/main/kotlin/com/keyiflerolsun/OxAx.kt @@ -0,0 +1,84 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +class OxAx : MainAPI() { + override var mainUrl = "https://ythls.kekikakademi.org/oxax/cs3" + override var name = "OxAx" + override val hasMainPage = true + override var lang = "ru" + override val hasQuickSearch = true + override val hasDownloadSupport = false + override val supportedTypes = setOf(TvType.NSFW, TvType.Live) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/hd" to "HD", + "${mainUrl}/porno" to "Porno", + "${mainUrl}/erotic" to "Erotic TV" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val channels = app.get(request.data).parsedSafe<KekikAPI>()!!.channels.map { channel -> + newLiveSearchResponse(channel.detail.title, "http://oxax.tv/${channel.slug}.html", TvType.Live) { + this.posterUrl = channel.detail.img + this.lang = "RU" + } + } + + return newHomePageResponse( + HomePageList(request.name, channels, isHorizontalImages = true), + hasNext = false + ) + } + + override suspend fun search(query: String): List<SearchResponse> { + return app.get("${mainUrl}/search/${query}").parsedSafe<KekikAPI>()!!.channels.map { channel -> + newLiveSearchResponse(channel.detail.title, "http://oxax.tv/${channel.slug}.html", TvType.Live) { + this.posterUrl = channel.detail.img + this.lang = "RU" + } + } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse { + val slug = url.split("/").last().substringBefore(".html") + val detail = app.get("${mainUrl}/detail/${slug}").parsedSafe<Detail>()!! + + return newLiveStreamLoadResponse(detail.title, url, url) { + this.posterUrl = detail.img + this.plot = "⚠️🔞🔞🔞 » ${detail.title} « 🔞🔞🔞⚠️" + this.tags = detail.tags + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("XOX", "data » $data") + + loadExtractor(data, "${mainUrl}/", subtitleCallback, callback) + + return true + } + + data class KekikAPI( + @JsonProperty("channels") val channels: List<Channel> = arrayListOf(), + ) + + data class Channel( + @JsonProperty("slug") val slug: String = "", + @JsonProperty("detail") val detail: Detail = Detail() + ) + + data class Detail( + @JsonProperty("title") val title: String = "", + @JsonProperty("img") val img: String = "", + @JsonProperty("tags") val tags: List<String> = arrayListOf() + ) +} \ No newline at end of file diff --git a/OxAx/src/main/kotlin/com/keyiflerolsun/OxAxExtractor.kt b/OxAx/src/main/kotlin/com/keyiflerolsun/OxAxExtractor.kt new file mode 100644 index 0000000000..50f8a24b82 --- /dev/null +++ b/OxAx/src/main/kotlin/com/keyiflerolsun/OxAxExtractor.kt @@ -0,0 +1,81 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Base64 +import android.util.Log +import com.lagradost.cloudstream3.ErrorLoadingException +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 +import com.lagradost.cloudstream3.utils.StringUtils.decodeUri +import com.lagradost.cloudstream3.utils.StringUtils.encodeUri + +class OxAxPlayer : ExtractorApi() { + override var name = "OxAxPlayer" + override var mainUrl = "http://oxax.tv" + override val requiresReferer = true + + private fun base64Encode(str: String): String { + return Base64.encodeToString(str.encodeUri().toByteArray(), Base64.DEFAULT) + } + + private fun base64Decode(str: String): String { + return String(Base64.decode(str, Base64.DEFAULT), Charsets.UTF_8).decodeUri() + } + + private fun decodeAtob(base64Str: String): String { + val b64Keys = mapOf( + 0 to "556G3", + 1 to "556G3D", + 2 to "556G3DQ", + 3 to "556G3DQ1", + 4 to "556G3DQ1V" + ) + + val fileSeparator = "F" + + var cleanb64 = base64Str.substring(2) + for (i in 4 downTo 0) { + val key = b64Keys[i] + if (key != null) { + cleanb64 = cleanb64.replace(fileSeparator + base64Encode(key), "") + } + } + + return try { + base64Decode(cleanb64) + } catch (e: Exception) { + "" + } + } + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val m3uLink:String? + val extRef = referer ?: "" + val iSource = app.get(url, referer=extRef).text + + val kodk = Regex("""var kodk="(.*?)"""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("kodk not found") + val kos = Regex("""var kos="(.*?)"""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("kos not found") + val playerjs = Regex("""new Playerjs\("(.*?)"""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("playerjs not found") + + val decodedData = decodeAtob(playerjs) + val (v1, v2) = Regex("""\{v1\}(.*?)\{v2\}([a-zA-Z0-9]*)""").find(decodedData)?.destructured ?: throw ErrorLoadingException("v1 and v2 not found in decoded data") + + m3uLink = "${kodk}${v1}${kos}${v2}" + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/OxAx/src/main/kotlin/com/keyiflerolsun/OxAxPlugin.kt b/OxAx/src/main/kotlin/com/keyiflerolsun/OxAxPlugin.kt new file mode 100644 index 0000000000..6ecc97d2d8 --- /dev/null +++ b/OxAx/src/main/kotlin/com/keyiflerolsun/OxAxPlugin.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class OxAxPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(OxAx()) + registerExtractorAPI(OxAxPlayer()) + } +} \ No newline at end of file diff --git a/PornHub/build.gradle.kts b/PornHub/build.gradle.kts new file mode 100644 index 0000000000..231759757e --- /dev/null +++ b/PornHub/build.gradle.kts @@ -0,0 +1,18 @@ +version = 1 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "en" + description = "(VPN) Pornhub is the world’s leading free porn site. Choose from millions of hardcore videos that stream quickly and in high quality, including amazing VR Porn. The largest adult site on the Internet just keeps getting better. We have more pornstars and real amateurs than anyone else. It’s fast, it’s free, it’s Pornhub!" + + /** + * 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=pornhub.com&sz=%size%" +} diff --git a/PornHub/src/main/AndroidManifest.xml b/PornHub/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/PornHub/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/PornHub/src/main/kotlin/com/keyiflerolsun/PornHub.kt b/PornHub/src/main/kotlin/com/keyiflerolsun/PornHub.kt new file mode 100644 index 0000000000..a2e5b5f293 --- /dev/null +++ b/PornHub/src/main/kotlin/com/keyiflerolsun/PornHub.kt @@ -0,0 +1,116 @@ +// ! https://github.com/Jacekun/cs3xxx-repo/blob/main/Pornhub/src/main/kotlin/com/jacekun/Pornhub.kt + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class PornHub : MainAPI() { + override var mainUrl = "https://www.pornhub.com" + override var name = "PornHub" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.NSFW) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/video?o=mr&hd=1&page=" to "Recently Featured", + "${mainUrl}/video?o=tr&t=w&hd=1&page=" to "Top Rated", + "${mainUrl}/video?o=mv&t=w&hd=1&page=" to "Most Viewed", + "${mainUrl}/video?o=ht&t=w&hd=1&page=" to "Hottest", + "${mainUrl}/video?p=professional&hd=1&page=" to "Professional", + "${mainUrl}/video?o=lg&hd=1&page=" to "Longest", + "${mainUrl}/video?p=homemade&hd=1&page=" to "Homemade", + "${mainUrl}/video?o=cm&t=w&hd=1&page=" to "Newest", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data + page).document + val home = document.select("li.pcVideoListItem").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("a")?.attr("title") ?: return null + val link = this.selectFirst("a")?.attr("href") ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img.thumb")?.attr("src")) + + return newMovieSearchResponse(title, link, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/video/search?search=${query}").document + + return document.select("li.pcVideoListItem").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1.title span[class='inlineFree']")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.mainPlayerDiv img")?.attr("src")) + val year = Regex("""uploadDate": "(\d+)""").find(document.html())?.groupValues?.get(1)?.toIntOrNull() + val tags = document.select("div.categoriesWrapper a[data-label='Category']").map { it.text().trim().replace(", ","") } + val rating = document.selectFirst("span.percent")?.text()?.first()?.toString()?.toRatingInt() + val duration = Regex("duration' : '(.*)',").find(document.html())?.groupValues?.get(1)?.toIntOrNull() + val actors = document.select("div.pornstarsWrapper a[data-label='Pornstar']").mapNotNull { + Actor(it.text().trim(), it.select("img").attr("src")) + } + + val recommendations = document.selectXpath("//a[contains(@class, 'img')]").mapNotNull { + val recName = it.attr("title").trim() + val recHref = fixUrlNull(it.attr("href")) ?: return@mapNotNull null + val recPosterUrl = fixUrlNull(it.selectFirst("img")?.attr("src")) + newMovieSearchResponse(recName, recHref, TvType.NSFW) { + this.posterUrl = recPosterUrl + } + } + + return newMovieLoadResponse(title, url, TvType.NSFW, url) { + this.posterUrl = poster + this.year = year + this.plot = title + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("PHub", "url » $data") + val source = app.get(data).text + val extractedValue = Regex("""([^"]*master.m3u8?.[^"]*)""").find(source)?.groups?.last()?.value ?: return false + val m3uLink = extractedValue.replace("\\", "") + Log.d("PHub", "extractedValue » $extractedValue") + Log.d("PHub", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + + return true + } +} \ No newline at end of file diff --git a/PornHub/src/main/kotlin/com/keyiflerolsun/PornHubPlugin.kt b/PornHub/src/main/kotlin/com/keyiflerolsun/PornHubPlugin.kt new file mode 100644 index 0000000000..ae2b9d53c5 --- /dev/null +++ b/PornHub/src/main/kotlin/com/keyiflerolsun/PornHubPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class PornHubPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(PornHub()) + } +} \ No newline at end of file diff --git a/README.md b/README.md index 403b4f1069..18133fdfcc 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,70 @@ -**⚠️ This is currently under development, dont use it yet if you're not comfortable with constantly merging new changes** +# ☁️ CloudStream için Türkçe Eklentiler -# `Cloudstream3 Plugin Repo Template` +[![Boyut](https://img.shields.io/github/repo-size/keyiflerolsun/Kekik-cloudstream?logo=git&logoColor=white&label=Boyut)](#) +[![Görüntülenme](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https://github.com/keyiflerolsun/Kekik-cloudstream&title=Görüntülenme)](#) +<a href="https://KekikAkademi.org/Kahve" target="_blank"><img src="https://img.shields.io/badge/☕️-Kahve Ismarla-ffdd00" title="☕️ Kahve Ismarla" style="padding-left:5px;"></a> -Template for a [Cloudstream3](https://github.com/recloudstream) plugin repo +[![CloudStream Derleyici](https://img.shields.io/github/actions/workflow/status/keyiflerolsun/Kekik-cloudstream/Derleyici.yml?label=CloudStream%20Derleyici&logo=github)](https://github.com/keyiflerolsun/Kekik-cloudstream/actions/workflows/Derleyici.yml) -**⚠️ Make sure you check "Include all branches" when using this template** +_CloudStream için Türkçe yayın yapan sitelere ait eklentiler.._ - -## Getting started with writing your first plugin +_Kullanabilmek için kendiniz derlemelisiniz.._ -This template includes 1 example plugin. +[Döküman](https://recloudstream.github.io/csdocs/) **━** [Resmi Site](https://dweb.link/ipns/cloudstream.on.fleek.co/) **━** [Wiki](https://cloudstream.miraheze.org/wiki/Main_Page) -1. Open the root build.gradle.kts, read the comments and replace all the placeholders -2. Familiarize yourself with the project structure. Most files are commented -3. Build or deploy your first plugin using: - - Windows: `.\gradlew.bat ExampleProvider:make` or `.\gradlew.bat ExampleProvider:deployWithAdb` - - Linux & Mac: `./gradlew ExampleProvider:make` or `./gradlew ExampleProvider:deployWithAdb` +[![ForTheBadge made-with-kotlin](https://ForTheBadge.com/images/badges/made-with-kotlin.svg)](https://kotlinlang.org/) +[![ForTheBadge built-with-love](https://ForTheBadge.com/images/badges/built-with-love.svg)](https://GitHub.com/keyiflerolsun/) -## License +## 💾 Kurulum -Everything in this repo is released into the public domain. You may use it however you want with no conditions whatsoever +1. **[cloudstream/pre-release](https://github.com/recloudstream/cloudstream/releases/tag/pre-release)** _Adresinden güncel APK dosyasını indirip kurun._ +2. **Uygulamanın yüklü olduğu cihazda** _[depoyu otomatik yüklemek için tıklayın](https://keyiflerolsun.me/http-protocol-redirector?r=cloudstreamrepo://raw.githubusercontent.com/keyiflerolsun/Kekik-cloudstream/master/repo.json)_ + - **veya** + - `Depo ekle` _butonuyla **manuel** ekleme yapmak isteyen arkadaşlar için_ `KekikAkademi` _**kısa kod**u mevcuttur._ `Depo ismi` _kısmını boş bırakarak_ `Depo URL'si` _kısmına_ `KekikAkademi` yazarak `Depo ekle` _demeniz yeterli.._ -## Attribution +## 📼 Video Anlatım -This template as well as the gradle plugin and the whole plugin system is **heavily** based on [Aliucord](https://github.com/Aliucord). -*Go use it, it's a great mobile discord client mod!* +[![Video](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/KisaKod.png?raw=True)](https://t.me/KekikAkademi/1773) + +--- + +### 📺 » [Google TV Temel Kurulum Adımları](https://keyiflerolsun.me/Kekik-cloudstream/MiBox) + +--- + +## 📱 Repo İçeriği + +[![Repo](https://github.com/keyiflerolsun/Kekik-cloudstream/raw/master/.github/icons/Repo.jpg?raw=True)](https://raw.githubusercontent.com/keyiflerolsun/Kekik-cloudstream/master/repo.json) + +--- + +### 🎁 Teşekkürler + +- [recloudstream/cloudstream](https://github.com/recloudstream/cloudstream) +- [hexated/cloudstream-extensions-hexated](https://github.com/hexated/cloudstream-extensions-hexated) +- [Jacekun/cs3xxx-repo](https://github.com/Jacekun/cs3xxx-repo) +- [recloudstream/extensions](https://github.com/recloudstream/extensions) + +--- + +## 🌐 Telif Hakkı ve Lisans + +* *Copyright (C) 2023 by* [keyiflerolsun](https://github.com/keyiflerolsun) ❤️️ +* [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007](https://github.com/keyiflerolsun/Kekik-cloudstream/blob/master/LICENSE) *Koşullarına göre lisanslanmıştır..* + +## ♻️ İletişim + +*Bizimle iletişime geçmek isterseniz, **Telegram**'dan mesaj göndermekten çekinmeyin;* [@KekikKahve](https://t.me/KekikKahve) + +## 💸 Bağış Yap + +**[☕️ Kahve Ismarla](https://KekikAkademi.org/Kahve)** + +## 💻 Katkı Sağlayanlar +<a href="https://github.com/keyiflerolsun/Kekik-cloudstream/graphs/contributors?selectedMetric=additions" target="_blank"> + <img src="https://stg.contrib.rocks/image?repo=keyiflerolsun/Kekik-cloudstream" /> +</a> + +*** + +> **[@KekikAkademi](https://t.me/KekikAkademi)** *için yazılmıştır..* diff --git a/RareFilmm/build.gradle.kts b/RareFilmm/build.gradle.kts new file mode 100644 index 0000000000..d86c33330b --- /dev/null +++ b/RareFilmm/build.gradle.kts @@ -0,0 +1,18 @@ +version = 1 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "en" + description = "The Cave of Forgotten Films" + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=rarefilmm.com&sz=%size%" +} \ No newline at end of file diff --git a/RareFilmm/src/main/AndroidManifest.xml b/RareFilmm/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/RareFilmm/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/RareFilmm/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt b/RareFilmm/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt new file mode 100644 index 0000000000..dbbb9c7e88 --- /dev/null +++ b/RareFilmm/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt @@ -0,0 +1,60 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class Odnoklassniki : ExtractorApi() { + override val name = "Odnoklassniki" + override val mainUrl = "https://odnoklassniki.ru" + override val requiresReferer = false + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + Log.d("Kekik_${this.name}", "url » $url") + + val userAgent = mapOf("User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36") + + val videoReq = app.get(url, headers=userAgent).text.replace("\\"", "\"").replace("\\\\", "\\") + .replace(Regex("\\\\u([0-9A-Fa-f]{4})")) { matchResult -> + Integer.parseInt(matchResult.groupValues[1], 16).toChar().toString() + } + val videosStr = Regex(""""videos":(\[[^]]*])""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("Video not found") + val videos = AppUtils.tryParseJson<List<OkRuVideo>>(videosStr) ?: throw ErrorLoadingException("Video not found") + + for (video in videos) { + Log.d("Kekik_${this.name}", "video » $video") + + val videoUrl = if (video.url.startsWith("//")) "https:${video.url}" else video.url + + val quality = video.name.uppercase() + .replace("MOBILE", "144p") + .replace("LOWEST", "240p") + .replace("LOW", "360p") + .replace("SD", "480p") + .replace("HD", "720p") + .replace("FULL", "1080p") + .replace("QUAD", "1440p") + .replace("ULTRA", "4k") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = videoUrl, + referer = url, + quality = getQualityFromName(quality), + headers = userAgent, + isM3u8 = false + ) + ) + } + } + + data class OkRuVideo( + @JsonProperty("name") val name: String, + @JsonProperty("url") val url: String, + ) +} \ No newline at end of file diff --git a/RareFilmm/src/main/kotlin/com/keyiflerolsun/OkRuExtractor.kt b/RareFilmm/src/main/kotlin/com/keyiflerolsun/OkRuExtractor.kt new file mode 100644 index 0000000000..61f55502b0 --- /dev/null +++ b/RareFilmm/src/main/kotlin/com/keyiflerolsun/OkRuExtractor.kt @@ -0,0 +1,13 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +class OkRuSSL : Odnoklassniki() { + override var name = "OkRuSSL" + override var mainUrl = "https://ok.ru" +} + +class OkRuHTTP : Odnoklassniki() { + override var name = "OkRuHTTP" + override var mainUrl = "http://ok.ru" +} \ No newline at end of file diff --git a/RareFilmm/src/main/kotlin/com/keyiflerolsun/RareFilmm.kt b/RareFilmm/src/main/kotlin/com/keyiflerolsun/RareFilmm.kt new file mode 100644 index 0000000000..8baf29e450 --- /dev/null +++ b/RareFilmm/src/main/kotlin/com/keyiflerolsun/RareFilmm.kt @@ -0,0 +1,91 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class RareFilmm : MainAPI() { + override var mainUrl = "https://rarefilmm.com" + override var name = "RareFilmm" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/page/" to "LATESTS", + "${mainUrl}/category/action/page/" to "ACTION", + "${mainUrl}/category/adventure/page/" to "ADVENTURE", + "${mainUrl}/category/animation/page/" to "ANIMATION", + "${mainUrl}/category/camp/page/" to "CAMP", + "${mainUrl}/category/comedy/page/" to "COMEDY", + "${mainUrl}/category/documentary/page/" to "DOCUMENTARY", + "${mainUrl}/category/drama/page/" to "DRAMA", + "${mainUrl}/category/erotic/page/" to "EROTIC", + "${mainUrl}/category/family/page/" to "FAMILY", + "${mainUrl}/category/fantasy/page/" to "FANTASY", + "${mainUrl}/category/mystery/page/" to "MYSTERY", + "${mainUrl}/category/theatre/page/" to "THEATRE", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.post").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("h2 a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("h2 a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("div.featured-image")?.attr("style")?.substringAfter("url(")?.substringBefore(")")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}?s=${query}").document + + return document.select("div.post").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + 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.featured-image")?.attr("style")?.substringAfter("url(")?.substringBefore(")")) + val description = document.selectFirst("div.entry-content p")?.text()?.trim() + val tags = document.select("div.entry-tags a").map { it.text() } + val rating = document.selectFirst("span.js-rmp-avg-rating")?.text()?.trim()?.toRatingInt() + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.tags = tags + this.rating = rating + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("RRF", "data » $data") + val document = app.get(data).document + val iframe = fixUrlNull(document.selectFirst("article iframe")?.attr("src")) ?: return false + Log.d("RRF", "iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + + return true + } +} \ No newline at end of file diff --git a/RareFilmm/src/main/kotlin/com/keyiflerolsun/RareFilmmPlugin.kt b/RareFilmm/src/main/kotlin/com/keyiflerolsun/RareFilmmPlugin.kt new file mode 100644 index 0000000000..05489488dc --- /dev/null +++ b/RareFilmm/src/main/kotlin/com/keyiflerolsun/RareFilmmPlugin.kt @@ -0,0 +1,15 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class RareFilmmPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(RareFilmm()) + registerExtractorAPI(Odnoklassniki()) + registerExtractorAPI(OkRuSSL()) + registerExtractorAPI(OkRuHTTP()) + } +} \ No newline at end of file diff --git a/RecTV/build.gradle.kts b/RecTV/build.gradle.kts new file mode 100644 index 0000000000..bc852fd159 --- /dev/null +++ b/RecTV/build.gradle.kts @@ -0,0 +1,18 @@ +version = 65 + +cloudstream { + authors = listOf("keyiflerolsun", "yusiqo", "inatchii", "JustRelaxable") + language = "tr" + description = "RecTv APK, Türkiye’deki en popüler Çevrimiçi Medya Akış platformlarından biridir. Filmlerin, Canlı Sporların, Web Dizilerinin ve çok daha fazlasının keyfini ücretsiz çıkarın." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "Live", "TvSeries") + iconUrl = "https://rectvapk.cc/wp-content/uploads/2023/02/Rec-TV.webp" +} \ No newline at end of file diff --git a/RecTV/src/main/AndroidManifest.xml b/RecTV/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/RecTV/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/RecTV/src/main/kotlin/com/keyiflerolsun/RecTV.kt b/RecTV/src/main/kotlin/com/keyiflerolsun/RecTV.kt new file mode 100644 index 0000000000..a5cff577a9 --- /dev/null +++ b/RecTV/src/main/kotlin/com/keyiflerolsun/RecTV.kt @@ -0,0 +1,191 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. +// ! https://github.com/Amiqo09/Diziyou-Cloudstream + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import okhttp3.Interceptor + +class RecTV : MainAPI() { + override var mainUrl = "https://b.prectv38.sbs" + override var name = "RecTV" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.Live, TvType.TvSeries) + + private val swKey = "4F5A9C3D9A86FA54EACEDDD635185/c3c5bd17-e37b-4b94-a944-8a3688a30452" + + override val mainPage = mainPageOf( + "${mainUrl}/api/channel/by/filtres/0/0/SAYFA/${swKey}/" to "Canlı", + "${mainUrl}/api/movie/by/filtres/0/created/SAYFA/${swKey}/" to "Son Filmler", + "${mainUrl}/api/serie/by/filtres/0/created/SAYFA/${swKey}/" to "Son Diziler", + "${mainUrl}/api/movie/by/filtres/14/created/SAYFA/${swKey}/" to "Aile", + "${mainUrl}/api/movie/by/filtres/1/created/SAYFA/${swKey}/" to "Aksiyon", + "${mainUrl}/api/movie/by/filtres/13/created/SAYFA/${swKey}/" to "Animasyon", + "${mainUrl}/api/movie/by/filtres/19/created/SAYFA/${swKey}/" to "Belgesel", + "${mainUrl}/api/movie/by/filtres/4/created/SAYFA/${swKey}/" to "Bilim Kurgu", + "${mainUrl}/api/movie/by/filtres/2/created/SAYFA/${swKey}/" to "Dram", + "${mainUrl}/api/movie/by/filtres/10/created/SAYFA/${swKey}/" to "Fantastik", + "${mainUrl}/api/movie/by/filtres/3/created/SAYFA/${swKey}/" to "Komedi", + "${mainUrl}/api/movie/by/filtres/8/created/SAYFA/${swKey}/" to "Korku", + "${mainUrl}/api/movie/by/filtres/17/created/SAYFA/${swKey}/" to "Macera", + "${mainUrl}/api/movie/by/filtres/5/created/SAYFA/${swKey}/" to "Romantik" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + @Suppress("NAME_SHADOWING") val page = page - 1 + + val url = request.data.replace("SAYFA", "$page") + val home = app.get(url, headers=mapOf("user-agent" to "okhttp/4.12.0")) + + val movies = AppUtils.tryParseJson<List<RecItem>>(home.text)!!.map { item -> + val toDict = jacksonObjectMapper().writeValueAsString(item) + + if (item.label != "CANLI" && item.label != "Canlı") { + newMovieSearchResponse(item.title, toDict, TvType.Movie) { this.posterUrl = item.image } + } else { + newLiveSearchResponse(item.title, toDict, TvType.Live) { + this.posterUrl = item.image + } + } + } + + return newHomePageResponse(request.name, movies) + } + + override suspend fun search(query: String): List<SearchResponse> { + val home = app.get( + "${mainUrl}/api/search/${query}/${swKey}/", + headers = mapOf("user-agent" to "okhttp/4.12.0") + ) + val veriler = AppUtils.tryParseJson<RecSearch>(home.text) + + val sonuclar = mutableListOf<SearchResponse>() + + veriler?.channels?.let { channels -> + for (item in channels) { + val toDict = jacksonObjectMapper().writeValueAsString(item) + + sonuclar.add(newMovieSearchResponse(item.title, toDict, TvType.Movie) { this.posterUrl = item.image }) + } + } + + veriler?.posters?.let { posters -> + for (item in posters) { + val toDict = jacksonObjectMapper().writeValueAsString(item) + + sonuclar.add(newMovieSearchResponse(item.title, toDict, TvType.Movie) { this.posterUrl = item.image }) + } + } + + return sonuclar + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val veri = AppUtils.tryParseJson<RecItem>(url) ?: return null + + if (veri.type == "serie") { + val diziReq = app.get( + "${mainUrl}/api/season/by/serie/${veri.id}/${swKey}/", + headers = mapOf("user-agent" to "okhttp/4.12.0") + ) + val sezonlar = AppUtils.tryParseJson<List<RecDizi>>(diziReq.text) ?: return null + + val episodes = mutableMapOf<DubStatus,MutableList<Episode>>() + + val numberRegex = Regex("\\d+") + + for (sezon in sezonlar) { + val seasonDubStatus = if(sezon.title.contains("altyazı",ignoreCase = true)) DubStatus.Subbed else if(sezon.title.contains("dublaj",ignoreCase = true)) DubStatus.Dubbed else DubStatus.None + for (bolum in sezon.episodes) { + episodes.getOrPut(seasonDubStatus) { mutableListOf() }.add(newEpisode(bolum.sources.first().url) { + this.name = bolum.title + this.season = numberRegex.find(sezon.title)?.value?.toIntOrNull() + this.episode = numberRegex.find(bolum.title)?.value?.toIntOrNull() + this.description = sezon.title.substringAfter(".S ") + this.posterUrl = veri.image + }) + } + } + + return newAnimeLoadResponse(name = veri.title, url = url, type = TvType.TvSeries, comingSoonIfNone = false){ + this.episodes = episodes.mapValues { it.value.toList() }.toMutableMap() + this.posterUrl = veri.image + this.plot = veri.description + this.year = veri.year + this.tags = veri.genres?.map { it.title } + this.rating = "${veri.rating}".toRatingInt() + } + } + + return if (veri.label != "CANLI" && veri.label != "Canlı") { + newMovieLoadResponse(veri.title, url, TvType.Movie, url) { + this.posterUrl = veri.image + this.plot = veri.description + this.year = veri.year + this.tags = veri.genres?.map { it.title } + this.rating = "${veri.rating}".toRatingInt() + } + } else { + newLiveStreamLoadResponse(veri.title, url, url) { + this.posterUrl = veri.image + this.plot = veri.description + this.tags = veri.genres?.map { it.title } + } + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + if (data.startsWith("http")) { + Log.d("RCTV", "data » $data") + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = data, + referer = "https://twitter.com/", + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + return true + } + + val veri = AppUtils.tryParseJson<RecItem>(data) ?: return false + + for (source in veri.sources) { + Log.d("RCTV", "source » $source") + callback.invoke( + ExtractorLink( + source = this.name, + name = "${this.name} - ${source.type}", + url = source.url, + referer = "https://twitter.com/", + quality = Qualities.Unknown.value, + type = if (source.type == "mp4") ExtractorLinkType.VIDEO else ExtractorLinkType.M3U8 + ) + ) + } + + return true + } + + override fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor { + val interceptor = Interceptor { chain -> + val originalRequest = chain.request() + val modifiedRequest = originalRequest.newBuilder() + .removeHeader("If-None-Match") + .header("User-Agent", "googleusercontent") + .build() + chain.proceed(modifiedRequest) + } + return interceptor + } +} + diff --git a/RecTV/src/main/kotlin/com/keyiflerolsun/RecTVModels.kt b/RecTV/src/main/kotlin/com/keyiflerolsun/RecTVModels.kt new file mode 100644 index 0000000000..d6d032853d --- /dev/null +++ b/RecTV/src/main/kotlin/com/keyiflerolsun/RecTVModels.kt @@ -0,0 +1,56 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + +data class RecItem( + @JsonProperty("id") val id: Int, + @JsonProperty("type") val type: String?, + @JsonProperty("title") val title: String, + @JsonProperty("label") val label: String?, + @JsonProperty("sublabel") val sublabel: String?, + @JsonProperty("description") val description: String?, + @JsonProperty("year") val year: Int?, + @JsonProperty("imdb") val imdb: Int?, + @JsonProperty("rating") val rating: Float?, + @JsonProperty("duration") val duration: String?, + @JsonProperty("image") val image: String, + @JsonProperty("genres") val genres: List<Genre>?, + @JsonProperty("trailer") val trailer: Trailer?, + @JsonProperty("sources") val sources: List<Source> +) + +data class Genre( + @JsonProperty("id") val id: Int, + @JsonProperty("title") val title: String +) + +data class Trailer( + @JsonProperty("id") val id: Int, + @JsonProperty("type") val type: String, + @JsonProperty("url") val url: String +) + +data class Source( + @JsonProperty("id") val id:Int, + @JsonProperty("type") val type:String, + @JsonProperty("url") val url:String +) + +data class RecSearch( + @JsonProperty("channels") val channels:List<RecItem>? = emptyList(), + @JsonProperty("posters") val posters:List<RecItem>? = emptyList(), +) + +data class RecDizi( + @JsonProperty("id") val id:Int, + @JsonProperty("title") val title:String, + @JsonProperty("episodes") val episodes:List<RecEpisode>, +) + +data class RecEpisode( + @JsonProperty("id") val id:Int, + @JsonProperty("title") val title:String, + @JsonProperty("sources") val sources: List<Source> +) \ No newline at end of file diff --git a/RecTV/src/main/kotlin/com/keyiflerolsun/RecTVPlugin.kt b/RecTV/src/main/kotlin/com/keyiflerolsun/RecTVPlugin.kt new file mode 100644 index 0000000000..daf62a8224 --- /dev/null +++ b/RecTV/src/main/kotlin/com/keyiflerolsun/RecTVPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class RecTVPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(RecTV()) + } +} \ No newline at end of file diff --git a/SetFilmIzle/build.gradle.kts b/SetFilmIzle/build.gradle.kts new file mode 100644 index 0000000000..585905fe9a --- /dev/null +++ b/SetFilmIzle/build.gradle.kts @@ -0,0 +1,18 @@ +version = 9 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Setfilmizle sitemizde, donma yaşamadan Türkçe dublaj ve altyazılı filmleri ile dizileri muhteşem 1080p full HD kalitesinde izleyebilirsiniz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=www.setfilmizle.de&sz=%size%" +} \ No newline at end of file diff --git a/SetFilmIzle/src/main/AndroidManifest.xml b/SetFilmIzle/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/SetFilmIzle/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/ExPlayExtractor.kt b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/ExPlayExtractor.kt new file mode 100644 index 0000000000..aaf4a4fc59 --- /dev/null +++ b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/ExPlayExtractor.kt @@ -0,0 +1,37 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class ExPlay : ExtractorApi() { + override val name = "ExPlay" + override val mainUrl = "https://explay.store" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val partKey = url.substringAfter("?partKey=").substringAfter("turkce").uppercase() + @Suppress("NAME_SHADOWING") val url = url.substringBefore("?partKey=") + val iSource = app.get(url, referer=extRef).text + + val videoUrl = Regex("""videoUrl":"([^",]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("videoUrl not found") + val videoServer = Regex("""videoServer":"([^",]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("videoServer not found") + val title = if (partKey != "") partKey else Regex("""title":"([^",]+)""").find(iSource)?.groupValues?.get(1)?.split(".")?.last() ?: "Unknown" + val m3uLink = "${mainUrl}${videoUrl.replace("\\", "")}?s=${videoServer}" + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = "${this.name} - $title", + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetFilmIzle.kt b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetFilmIzle.kt new file mode 100644 index 0000000000..6aebd0a49a --- /dev/null +++ b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetFilmIzle.kt @@ -0,0 +1,226 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer +import org.json.JSONObject +import org.jsoup.Jsoup +import okhttp3.* + +class SetFilmIzle : MainAPI() { + override var mainUrl = "https://www.setfilmizle.nl" + override var name = "SetFilmIzle" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) + + override val mainPage = mainPageOf( + "${mainUrl}/tur/aile/" to "Aile", + "${mainUrl}/tur/aksiyon/" to "Aksiyon", + "${mainUrl}/tur/animasyon/" to "Animasyon", + "${mainUrl}/tur/belgesel/" to "Belgesel", + "${mainUrl}/tur/bilim-kurgu/" to "Bilim-Kurgu", + "${mainUrl}/tur/biyografi/" to "Biyografi", + "${mainUrl}/tur/dini/" to "Dini", + "${mainUrl}/tur/dram/" to "Dram", + "${mainUrl}/tur/fantastik/" to "Fantastik", + "${mainUrl}/tur/genclik/" to "Gençlik", + "${mainUrl}/tur/gerilim/" to "Gerilim", + "${mainUrl}/tur/gizem/" to "Gizem", + "${mainUrl}/tur/komedi/" to "Komedi", + "${mainUrl}/tur/korku/" to "Korku", + "${mainUrl}/tur/macera/" to "Macera", + "${mainUrl}/tur/mini-dizi/" to "Mini Dizi", + "${mainUrl}/tur/muzik/" to "Müzik", + "${mainUrl}/tur/program/" to "Program", + "${mainUrl}/tur/romantik/" to "Romantik", + "${mainUrl}/tur/savas/" to "Savaş", + "${mainUrl}/tur/spor/" to "Spor", + "${mainUrl}/tur/suc/" to "Suç", + "${mainUrl}/tur/tarih/" to "Tarih", + "${mainUrl}/tur/western/" to "Western" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data).document + val home = document.select("div.items article").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("h2")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return if (href.contains("/dizi/")) { + newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } else { + newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + } + + override suspend fun search(query: String): List<SearchResponse> { + val mainPage = app.get(mainUrl).document + val nonce = Regex("""nonce: '(.*)'""").find(mainPage.html())?.groupValues?.get(1) ?: "" + val search = app.post( + url = "${mainUrl}/wp-admin/admin-ajax.php", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf( + "action" to "ajax_search", + "nonce" to nonce, + "search" to query + ) + ) + val document = Jsoup.parse(JSONObject(search.text).getString("html")) + + return document.select("div.items article").mapNotNull { it.toSearchResult() } + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("h2")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return if (href.contains("/dizi/")) { + newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } else { + newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1")?.text()?.substringBefore(" izle")?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.poster img")?.attr("src")) + val description = document.selectFirst("div.wp-content p")?.text()?.trim() + var year = document.selectFirst("div.extra span.C a")?.text()?.trim()?.toIntOrNull() + val tags = document.select("div.sgeneros a").map { it.text() } + val rating = document.selectFirst("span.dt_rating_vgs")?.text()?.trim()?.toRatingInt() + var duration = document.selectFirst("span.runtime")?.text()?.split(" ")?.first()?.trim()?.toIntOrNull() + val recommendations = document.select("div.srelacionados article").mapNotNull { it.toRecommendationResult() } + val actors = document.select("span.valor a").map { Actor(it.text()) } + val trailer = Regex("""embed/(.*)\?rel""").find(document.html())?.groupValues?.get(1)?.let { "https://www.youtube.com/embed/$it" } + + if (url.contains("/dizi/")) { + year = document.selectFirst("a[href*='/yil/']")?.text()?.trim()?.toIntOrNull() + duration = document.selectFirst("div#info span:containsOwn(Dakika)")?.text()?.split(" ")?.first()?.trim()?.toIntOrNull() + + val episodes = document.select("div#episodes ul.episodios li").mapNotNull { + val epHref = fixUrlNull(it.selectFirst("h4.episodiotitle a")?.attr("href")) ?: return@mapNotNull null + val epName = it.selectFirst("h4.episodiotitle a")?.ownText()?.trim() ?: return@mapNotNull null + val epDetail = it.selectFirst("h4.episodiotitle a")?.ownText()?.trim() ?: return@mapNotNull null + val epSeason = epDetail.substringBefore(". Sezon").toIntOrNull() + val epEpisode = epDetail.split("Sezon ").last().substringBefore(". Bölüm").toIntOrNull() + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } + + private fun Element.toRecommendationResult(): SearchResponse? { + val title = this.selectFirst("a img")?.attr("alt") ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("a img")?.attr("data-src")) + + return if (href.contains("/dizi/")) { + newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } else { + newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + } + + private fun sendMultipartRequest(nonce: String, postId: String, playerName: String, partKey: String, referer: String): Response { + val formData = mapOf( + "action" to "get_video_url", + "nonce" to nonce, + "post_id" to postId, + "player_name" to playerName, + "part_key" to partKey + ) + + val requestBody = MultipartBody.Builder().setType(MultipartBody.FORM).apply { + formData.forEach { (key, value) -> addFormDataPart(key, value) } + }.build() + + val headers = mapOf( + "Referer" to referer, + "Content-Type" to "multipart/form-data; boundary=---------------------------112453778312642376182726606734", + ) + + val request = Request.Builder().url("${mainUrl}/wp-admin/admin-ajax.php").post(requestBody).apply { + headers.forEach { (key, value) -> addHeader(key, value) } + }.build() + + val client = OkHttpClient() + + return client.newCall(request).execute() + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("STF", "data » $data") + val document = app.get(data).document + + document.select("nav.player a").map { element -> + val sourceId = element.attr("data-post-id") + val name = element.attr("data-player-name") + val partKey = element.attr("data-part-key") + + Triple(name, sourceId, partKey) + }.forEach { (name, sourceId, partKey) -> + if (sourceId.contains("event")) return@forEach + if (partKey == "" || sourceId == "") return@forEach + + val nonce = Regex("""nonce: '(.*)'""").find(document.html())?.groupValues?.get(1) ?: "" + val multiPart = sendMultipartRequest(nonce, sourceId, name, partKey, data) + val sourceBody = multiPart.body.string() + val sourceIframe = JSONObject(sourceBody).optJSONObject("data")?.optString("url") ?: return@forEach + Log.d("STF", "iframe » $sourceIframe") + + if (sourceIframe.contains("explay.store") || sourceIframe.contains("setplay.site")) { + loadExtractor("${sourceIframe}?partKey=${partKey}", "${mainUrl}/", subtitleCallback, callback) + } else { + loadExtractor(sourceIframe, "${mainUrl}/", subtitleCallback, callback) + } + } + + return true + } +} \ No newline at end of file diff --git a/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetFilmIzlePlugin.kt b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetFilmIzlePlugin.kt new file mode 100644 index 0000000000..3dfa19332d --- /dev/null +++ b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetFilmIzlePlugin.kt @@ -0,0 +1,15 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class SetFilmIzlePlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(SetFilmIzle()) + registerExtractorAPI(SetPlay()) + registerExtractorAPI(SetPrime()) + registerExtractorAPI(ExPlay()) + } +} \ No newline at end of file diff --git a/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetPlayExtractor.kt b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetPlayExtractor.kt new file mode 100644 index 0000000000..758597de8a --- /dev/null +++ b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetPlayExtractor.kt @@ -0,0 +1,35 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class SetPlay : ExtractorApi() { + override val name = "SetPlay" + override val mainUrl = "https://setplay.cfd" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val extRef = referer ?: "" + val iSource = app.get(url, referer=extRef).text + + val videoUrl = Regex("""videoUrl":"([^",]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("videoUrl not found") + val videoServer = Regex("""videoServer":"([^",]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("videoServer not found") + val title = Regex("""title":"([^",]+)""").find(iSource)?.groupValues?.get(1)?.split(".")?.last() ?: "Unknown" + val m3uLink = "${mainUrl}${videoUrl.replace("\\", "")}?s=${videoServer}" + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = "${this.name} - $title", + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetPrimeExtractor.kt b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetPrimeExtractor.kt new file mode 100644 index 0000000000..b6c0ef87cd --- /dev/null +++ b/SetFilmIzle/src/main/kotlin/com/keyiflerolsun/SetPrimeExtractor.kt @@ -0,0 +1,38 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +open class SetPrime : ExtractorApi() { + override val name = "SetPrime" + override val mainUrl = "https://setplay.site" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val partKey = url.substringAfter("?partKey=").substringAfter("turkce").uppercase() + @Suppress("NAME_SHADOWING") val url = url.substringBefore("?partKey=") + val iSource = app.post(url.replace("embed?i=", "embed/get?i="), referer=url).text + + val links = Regex("""Links":\["([^"\]]+)""").find(iSource)?.groupValues?.get(1) ?: throw ErrorLoadingException("Links not found") + if (!links.startsWith("/")) { + throw ErrorLoadingException("Links not valid") + } + + val m3uLink = "${mainUrl}${links}" + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = if (partKey != "") "${this.name} - $partKey" else this.name, + url = m3uLink, + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/SezonlukDizi/build.gradle.kts b/SezonlukDizi/build.gradle.kts new file mode 100644 index 0000000000..f3ab970f26 --- /dev/null +++ b/SezonlukDizi/build.gradle.kts @@ -0,0 +1,18 @@ +version = 2 + +cloudstream { + authors = listOf("keyiflerolsun","JustRelaxable") + language = "tr" + description = "Güncel ve eski dizileri en iyi görüntü kalitesiyle bulabileceğiniz yabancı dizi izleme siteniz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("TvSeries") + iconUrl = "https://www.google.com/s2/favicons?domain=sezonlukdizi6.com&sz=%size%" +} \ No newline at end of file diff --git a/SezonlukDizi/src/main/AndroidManifest.xml b/SezonlukDizi/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/SezonlukDizi/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDizi.kt b/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDizi.kt new file mode 100644 index 0000000000..46a8d4bb37 --- /dev/null +++ b/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDizi.kt @@ -0,0 +1,195 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class SezonlukDizi : MainAPI() { + override var mainUrl = "https://sezonlukdizi6.com" + override var name = "SezonlukDizi" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.TvSeries) + + override val mainPage = mainPageOf( + "${mainUrl}/diziler.asp?siralama_tipi=id&s=" to "Son Eklenenler", + "${mainUrl}/diziler.asp?siralama_tipi=id&tur=mini&s=" to "Mini Diziler", + "${mainUrl}/diziler.asp?siralama_tipi=id&kat=2&s=" to "Yerli Diziler", + "${mainUrl}/diziler.asp?siralama_tipi=id&kat=1&s=" to "Yabancı Diziler", + "${mainUrl}/diziler.asp?siralama_tipi=id&kat=3&s=" to "Asya Dizileri", + "${mainUrl}/diziler.asp?siralama_tipi=id&kat=4&s=" to "Animasyonlar", + "${mainUrl}/diziler.asp?siralama_tipi=id&kat=5&s=" to "Animeler", + "${mainUrl}/diziler.asp?siralama_tipi=id&kat=6&s=" to "Belgeseller", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.afis a").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("div.description")?.text()?.trim() ?: return null + val href = fixUrlNull(this.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newTvSeriesSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/diziler.asp?adi=${query}").document + + return document.select("div.afis a").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.header")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.image img")?.attr("data-src")) ?: return null + val year = document.selectFirst("div.extra span")?.text()?.trim()?.split("-")?.first()?.toIntOrNull() + val description = document.selectFirst("span#tartismayorum-konu")?.text()?.trim() + val tags = document.select("div.labels a[href*='tur']").mapNotNull { it.text().trim() } + val rating = document.selectFirst("div.dizipuani a div")?.text()?.trim()?.replace(",", ".").toRatingInt() + val duration = document.selectXpath("//span[contains(text(), 'Dk.')]").text().trim().substringBefore(" Dk.").toIntOrNull() + + val endpoint = url.split("/").last() + + val actorsReq = app.get("${mainUrl}/oyuncular/${endpoint}").document + val actors = actorsReq.select("div.doubling div.ui").map { + Actor( + it.selectFirst("div.header")!!.text().trim(), + fixUrlNull(it.selectFirst("img")?.attr("src")) + ) + } + + + val episodesReq = app.get("${mainUrl}/bolumler/${endpoint}").document + val episodes = mutableListOf<Episode>() + for (sezon in episodesReq.select("table.unstackable")) { + for (bolum in sezon.select("tbody tr")) { + val epName = bolum.selectFirst("td:nth-of-type(4) a")?.text()?.trim() ?: continue + val epHref = fixUrlNull(bolum.selectFirst("td:nth-of-type(4) a")?.attr("href")) ?: continue + val epEpisode = bolum.selectFirst("td:nth-of-type(3)")?.text()?.substringBefore(".Bölüm")?.trim()?.toIntOrNull() + val epSeason = bolum.selectFirst("td:nth-of-type(2)")?.text()?.substringBefore(".Sezon")?.trim()?.toIntOrNull() + + episodes.add(newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + }) + } + } + + + return 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) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("SZD", "data » $data") + val document = app.get(data).document + val aspData = getAspData() + val bid = document.selectFirst("div#dilsec")?.attr("data-id") ?: return false + Log.d("SZD", "bid » $bid") + + val altyaziResponse = app.post( + "${mainUrl}/ajax/dataAlternatif${aspData.alternatif}.asp", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf( + "bid" to bid, + "dil" to "1" + ) + ).parsedSafe<Kaynak>() + altyaziResponse?.takeIf { it.status == "success" }?.data?.forEach { veri -> + Log.d("SZD", "dil»1 | veri.baslik » ${veri.baslik}") + + val veriResponse = app.post( + "${mainUrl}/ajax/dataEmbed${aspData.embed}.asp", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf("id" to "${veri.id}") + ).document + + val iframe = fixUrlNull(veriResponse.selectFirst("iframe")?.attr("src")) ?: return@forEach + Log.d("SZD", "dil»1 | iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback) { link -> + callback.invoke( + ExtractorLink( + source = "AltYazı - ${veri.baslik}", + name = "AltYazı - ${veri.baslik}", + url = link.url, + referer = link.referer, + quality = link.quality, + headers = link.headers, + extractorData = link.extractorData, + type = link.type + ) + ) + } + } + + val dublajResponse = app.post( + "${mainUrl}/ajax/dataAlternatif${aspData.alternatif}.asp", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf( + "bid" to bid, + "dil" to "0" + ) + ).parsedSafe<Kaynak>() + dublajResponse?.takeIf { it.status == "success" }?.data?.forEach { veri -> + Log.d("SZD", "dil»0 | veri.baslik » ${veri.baslik}") + + val veriResponse = app.post( + "${mainUrl}/ajax/dataEmbed${aspData.embed}.asp", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf("id" to "${veri.id}") + ).document + + val iframe = fixUrlNull(veriResponse.selectFirst("iframe")?.attr("src")) ?: return@forEach + Log.d("SZD", "dil»0 | iframe » $iframe") + + loadExtractor(iframe, "${mainUrl}/", subtitleCallback) { link -> + callback.invoke( + ExtractorLink( + source = "Dublaj - ${veri.baslik}", + name = "Dublaj - ${veri.baslik}", + url = link.url, + referer = link.referer, + quality = link.quality, + headers = link.headers, + extractorData = link.extractorData, + type = link.type + ) + ) + } + } + + return true + } + + //Helper function for getting the number (probably some kind of version?) after the dataAlternatif and dataEmbed + private suspend fun getAspData() : AspData{ + val websiteCustomJavascript = app.get("${this.mainUrl}/js/site.min.js") + val dataAlternatifAsp = Regex("""dataAlternatif(.*?).asp""").find(websiteCustomJavascript.text)?.groupValues?.get(1) + .toString() + val dataEmbedAsp = Regex("""dataEmbed(.*?).asp""").find(websiteCustomJavascript.text)?.groupValues?.get(1) + .toString() + return AspData(dataAlternatifAsp,dataEmbedAsp) + } +} diff --git a/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDiziModels.kt b/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDiziModels.kt new file mode 100644 index 0000000000..2087ba8df1 --- /dev/null +++ b/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDiziModels.kt @@ -0,0 +1,22 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class Kaynak( + @JsonProperty("status") val status: String, + @JsonProperty("data") val data: List<Veri>, +) + +data class Veri( + @JsonProperty("baslik") val baslik: String, + @JsonProperty("id") val id: Int, + @JsonProperty("kalite") val kalite: Int, +) + +data class AspData( + val alternatif : String, + val embed : String +) \ No newline at end of file diff --git a/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDiziPlugin.kt b/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDiziPlugin.kt new file mode 100644 index 0000000000..39190b8f3d --- /dev/null +++ b/SezonlukDizi/src/main/kotlin/com/keyiflerolsun/SezonlukDiziPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class SezonlukDiziPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(SezonlukDizi()) + } +} \ No newline at end of file diff --git a/SineWix/build.gradle.kts b/SineWix/build.gradle.kts new file mode 100644 index 0000000000..dff4d21f60 --- /dev/null +++ b/SineWix/build.gradle.kts @@ -0,0 +1,18 @@ +version = 11 + +cloudstream { + authors = listOf("keyiflerolsun", "yusiqo") + language = "tr" + description = "Sinewix | Ücretsiz Film - Dizi - Anime İzleme Uygulaması." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie", "TvSeries", "Anime") + iconUrl = "https://play-lh.googleusercontent.com/brwGNmr7IjA_MKk_TTPs0va10hdKE_bD_a1lnKoiMuCayW98EHpRv55edA6aEoJlmwfX" +} \ No newline at end of file diff --git a/SineWix/src/main/AndroidManifest.xml b/SineWix/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/SineWix/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/SineWix/src/main/kotlin/com/keyiflerolsun/SineWix.kt b/SineWix/src/main/kotlin/com/keyiflerolsun/SineWix.kt new file mode 100644 index 0000000000..2ae9eda52a --- /dev/null +++ b/SineWix/src/main/kotlin/com/keyiflerolsun/SineWix.kt @@ -0,0 +1,202 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class SineWix : MainAPI() { + override var mainUrl = "https://ythls.kekikakademi.org" + override var name = "SineWix" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries, TvType.Anime) + + override val mainPage = mainPageOf( + "${mainUrl}/sinewix/movies" to "Filmler", + "${mainUrl}/sinewix/series" to "Diziler", + "${mainUrl}/sinewix/animes" to "Animeler", + "${mainUrl}/sinewix/movies/10751" to "Aile", + "${mainUrl}/sinewix/movies/28" to "Aksiyon", + "${mainUrl}/sinewix/movies/16" to "Animasyon", + "${mainUrl}/sinewix/movies/99" to "Belgesel", + "${mainUrl}/sinewix/movies/10765" to "Bilim Kurgu & Fantazi", + "${mainUrl}/sinewix/movies/878" to "Bilim-Kurgu", + "${mainUrl}/sinewix/movies/18" to "Dram", + "${mainUrl}/sinewix/movies/14" to "Fantastik", + "${mainUrl}/sinewix/movies/53" to "Gerilim", + "${mainUrl}/sinewix/movies/9648" to "Gizem", + "${mainUrl}/sinewix/movies/35" to "Komedi", + "${mainUrl}/sinewix/movies/27" to "Korku", + "${mainUrl}/sinewix/movies/12" to "Macera", + "${mainUrl}/sinewix/movies/10402" to "Müzik", + "${mainUrl}/sinewix/movies/10749" to "Romantik", + "${mainUrl}/sinewix/movies/10752" to "Savaş", + "${mainUrl}/sinewix/movies/80" to "Suç", + "${mainUrl}/sinewix/movies/10770" to "TV film", + "${mainUrl}/sinewix/movies/36" to "Tarih", + ) + + private val twitter = "https://twitter.com/" + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val url = "${request.data}/${page}" + val home = when { + request.data.contains("/movies") -> { + app.get(url).parsedSafe<GenresMovie>()?.data?.map { item -> + newMovieSearchResponse(item.title, "?type=${item.type}&id=${item.id}", TvType.Movie) { this.posterUrl = item.posterPath } + } ?: listOf() + } + request.data.contains("/series") -> { + app.get(url).parsedSafe<GenresSerie>()?.data?.map { item -> + newTvSeriesSearchResponse(item.name, "?type=${item.type}&id=${item.id}", TvType.TvSeries) { this.posterUrl = item.posterPath } + } ?: listOf() + } + request.data.contains("/animes") -> { + app.get(url).parsedSafe<GenresSerie>()?.data?.map { item -> + newAnimeSearchResponse(item.name, "?type=${item.type}&id=${item.id}", TvType.Anime) { this.posterUrl = item.posterPath } + } ?: listOf() + } + else -> listOf() + } + + return newHomePageResponse(request.name, home) + } + + override suspend fun search(query: String): List<SearchResponse> { + val request = app.get("${mainUrl}/sinewix/search/${query}") + val reqData = request.parsedSafe<Search>()?.search + + return reqData?.mapNotNull { item -> + when (item.type) { + "movie" -> newMovieSearchResponse(item.name, "?type=${item.type}&id=${item.id}", TvType.Movie) { this.posterUrl = item.posterPath } + "serie" -> newTvSeriesSearchResponse(item.name, "?type=${item.type}&id=${item.id}", TvType.TvSeries) { this.posterUrl = item.posterPath } + "anime" -> newAnimeSearchResponse(item.name, "?type=${item.type}&id=${item.id}", TvType.Anime) { this.posterUrl = item.posterPath } + else -> null + } + } ?: mutableListOf() + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val itemType = url.substringAfter("?type=").substringBefore("&id=") + val itemId = url.substringAfter("&id=") + + if (itemType == "movie") { + val request = app.get("${mainUrl}/sinewix/movie/${itemId}") + val media = request.parsedSafe<MovieDetail>() ?: return null + + val orgTitle = media.title + val altTitle = media.originalName ?: "" + val title = if (altTitle.isNotEmpty() && orgTitle != altTitle) "$orgTitle - $altTitle" else orgTitle + + val poster = fixUrlNull(media.posterPath) + val description = media.overview + val year = media.releaseDate.split("-").first().toIntOrNull() + val tags = media.genres?.map { it.name } + val rating = "${media.voteAverage}".toRatingInt() + val recommendations = media.relateds?.map { newMovieSearchResponse(it.title, "?type=${it.type}&id=${it.id}", TvType.Movie) { this.posterUrl = it.posterPath } } + val actors = media.casterslist?.map { Actor(it.name, it.profilePath) } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.recommendations = recommendations + addActors(actors) + } + } else { + val request = app.get("${mainUrl}/sinewix/${itemType}/${itemId}") + val media = request.parsedSafe<SerieDetail>() ?: return null + + val orgTitle = media.name + val altTitle = media.originalName ?: "" + val title = if (altTitle.isNotEmpty() && orgTitle != altTitle) "$orgTitle - $altTitle" else orgTitle + + val poster = fixUrlNull(media.posterPath) + val description = media.overview + val year = media.firstAirDate.split("-").first().toIntOrNull() + val tags = media.genres?.map { it.name } + val rating = "${media.voteAverage}".toRatingInt() + val recommendations = media.relateds?.map { newMovieSearchResponse(it.name, "?type=${it.type}&id=${it.id}", TvType.Movie) { this.posterUrl = it.posterPath } } + val actors = media.casterslist?.map { Actor(it.name, it.profilePath) } + + val episodeList = mutableListOf<Episode>() + + media.seasons.forEach { season -> + season.episodes.forEach { episode -> + episodeList.add(newEpisode(url + "&source=" + episode.videos.firstOrNull()?.link) { + this.name = episode.name + this.season = season.seasonNumber + this.episode = episode.episodeNumber + this.description = episode.overview + this.posterUrl = episode.stillPath + }) + } + } + + return newTvSeriesLoadResponse(title, url, if (itemType == "serie") TvType.TvSeries else TvType.Anime, episodeList) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.recommendations = recommendations + addActors(actors) + } + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + if (!data.contains("&source=")) { + val itemId = data.substringAfter("&id=").substringBefore("&source=") + val request = app.get("${mainUrl}/sinewix/movie/${itemId}") + val media = request.parsedSafe<MovieDetail>() ?: return false + + media.videos.forEach { video -> + Log.d("SNWX", "video » $video") + + if (video.link.contains("mediafire.com")) { + loadExtractor(video.link, twitter, subtitleCallback, callback) + } else { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = video.link, + referer = twitter, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + + } + } else { + + if (data.substringAfter("&source=").contains("mediafire.com")) { + loadExtractor(data.substringAfter("&source="), twitter, subtitleCallback, callback) + } else { + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = data.substringAfter("&source="), + referer = twitter, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + + } + + return true + } +} \ No newline at end of file diff --git a/SineWix/src/main/kotlin/com/keyiflerolsun/SineWixModels.kt b/SineWix/src/main/kotlin/com/keyiflerolsun/SineWixModels.kt new file mode 100644 index 0000000000..5a08fb5cb8 --- /dev/null +++ b/SineWix/src/main/kotlin/com/keyiflerolsun/SineWixModels.kt @@ -0,0 +1,94 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + +data class GenresMovie( + @JsonProperty("data") val data: List<JustMovie> +) + +data class JustMovie( + @JsonProperty("id") val id: Int, + @JsonProperty("title") val title: String, + @JsonProperty("poster_path") val posterPath: String, + @JsonProperty("type") val type: String +) + +data class GenresSerie( + @JsonProperty("data") val data: List<JustSerie> +) + +data class JustSerie( + @JsonProperty("id") val id: Int, + @JsonProperty("name") val name: String, + @JsonProperty("poster_path") val posterPath: String, + @JsonProperty("type") val type: String +) + +data class MovieDetail( + @JsonProperty("id") val id: Int, + @JsonProperty("title") val title: String, + @JsonProperty("original_name") val originalName: String?, + @JsonProperty("overview") val overview: String?, + @JsonProperty("poster_path") val posterPath: String, + @JsonProperty("vote_average") val voteAverage: Int, + @JsonProperty("release_date") val releaseDate: String, + @JsonProperty("casterslist") val casterslist: List<Cast>?, + @JsonProperty("relateds") val relateds: List<JustMovie>?, + @JsonProperty("genres") val genres: List<Genre>?, + @JsonProperty("videos") val videos: List<Video> +) + +data class SerieDetail( + @JsonProperty("id") val id: Int, + @JsonProperty("name") val name: String, + @JsonProperty("original_name") val originalName: String?, + @JsonProperty("overview") val overview: String?, + @JsonProperty("poster_path") val posterPath: String, + @JsonProperty("vote_average") val voteAverage: Int, + @JsonProperty("first_air_date") val firstAirDate: String, + @JsonProperty("casterslist") val casterslist: List<Cast>?, + @JsonProperty("relateds") val relateds: List<JustSerie>?, + @JsonProperty("genres") val genres: List<Genre>?, + @JsonProperty("seasons") val seasons: List<SeasonDetail> +) + +data class Cast( + @JsonProperty("name") val name: String, + @JsonProperty("profile_path") val profilePath: String? +) + +data class Genre( + @JsonProperty("name") val name: String +) + +data class Video( + @JsonProperty("id") val id: Int, + @JsonProperty("link") val link: String, + @JsonProperty("lang") val lang: String? +) + +data class Search( + @JsonProperty("search") val search: List<SearchItem> +) + +data class SearchItem( + @JsonProperty("id") val id: Int, + @JsonProperty("name") val name: String, + @JsonProperty("poster_path") val posterPath: String, + @JsonProperty("type") val type: String +) + +data class SeasonDetail( + @JsonProperty("season_number") val seasonNumber: Int, + @JsonProperty("episodes") val episodes: List<EpisodeDetail> +) + +data class EpisodeDetail( + @JsonProperty("episode_number") val episodeNumber: Int, + @JsonProperty("name") val name: String, + @JsonProperty("overview") val overview: String?, + @JsonProperty("still_path") val stillPath: String?, + @JsonProperty("videos") val videos: List<Video> +) \ No newline at end of file diff --git a/SineWix/src/main/kotlin/com/keyiflerolsun/SineWixPlugin.kt b/SineWix/src/main/kotlin/com/keyiflerolsun/SineWixPlugin.kt new file mode 100644 index 0000000000..071838a7ae --- /dev/null +++ b/SineWix/src/main/kotlin/com/keyiflerolsun/SineWixPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class SineWixPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(SineWix()) + } +} \ No newline at end of file diff --git a/SinemaCX/build.gradle.kts b/SinemaCX/build.gradle.kts new file mode 100644 index 0000000000..a6054f7f1f --- /dev/null +++ b/SinemaCX/build.gradle.kts @@ -0,0 +1,18 @@ +version = 2 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Güncel ve en iyi yabancı filmleri yüksek görüntü kalitesinde, Türkçe dublaj ve altyazı seçenekleriyle filmleri full izleyin." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=www.sinema.cx&sz=%size%" +} \ No newline at end of file diff --git a/SinemaCX/src/main/AndroidManifest.xml b/SinemaCX/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/SinemaCX/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/SinemaCX/src/main/kotlin/com/keyiflerolsun/SinemaCX.kt b/SinemaCX/src/main/kotlin/com/keyiflerolsun/SinemaCX.kt new file mode 100644 index 0000000000..8f2cd06b4d --- /dev/null +++ b/SinemaCX/src/main/kotlin/com/keyiflerolsun/SinemaCX.kt @@ -0,0 +1,146 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.fasterxml.jackson.annotation.JsonProperty + +class SinemaCX : MainAPI() { + override var mainUrl = "https://www.sinema.cx" + override var name = "SinemaCX" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + override var sequentialMainPageDelay = 250L // ? 0.25 saniye + override var sequentialMainPageScrollDelay = 250L // ? 0.25 saniye + + override val mainPage = mainPageOf( + "${mainUrl}/izle/aile-filmleri/page/" to "Aile Filmleri", + "${mainUrl}/izle/aksiyon-filmleri/page/" to "Aksiyon Filmleri", + "${mainUrl}/izle/animasyon-filmleri/page/" to "Animasyon Filmleri", + "${mainUrl}/izle/belgesel/page/" to "Belgesel Filmleri", + "${mainUrl}/izle/bilim-kurgu-filmleri/page/" to "Bilim Kurgu Filmler", + "${mainUrl}/izle/biyografi/page/" to "Biyografi Filmleri", + "${mainUrl}/izle/fantastik-filmler/page/" to "Fantastik Filmler", + "${mainUrl}/izle/gizem-filmleri/page/" to "Gizem Filmleri", + "${mainUrl}/izle/komedi-filmleri/page/" to "Komedi Filmleri", + "${mainUrl}/izle/korku-filmleri/page/" to "Korku Filmleri", + "${mainUrl}/izle/macera-filmleri/page/" to "Macera Filmleri", + "${mainUrl}/izle/romantik-filmler/page/" to "Romantik Filmler", + "${mainUrl}/izle/erotik-filmler/page/" to "Erotik Film izle", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.icerik div.frag-k").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("div.yanac span")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("div.yanac a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("a.resim img")?.attr("src")) ?: fixUrlNull(this.selectFirst("a.resim img")?.attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/?s=${query}").document + + return document.select("div.icerik div.frag-k").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.f-bilgi h1")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("link[rel='image_src']")?.attr("href")) + val year = document.selectFirst("div.f-bilgi ul.detay a[href*='yapim']")?.text()?.toIntOrNull() + val description = document.selectFirst("div.f-bilgi div.ackl")?.text()?.trim() + val tags = document.select("div.f-bilgi div.tur a").map { it.text() } + val rating = document.selectFirst("b#puandegistir")?.text()?.trim()?.toRatingInt() + val duration = Regex("""Süre: </span>(\d+) Dakika</li>""").find(document.html())?.groupValues?.get(1)?.toIntOrNull() + val actors = document.select("li.oync li.oyuncu-k").map { + Actor(it.selectFirst("span.isim")!!.text(), it.selectFirst("img")!!.attr("data-src")) + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("SCX", "data » $data") + val document = app.get(data).document + val iframe = fixUrlNull(document.selectFirst("iframe")?.attr("data-vsrc"))?.substringBefore("?img=") ?: return false + Log.d("SCX", "iframe » $iframe") + + val iframeSource = app.get(iframe, referer="${mainUrl}/").text + val subtitleSectionRegex = Regex("""playerjsSubtitle\s*=\s*"(.+?)"""") + val subtitleSectionMatch = subtitleSectionRegex.find(iframeSource) + if (subtitleSectionMatch != null) { + val subtitleSection = subtitleSectionMatch.groupValues[1] + val subtitleRegex = Regex("""\[(.*?)](https?://[^\s",]+)""") + val subtitleMatches = subtitleRegex.findAll(subtitleSection) + + for (subtitleMatch in subtitleMatches) { + val subtitleGroups = subtitleMatch.groupValues + val subtitleLanguage = subtitleGroups[1] + val subtitleUrl = subtitleGroups[2] + + subtitleCallback.invoke( + SubtitleFile( + lang = subtitleLanguage, + url = fixUrl(subtitleUrl) + ) + ) + + } + } + + if (iframe.contains("panel.sinema.cx")){ + val vidUrl = app.post( + "https://panel.sinema.cx/player/index.php?data=" + iframe.split("/").last() + "&do=getVideo", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + referer = "${mainUrl}/" + ).parsedSafe<Panel>()?.securedLink ?: return false + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = vidUrl, + referer = iframe, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } else { + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } + + data class Panel( + @JsonProperty("hls") val hls: Boolean? = null, + @JsonProperty("securedLink") val securedLink: String? = null + ) +} \ No newline at end of file diff --git a/SinemaCX/src/main/kotlin/com/keyiflerolsun/SinemaCXPlugin.kt b/SinemaCX/src/main/kotlin/com/keyiflerolsun/SinemaCXPlugin.kt new file mode 100644 index 0000000000..82bd25c428 --- /dev/null +++ b/SinemaCX/src/main/kotlin/com/keyiflerolsun/SinemaCXPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class SinemaCXPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(SinemaCX()) + } +} \ No newline at end of file diff --git a/SinemaCX/src/main/kotlin/com/keyiflerolsun/bakalim.py b/SinemaCX/src/main/kotlin/com/keyiflerolsun/bakalim.py new file mode 100644 index 0000000000..5fa131a296 --- /dev/null +++ b/SinemaCX/src/main/kotlin/com/keyiflerolsun/bakalim.py @@ -0,0 +1,43 @@ +from Kekik.cli import konsol +from httpx import Client, Timeout +from parsel import Selector +from re import findall + +def sinemaCX(film_url:str) -> dict: + oturum = Client(timeout=Timeout(10)) + istek = oturum.get(film_url) + secici = Selector(istek.text) + + parts = [] + # for part in secici.css("div#videos ul li"): + # part_link = part.css("a::attr(href)").get() + # # part_img = part.xpath("./a/text()").get() + # # part_img = findall(r"flags/(.*)\.png", part.css("span::attr(style)").get())[0] + # # if part_img in ("DFLT", "frag"): + # # continue + + # konsol.print(part_img, part_link) + + + iframe_link = secici.css("iframe::attr(data-vsrc)").get().split("?img=")[0] + + oturum.headers.update({"Referer": "https://www.sinema.cx/"}) + iframe_istek = oturum.get(iframe_link) + alt_yazi = findall(r'playerjsSubtitle = "\[(.*?)\](https?://[^\s]+)"', iframe_istek.text) + + oturum.headers.update({"X-Requested-With": "XMLHttpRequest"}) + video_istek = oturum.post("https://panel.sinema.cx/player/index.php?data=" + iframe_link.split("/")[-1] + "&do=getVideo") + video_url = video_istek.json()["securedLink"] + + parts.append({ + "altyazi" : alt_yazi, + "video" : video_url + }) + + return parts + +konsol.print(sinemaCX("https://www.sinema.cx/film/lovelace-izle/")) +konsol.print(sinemaCX("https://www.sinema.cx/film/intihar-odasi/")) +konsol.print(sinemaCX("https://www.sinema.cx/film/alacakaranlik-5-izle/")) +konsol.print(sinemaCX("https://www.sinema.cx/film/titanik-filmi-full-1080p-izle-yeni/")) +konsol.print(sinemaCX("https://www.sinema.cx/film/challengers-2023-izle/")) \ No newline at end of file diff --git a/SpankBang/build.gradle.kts b/SpankBang/build.gradle.kts new file mode 100644 index 0000000000..ba35c17a5d --- /dev/null +++ b/SpankBang/build.gradle.kts @@ -0,0 +1,18 @@ +version = 1 + +cloudstream { + authors = listOf("coxju", "keyiflerolsun") + language = "en" + description = "(VPN) SpankBang is the hottest free porn site in the world! Cum like never before and explore millions of fresh and free porn videos! Get lit on SpankBang!" + + /** + * 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=spankbang.com&sz=%size%" +} \ No newline at end of file diff --git a/SpankBang/src/main/AndroidManifest.xml b/SpankBang/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/SpankBang/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/SpankBang/src/main/kotlin/com/keyiflerolsun/SpankBang.kt b/SpankBang/src/main/kotlin/com/keyiflerolsun/SpankBang.kt new file mode 100644 index 0000000000..b9d639cafe --- /dev/null +++ b/SpankBang/src/main/kotlin/com/keyiflerolsun/SpankBang.kt @@ -0,0 +1,136 @@ +// ! https://github.com/phisher98/CXXX/blob/master/spankbang/src/main/kotlin/com/Spankbang/spankbang.kt + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.* +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class SpankBang : MainAPI() { + override var mainUrl = "https://spankbang.com" + override var name = "SpankBang" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.NSFW) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/new_videos/" to "New", + "${mainUrl}/upcoming/" to "Upcoming", + "${mainUrl}/trending_videos/" to "Trend", + "${mainUrl}/most_popular/" to "Popular", + "${mainUrl}/s/onlyfans/" to "OnlyFans", + "${mainUrl}/7i/channel/girlsway/" to "Girlsway", + "${mainUrl}/jg/channel/met+art+x/" to "Met Art X", + "${mainUrl}/je/channel/sex+art/" to "Sex Art", + "${mainUrl}/ja/channel/teen+erotica/" to "Teen Erotica", + "${mainUrl}/7u/channel/21+naturals/" to "21 Naturals", + "${mainUrl}/4w/channel/letsdoeit/" to "LETSDOEIT", + "${mainUrl}/np/channel/facials4k/" to "FACIALS4K", + "${mainUrl}/9b/channel/throated/" to "Throated", + "${mainUrl}/6l/channel/mylf/" to "MYLF", + "${mainUrl}/ce/channel/bratty+milf/" to "Bratty MILF", + "${mainUrl}/6c/channel/teamskeet/" to "TeamSkeet", + "${mainUrl}/j2/channel/familyxxx/" to "Family XXX", + "${mainUrl}/d6/channel/my+family+pies/" to "My Family Pies", + "${mainUrl}/6d/channel/family+strokes/" to "Family Strokes", + "${mainUrl}/j3/channel/hot+wife+xxx/" to "Hot Wife XXX", + "${mainUrl}/o4/channel/touch+my+wife/" to "Touch My Wife", + "${mainUrl}/1q/channel/daddy4k/" to "Daddy4K", + "${mainUrl}/co/channel/moms+teach+sex/" to "Moms Teach", + "${mainUrl}/8f/channel/mom+swap/" to "Mom Swap", + "${mainUrl}/cf/channel/bratty+sis/" to "Bratty Sis", + "${mainUrl}/8b/channel/sis+swap/" to "Sis Swap", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}/?o=popular&p=w&d=10").document + val home = document.select("div.main_results div.video-item").mapNotNull { it.toSearchResult() } + + return newHomePageResponse( + list = HomePageList( + name = request.name, + list = home, + isHorizontalImages = true + ), + hasNext = true + ) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = fixTitle(this.select("div.name-and-menu-wrapper a").text()) + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.select("picture img").attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.NSFW) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val searchResponse = mutableListOf<SearchResponse>() + + for (say in 1..5) { + val document = app.get("${mainUrl}/s/${query}/${say}/?o=new&d=10").document + val results = document.select("div.main_results div.video-item").mapNotNull { it.toSearchResult() } + + if (!searchResponse.containsAll(results)) { + searchResponse.addAll(results) + } else { + break + } + + 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 h1")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("meta[property='og:image']")?.attr("content")) + val description = document.selectFirst("a[href*='join']")?.text()?.trim() ?: title + val year = Regex(""""uploadDate":\s*"(\d{4})""").find(document.html())?.groupValues?.get(1)?.toIntOrNull() + val tags = document.select("div.searches a").map { it.text() } + val rating = document.selectFirst("span.rate")?.text()?.trim()?.substringBefore("%")?.toRatingInt()?.div(10) + val duration = document.selectFirst("meta[property=og:duration]")?.attr("content")?.toIntOrNull()?.div(60) + val recommendations = document.select("section.user_uploads div.video-item").mapNotNull { it.toSearchResult() } + val actors = document.select("li.primary_actions_container").map { + Actor(it.selectFirst("span.name")!!.text(), fixUrlNull(it.selectFirst("img")?.attr("src"))) + } + + return newMovieLoadResponse(title, url, TvType.NSFW, url) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("SkBg", "data » $data") + val document = app.get(data).document + val videoUrl = Regex("""'m3u8': \['([^'\]]+)""").find(document.html())?.groupValues?.get(1) ?: return false + Log.d("SkBg", "videoUrl » $videoUrl") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = fixUrl(videoUrl), + referer = data, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + + return true + } +} \ No newline at end of file diff --git a/SpankBang/src/main/kotlin/com/keyiflerolsun/SpankBangPlugin.kt b/SpankBang/src/main/kotlin/com/keyiflerolsun/SpankBangPlugin.kt new file mode 100644 index 0000000000..8247dc1eba --- /dev/null +++ b/SpankBang/src/main/kotlin/com/keyiflerolsun/SpankBangPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class SpankBangPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(SpankBang()) + } +} \ No newline at end of file diff --git a/SuperFilmGeldi/build.gradle.kts b/SuperFilmGeldi/build.gradle.kts new file mode 100644 index 0000000000..066e058272 --- /dev/null +++ b/SuperFilmGeldi/build.gradle.kts @@ -0,0 +1,18 @@ +version = 3 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Hd film izliyerek arkadaşlarınızla ve sevdiklerinizle iyi bir vakit geçirmek istiyorsanız açın bir film eğlenmeye bakın. Bilim kurgu filmleri, aşk drama vahşet aşk romantik sıradışı korku filmlerini izle." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=www.superfilmgeldi.biz&sz=%size%" +} \ No newline at end of file diff --git a/SuperFilmGeldi/src/main/AndroidManifest.xml b/SuperFilmGeldi/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/SuperFilmGeldi/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/MixPlayHDExtractor.kt b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/MixPlayHDExtractor.kt new file mode 100644 index 0000000000..2424ee5de2 --- /dev/null +++ b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/MixPlayHDExtractor.kt @@ -0,0 +1,39 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.extractors.helper.AesHelper + +class MixPlayHD : ExtractorApi() { + override var name = "MixPlayHD" + override var mainUrl = "https://mixplayhd.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val m3uLink:String? + val extRef = referer ?: "" + val iSource = app.get(url, referer=extRef).text + + val bePlayer = Regex("""bePlayer\('([^']+)',\s*'(\{[^}]+\})'\);""").find(iSource)?.groupValues ?: throw ErrorLoadingException("bePlayer not found") + val bePlayerPass = bePlayer[1] + val bePlayerData = bePlayer[2] + val encrypted = AesHelper.cryptoAESHandler(bePlayerData, bePlayerPass.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt") + Log.d("Kekik_${this.name}", "encrypted » $encrypted") + + m3uLink = Regex("""video_location":"([^"]+)""").find(encrypted)?.groupValues?.get(1) + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink ?: throw ErrorLoadingException("m3u link not found"), + referer = url, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } +} \ No newline at end of file diff --git a/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/MixTigerExtractor.kt b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/MixTigerExtractor.kt new file mode 100644 index 0000000000..ca69721838 --- /dev/null +++ b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/MixTigerExtractor.kt @@ -0,0 +1,76 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class MixTiger : ExtractorApi() { + override val name = "MixTiger" + override val mainUrl = "https://www.mixtiger.com" + override val requiresReferer = true + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + val m3uLink:String? + val extRef = referer ?: "" + val postUrl = "${url}?do=getVideo" + Log.d("Kekik_${this.name}", "postUrl » $postUrl") + + val response = app.post( + postUrl, + data = mapOf( + "hash" to url.substringAfter("video/"), + "r" to extRef, + "s" to "" + ), + referer = extRef, + headers = mapOf( + "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", + "X-Requested-With" to "XMLHttpRequest" + ) + ) + + val videoResponse = response.parsedSafe<FirePlayer>() ?: throw ErrorLoadingException("peace response is null") + Log.d("Kekik_${this.name}", "videoResponse » $videoResponse") + + if (videoResponse.videoSrc != null) { + m3uLink = videoResponse.videoSrc + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + loadExtractor(m3uLink, extRef, subtitleCallback, callback) + } else { + val videoSources = videoResponse.videoSources + m3uLink = if (videoSources.isNotEmpty()) { + videoSources.lastOrNull()?.file + } else { + null + } + + Log.d("Kekik_${this.name}", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink ?: throw ErrorLoadingException("m3u link not found"), + referer = if (m3uLink.contains("disk.yandex")) "" else extRef, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + } + + data class FirePlayer( + @JsonProperty("videoSrc") val videoSrc: String? = null, + @JsonProperty("videoSources") val videoSources: List<VideoSource> = emptyList(), + ) + + data class VideoSource( + @JsonProperty("file") val file: String, + @JsonProperty("label") val label: String, + @JsonProperty("type") val type: String + ) +} \ No newline at end of file diff --git a/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/SuperFilmGeldi.kt b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/SuperFilmGeldi.kt new file mode 100644 index 0000000000..70c9571b72 --- /dev/null +++ b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/SuperFilmGeldi.kt @@ -0,0 +1,147 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class SuperFilmGeldi : MainAPI() { + override var mainUrl = "https://www.superfilmgeldi.me" + override var name = "SuperFilmGeldi" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/page/" to "Son Eklenenler", + "${mainUrl}/hdizle/category/aksiyon/page/" to "Aksiyon", + "${mainUrl}/hdizle/category/animasyon/page/" to "Animasyon", + "${mainUrl}/hdizle/category/belgesel/page/" to "Belgesel", + "${mainUrl}/hdizle/category/bilim-kurgu/page/" to "Bilim Kurgu", + "${mainUrl}/hdizle/category/fantastik/page/" to "Fantastik", + "${mainUrl}/hdizle/category/komedi-filmleri/page/" to "Komedi Filmleri", + "${mainUrl}/hdizle/category/macera/page/" to "Macera", + "${mainUrl}/hdizle/category/gerilim/page/" to "Gerilim", + "${mainUrl}/hdizle/category/suc/page/" to "Suç", + "${mainUrl}/hdizle/category/karete-filmleri/page/" to "Karete Filmleri", + "${mainUrl}/hdizle/category/yesilcam-erotik-izle/page/" to "Yeşilçam Erotik", + "${mainUrl}/hdizle/category/hd-erotik-filmler-izle/page/" to "Erotik Filmler" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.movie-preview-content").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun removeUnnecessarySuffixes(title: String): String { + val unnecessarySuffixes = listOf( + " izle", + " full film", + " filmini full", + " full türkçe", + " alt yazılı", + " altyazılı", + " tr dublaj", + " hd türkçe", + " türkçe dublaj", + " yeşilçam ", + " erotik fil", + " türkçe", + " yerli", + ) + + var cleanedTitle = title.trim() + + for (suffix in unnecessarySuffixes) { + val regex = Regex("${Regex.escape(suffix)}.*$", RegexOption.IGNORE_CASE) + cleanedTitle = cleanedTitle.replace(regex, "").trim() + } + + return cleanedTitle + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("span.movie-title a")?.text()?.substringBefore(" izle") ?: return null + val href = fixUrlNull(this.selectFirst("span.movie-title a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newMovieSearchResponse(removeUnnecessarySuffixes(title), href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}?s=${query}").document + + return document.select("div.movie-preview-content").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.title h1")?.text()?.trim()?.substringBefore(" izle") ?: return null + val poster = fixUrlNull(document.selectFirst("div.poster img")?.attr("src")) + val year = document.selectFirst("div.release a")?.text()?.toIntOrNull() + val description = document.selectFirst("div.excerpt p")?.text()?.trim() + val tags = document.select("div.categories a").map { it.text() } + val rating = document.selectFirst("span.imdb-rating")?.text()?.trim()?.split(" ")?.first()?.toRatingInt() + val recommendations = document.select("div.film-content div.existing_item").mapNotNull { it.toSearchResult() } + val actors = document.select("div.actor a").map { + Actor(it.text()) + } + + return newMovieLoadResponse(removeUnnecessarySuffixes(title), url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.recommendations = recommendations + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("SFG", "data » $data") + val document = app.get(data).document + val iframe = fixUrlNull(document.selectFirst("div#vast iframe")?.attr("src")) ?: return false + Log.d("SFG", "iframe » $iframe") + + if (iframe.contains("mix") and iframe.contains("index.php?data=")) { + val iSource = app.get(iframe, referer="${mainUrl}/").text + val mixPoint = Regex("""videoUrl":"(.*)","videoServer""").find(iSource)?.groupValues?.get(1)?.replace("\\", "") ?: return false + + var endPoint = "?s=0&d=" + + if (iframe.contains("mixlion")) { + endPoint = "?s=3&d=" + } else if (iframe.contains("mixeagle")) { + endPoint = "?s=1&d=" + } + + val m3uLink = iframe.substringBefore("/player") + mixPoint + endPoint + Log.d("SFG", "m3uLink » $m3uLink") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = m3uLink, + referer = iframe, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } else { + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } +} \ No newline at end of file diff --git a/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/SuperFilmGeldiPlugin.kt b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/SuperFilmGeldiPlugin.kt new file mode 100644 index 0000000000..73104d48de --- /dev/null +++ b/SuperFilmGeldi/src/main/kotlin/com/keyiflerolsun/SuperFilmGeldiPlugin.kt @@ -0,0 +1,14 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class SuperFilmGeldiPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(SuperFilmGeldi()) + registerExtractorAPI(MixPlayHD()) + registerExtractorAPI(MixTiger()) + } +} \ No newline at end of file diff --git a/TurkAnime/build.gradle.kts b/TurkAnime/build.gradle.kts new file mode 100644 index 0000000000..e1cff3f51b --- /dev/null +++ b/TurkAnime/build.gradle.kts @@ -0,0 +1,18 @@ +version = 1 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Türk Anime TV - Türkiye'nin Online Anime izleme sitesi." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Anime") + iconUrl = "https://www.google.com/s2/favicons?domain=www.turkanime.co&sz=%size%" +} \ No newline at end of file diff --git a/TurkAnime/src/main/AndroidManifest.xml b/TurkAnime/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/TurkAnime/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/TurkAnime/src/main/kotlin/com/keyiflerolsun/TurkAnime.kt b/TurkAnime/src/main/kotlin/com/keyiflerolsun/TurkAnime.kt new file mode 100644 index 0000000000..16add362a8 --- /dev/null +++ b/TurkAnime/src/main/kotlin/com/keyiflerolsun/TurkAnime.kt @@ -0,0 +1,212 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import org.jsoup.nodes.Document +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import android.util.Base64 +import com.lagradost.cloudstream3.extractors.helper.AesHelper + +class TurkAnime : MainAPI() { + override var mainUrl = "https://www.turkanime.co" + override var name = "TurkAnime" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Anime) + + override val mainPage = mainPageOf( + "${mainUrl}/anime-turu/1/Aksiyon" to "Aksiyon", + "${mainUrl}/anime-turu/3/Arabalar" to "Arabalar", + "${mainUrl}/anime-turu/38/Askeri" to "Askeri", + "${mainUrl}/anime-turu/5/Avangard" to "Avangard", + "${mainUrl}/anime-turu/24/Bilim_Kurgu" to "Bilim Kurgu", + "${mainUrl}/anime-turu/16/B%C3%BCy%C3%BC" to "Büyü", + "${mainUrl}/anime-turu/15/%C3%87ocuklar" to "Çocuklar", + "${mainUrl}/anime-turu/37/Do%C4%9Fa%C3%BCst%C3%BC_G%C3%BC%C3%A7ler" to "Doğaüstü Güçler", + "${mainUrl}/anime-turu/17/D%C3%B6v%C3%BC%C5%9F_Sanatlar%C4%B1" to "Dövüş Sanatları", + "${mainUrl}/anime-turu/8/Dram" to "Dram", + "${mainUrl}/anime-turu/9/Ecchi" to "Ecchi", + "${mainUrl}/anime-turu/10/Fantastik" to "Fantastik", + "${mainUrl}/anime-turu/41/Gerilim" to "Gerilim", + "${mainUrl}/anime-turu/7/Gizem" to "Gizem", + "${mainUrl}/anime-turu/35/Harem" to "Harem", + "${mainUrl}/anime-turu/43/Josei" to "Josei", + "${mainUrl}/anime-turu/4/Komedi" to "Komedi", + "${mainUrl}/anime-turu/14/Korku" to "Korku", + "${mainUrl}/anime-turu/2/Macera" to "Macera", + "${mainUrl}/anime-turu/18/Mecha" to "Mecha", + "${mainUrl}/anime-turu/19/M%C3%BCzik" to "Müzik", + "${mainUrl}/anime-turu/23/Okul" to "Okul", + "${mainUrl}/anime-turu/11/Oyun" to "Oyun", + "${mainUrl}/anime-turu/20/Parodi" to "Parodi", + "${mainUrl}/anime-turu/39/Polisiye" to "Polisiye", + "${mainUrl}/anime-turu/40/Psikolojik" to "Psikolojik", + "${mainUrl}/anime-turu/22/Romantizm" to "Romantizm", + "${mainUrl}/anime-turu/21/Samuray" to "Samuray", + "${mainUrl}/anime-turu/42/Seinen" to "Seinen", + "${mainUrl}/anime-turu/6/%C5%9Eeytanlar" to "Şeytanlar", + "${mainUrl}/anime-turu/25/Shoujo" to "Shoujo", + "${mainUrl}/anime-turu/26/Shoujo_Ai" to "Shoujo Ai", + "${mainUrl}/anime-turu/27/Shounen" to "Shounen", + "${mainUrl}/anime-turu/28/Shounen_Ai" to "Shounen Ai", + "${mainUrl}/anime-turu/30/Spor" to "Spor", + "${mainUrl}/anime-turu/31/S%C3%BCper_G%C3%BC%C3%A7ler" to "Süper Güçler", + "${mainUrl}/anime-turu/13/Tarihi" to "Tarihi", + "${mainUrl}/anime-turu/29/Uzay" to "Uzay", + "${mainUrl}/anime-turu/32/Vampir" to "Vampir", + "${mainUrl}/anime-turu/33/Yaoi" to "Yaoi", + "${mainUrl}/anime-turu/36/Ya%C5%9Famdan_Kesitler" to "Yaşamdan Kesitler", + "${mainUrl}/anime-turu/34/Yuri" to "Yuri", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data).document + val home = document.select("div#orta-icerik div.panel").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("div.panel-title a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("div.panel-title a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("data-src")) + + return newAnimeSearchResponse(title, href, TvType.Anime) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.post("${mainUrl}/arama", data=mapOf("arama" to query)).document + + return document.select("div#orta-icerik div.panel").mapNotNull { it.toMainPageResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div#detayPaylas div.panel-title")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div#detayPaylas div.imaj img")?.attr("data-src")) + val description = document.selectFirst("div#detayPaylas p.ozet")?.text()?.trim() + val year = document.selectFirst("div#detayPaylas a[href*='yil/']")?.attr("href")?.substringAfter("yil/")?.toIntOrNull() + val tags = document.select("div#animedetay a[href*='anime-turu']").map { it.text() } + val rating = document.selectFirst("span.puan")?.text()?.trim()?.toRatingInt() + + val bolumlerUrl = fixUrlNull(document.selectFirst("a[data-url*='ajax/bolumler&animeId=']")?.attr("data-url")) ?: return null + val bolumlerDoc = app.get( + bolumlerUrl, + headers = mapOf( + "X-Requested-With" to "XMLHttpRequest", + "token" to document.selectFirst("meta[name='_token']")!!.attr("content") + ), + cookies = mapOf("yasOnay" to "1") + ).document + + val episodes = bolumlerDoc.select("div#bolum-list li").mapNotNull { + val epHref = fixUrlNull(it.selectFirst("a[href*='/video/']")?.attr("href")) ?: return@mapNotNull null + val epName = it.selectFirst("span.bolumAdi")?.text()?.trim() ?: return@mapNotNull null + val epSeason = 1 + val epTitle = it.selectFirst("a[href*='/video/']")?.attr("title")?.trim() ?: return@mapNotNull null + val epEpisode = Regex("""(\d+). Bölüm""").find(epTitle)?.groupValues?.get(1)?.toIntOrNull() ?: 1 + + newEpisode(epHref) { + this.name = epName + this.season = epSeason + this.episode = epEpisode + } + } + + return newTvSeriesLoadResponse(title, url, TvType.Anime, episodes) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + } + } + + private fun iframe2AesLink(iframe: String): String? { + var aesData = iframe.substringAfter("embed/#/url/").substringBefore("?status") + aesData = String(Base64.decode(aesData, Base64.DEFAULT)) + + val aesKey = "710^8A@3@>T2}#zN5xK?kR7KNKb@-A!LzYL5~M1qU0UfdWsZoBm4UUat%}ueUv6E--*hDPPbH7K2bp9^3o41hw,khL:}Kx8080@M" + val aesLink = AesHelper.cryptoAESHandler(aesData, aesKey.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt") + + return fixUrlNull(aesLink.replace("\"", "")) + } + + private suspend fun iframe2Load(document: Document, @Suppress("UNUSED_PARAMETER") iframe: String, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + // val mainVideo = iframe2AesLink(iframe) + // if (mainVideo != null) { + // val mainKey = mainVideo.split("/").last() + // val mainAPI = app.get( + // "${mainUrl}/sources/${mainKey}/true", + // headers = mapOf( + // "Content-Type" to "application/json", + // "X-Requested-With" to "XMLHttpRequest", + // "Csrf-Token" to "EqdGHqwZJvydjfbmuYsZeGvBxDxnQXeARRqUNbhRYnPEWqdDnYFEKVBaUPCAGTZA", + // "Connection" to "keep-alive", + // "Sec-Fetch-Dest" to "empty", + // "Sec-Fetch-Mode" to "cors", + // "Sec-Fetch-Site" to "same-origin", + // "Pragma" to "no-cache", + // "Cache-Control" to "no-cache", + // ), + // referer = mainVideo, + // cookies = mapOf("yasOnay" to "1") + // ).text + + // val m3uLink = fixUrlNull(Regex("""file\":\"([^\"]+)""").find(mainAPI)?.groupValues?.get(1)?.replace("\\", "")) + // Log.d("TRANM", "m3uLink » ${m3uLink}") + + // if (m3uLink != null) { + // callback.invoke( + // ExtractorLink( + // source = this.name, + // name = this.name, + // url = m3uLink, + // referer = "${mainVideo}", + // quality = Qualities.Unknown.value, + // isM3u8 = true, + // ) + // ) + // } + // } + + for (button in document.select("button[onclick*='ajax/videosec']")) { + val butonLink = fixUrlNull(button.attr("onclick").substringAfter("IndexIcerik('").substringBefore("'")) ?: continue + val butonName = button.ownText().trim() + val subDoc = app.get(butonLink, headers=mapOf("X-Requested-With" to "XMLHttpRequest")).document + + val subFrame = fixUrlNull(subDoc.selectFirst("iframe")?.attr("src")) ?: continue + val subLink = iframe2AesLink(subFrame) ?: continue + Log.d("TRANM", "$butonName » $subLink") + + loadExtractor(subLink, "${mainUrl}/", subtitleCallback, callback) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("TRANM", "data » $data") + val document = app.get(data).document + val iframe = fixUrlNull(document.selectFirst("iframe")?.attr("src")) ?: return false + + if (iframe.contains("a-ads.com")) { + for (button in document.select("button[onclick*='ajax/videosec']")) { + val butonLink = fixUrlNull(button.attr("onclick").substringAfter("IndexIcerik('").substringBefore("'")) ?: continue + val subDoc = app.get(butonLink, headers=mapOf("X-Requested-With" to "XMLHttpRequest")).document + + val subFrame = fixUrlNull(subDoc.selectFirst("iframe")?.attr("src")) ?: continue + iframe2Load(subDoc, subFrame, subtitleCallback, callback) + } + } else { + iframe2Load(document, iframe, subtitleCallback, callback) + } + + return true + } +} \ No newline at end of file diff --git a/TurkAnime/src/main/kotlin/com/keyiflerolsun/TurkAnimePlugin.kt b/TurkAnime/src/main/kotlin/com/keyiflerolsun/TurkAnimePlugin.kt new file mode 100644 index 0000000000..c3262587d9 --- /dev/null +++ b/TurkAnime/src/main/kotlin/com/keyiflerolsun/TurkAnimePlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class TurkAnimePlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(TurkAnime()) + } +} \ No newline at end of file diff --git a/UgurFilm/build.gradle.kts b/UgurFilm/build.gradle.kts new file mode 100644 index 0000000000..296dcb0b10 --- /dev/null +++ b/UgurFilm/build.gradle.kts @@ -0,0 +1,18 @@ +version = 3 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Yabancı film izle, Türkçe dublaj ve Türkçe altyazılı film seçenekleriyle 720p ve 1080p HD kalitesinde film izle - Uğur Film full hd film izle." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=ugurfilm7.com&sz=%size%" +} diff --git a/UgurFilm/src/main/AndroidManifest.xml b/UgurFilm/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/UgurFilm/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/UgurFilm/src/main/kotlin/com/keyiflerolsun/MailRuExtractor.kt b/UgurFilm/src/main/kotlin/com/keyiflerolsun/MailRuExtractor.kt new file mode 100644 index 0000000000..056e893555 --- /dev/null +++ b/UgurFilm/src/main/kotlin/com/keyiflerolsun/MailRuExtractor.kt @@ -0,0 +1,53 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class MailRu : ExtractorApi() { + override val name = "MailRu" + override val mainUrl = "https://my.mail.ru" + override val requiresReferer = false + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + Log.d("Kekik_${this.name}", "url » $url") + + val vidId = url.substringAfter("video/embed/").trim() + val videoReq = app.get("${mainUrl}/+/video/meta/${vidId}", referer=url) + val videoKey = videoReq.cookies["video_key"].toString() + Log.d("Kekik_${this.name}", "videoKey » $videoKey") + + val videoData = AppUtils.tryParseJson<MailRuData>(videoReq.text) ?: throw ErrorLoadingException("Video not found") + + for (video in videoData.videos) { + Log.d("Kekik_${this.name}", "video » $video") + + val videoUrl = if (video.url.startsWith("//")) "https:${video.url}" else video.url + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = videoUrl, + referer = url, + headers = mapOf("Cookie" to "video_key=${videoKey}"), + quality = getQualityFromName(video.key), + isM3u8 = false + ) + ) + } + } + + data class MailRuData( + @JsonProperty("provider") val provider: String, + @JsonProperty("videos") val videos: List<MailRuVideoData> + ) + + data class MailRuVideoData( + @JsonProperty("url") val url: String, + @JsonProperty("key") val key: String + ) +} diff --git a/UgurFilm/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt b/UgurFilm/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt new file mode 100644 index 0000000000..7de693da8f --- /dev/null +++ b/UgurFilm/src/main/kotlin/com/keyiflerolsun/OdnoklassnikiExtractor.kt @@ -0,0 +1,60 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.fasterxml.jackson.annotation.JsonProperty + +open class Odnoklassniki : ExtractorApi() { + override val name = "Odnoklassniki" + override val mainUrl = "https://odnoklassniki.ru" + override val requiresReferer = false + + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + Log.d("Kekik_${this.name}", "url » $url") + + val userAgent = mapOf("User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36") + + val videoReq = app.get(url, headers=userAgent).text.replace("\\"", "\"").replace("\\\\", "\\") + .replace(Regex("\\\\u([0-9A-Fa-f]{4})")) { matchResult -> + Integer.parseInt(matchResult.groupValues[1], 16).toChar().toString() + } + val videosStr = Regex(""""videos":(\[[^]]*])""").find(videoReq)?.groupValues?.get(1) ?: throw ErrorLoadingException("Video not found") + val videos = AppUtils.tryParseJson<List<OkRuVideo>>(videosStr) ?: throw ErrorLoadingException("Video not found") + + for (video in videos) { + Log.d("Kekik_${this.name}", "video » $video") + + val videoUrl = if (video.url.startsWith("//")) "https:${video.url}" else video.url + + val quality = video.name.uppercase() + .replace("MOBILE", "144p") + .replace("LOWEST", "240p") + .replace("LOW", "360p") + .replace("SD", "480p") + .replace("HD", "720p") + .replace("FULL", "1080p") + .replace("QUAD", "1440p") + .replace("ULTRA", "4k") + + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = videoUrl, + referer = url, + quality = getQualityFromName(quality), + headers = userAgent, + isM3u8 = false + ) + ) + } + } + + data class OkRuVideo( + @JsonProperty("name") val name: String, + @JsonProperty("url") val url: String, + ) +} diff --git a/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilm.kt b/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilm.kt new file mode 100644 index 0000000000..16fdae072d --- /dev/null +++ b/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilm.kt @@ -0,0 +1,128 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors + +class UgurFilm : MainAPI() { + override var mainUrl = "https://ugurfilm8.com" + override var name = "UgurFilm" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/turkce-altyazili-filmler/page/" to "Türkçe Altyazılı Filmler", + "${mainUrl}/yerli-filmler/page/" to "Yerli Filmler", + "${mainUrl}/en-cok-izlenen-filmler/page/" to "En Çok İzlenen Filmler", + "${mainUrl}/category/kisa-film/page/" to "Kısa Film", + "${mainUrl}/category/aksiyon/page/" to "Aksiyon", + "${mainUrl}/category/bilim-kurgu/page/" to "Bilim Kurgu", + "${mainUrl}/category/belgesel/page/" to "Belgesel", + "${mainUrl}/category/komedi/page/" to "Komedi", + "${mainUrl}/category/kara-film/page/" to "Kara Film", + "${mainUrl}/category/erotik/page/" to "Erotik", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.icerik div").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("span:nth-child(1)")?.text()?.trim() ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newTvSeriesSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/?s=${query}").document + + return document.select("div.icerik div").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.bilgi h2")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.resim img")?.attr("src")) + val year = document.selectFirst("a[href*='/yil/']")?.text()?.trim()?.toIntOrNull() + val description = document.selectFirst("div.slayt-aciklama")?.text()?.trim() + val tags = document.select("p.tur a[href*='/category/']").map { it.text() } + val rating = document.selectFirst("span.puan")?.text()?.split(" ")?.last()?.toRatingInt() + val duration = document.selectXpath("//span[contains(text(), 'Süre:')]//following-sibling::b").text().split(" ")[0].trim().toIntOrNull() + val actors = document.select("li.oyuncu-k").map { + Actor(it.selectFirst("span")!!.text(), it.selectFirst("img")?.attr("src")) + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("UGF", "data » $data") + val mainDocument = app.get(data).document + + mainDocument.select("li.parttab a").forEach { + val subUrl = fixUrlNull(it.attr("href")) ?: return false + val document = app.get(subUrl).document + + val iframe = fixUrlNull(document.selectFirst("div#vast iframe")?.attr("src")) ?: return@forEach + Log.d("UGF", "iframe » $iframe") + + if (iframe.contains(mainUrl)) { + val kaynaklar = app.get(iframe, referer=data).document.select("li.c-dropdown__item").associate { kaynak -> + kaynak.attr("data-dropdown-value") to kaynak.attr("data-order-value") + } + Log.d("UGF", "kaynaklar » $kaynaklar") + + val vidId = iframe.substringAfter("/play.php?vid=").trim() + Log.d("UGF", "vidId » $vidId") + + val yuklenenler = mutableListOf<String>() + + for ((kaynak, order) in kaynaklar) { + Log.d("UGF", "kaynak » $kaynak | order » $order") + + val playerApi = app.post( + "${mainUrl}/player/ajax_sources.php", + data = mapOf( + "vid" to vidId, + "alternative" to kaynak, + "ord" to order + ) + ).text + val playerData = AppUtils.tryParseJson<AjaxSource>(playerApi) ?: continue + Log.d("UGF", "playerData » $playerData") + + if (playerData.iframe in yuklenenler) continue + + yuklenenler.add(playerData.iframe) + loadExtractor(playerData.iframe, "${mainUrl}/", subtitleCallback, callback) + } + } else { + loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + } + } + + return true + } +} \ No newline at end of file diff --git a/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilmModels.kt b/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilmModels.kt new file mode 100644 index 0000000000..4824dbbfe4 --- /dev/null +++ b/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilmModels.kt @@ -0,0 +1,12 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class AjaxSource( + @JsonProperty("status") val status: String, + @JsonProperty("iframe") val iframe: String, + @JsonProperty("alternative") val alternative: String, +) \ No newline at end of file diff --git a/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilmPlugin.kt b/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilmPlugin.kt new file mode 100644 index 0000000000..fff190742b --- /dev/null +++ b/UgurFilm/src/main/kotlin/com/keyiflerolsun/UgurFilmPlugin.kt @@ -0,0 +1,14 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class UgurFilmPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(UgurFilm()) + registerExtractorAPI(MailRu()) + registerExtractorAPI(Odnoklassniki()) + } +} \ No newline at end of file diff --git a/UncutMaza/build.gradle.kts b/UncutMaza/build.gradle.kts new file mode 100644 index 0000000000..b953002ad1 --- /dev/null +++ b/UncutMaza/build.gradle.kts @@ -0,0 +1,18 @@ +version = 3 + +cloudstream { + authors = listOf("coxju") + language = "hi" + description = "(VPN) We Provide Huge Colocation of Hindi Porn (Uncut) Web Series" + + /** + * 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=uncutmaza.cc&sz=%size%" +} \ No newline at end of file diff --git a/UncutMaza/src/main/AndroidManifest.xml b/UncutMaza/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/UncutMaza/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/UncutMaza/src/main/kotlin/com/keyiflerolsun/UncutMaza.kt b/UncutMaza/src/main/kotlin/com/keyiflerolsun/UncutMaza.kt new file mode 100644 index 0000000000..2e7acb2cb9 --- /dev/null +++ b/UncutMaza/src/main/kotlin/com/keyiflerolsun/UncutMaza.kt @@ -0,0 +1,96 @@ +// ! https://codeberg.org/coxju/cs-ext-coxju/src/branch/master/UncutMaza/src/main/kotlin/com/coxju/UncutMaza.kt + +package com.keyiflerolsun + +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +class UncutMaza : MainAPI() { + override var mainUrl = "https://uncutmaza.cc" + override var name = "UncutMaza" + override val hasMainPage = true + override var lang = "hi" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.NSFW) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/page/" to "Home", + "${mainUrl}/category/niks-indian-porn/page/" to "Niks Indian" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data + page).document + val home = document.select("div.videos-list > article.post").mapNotNull { it.toSearchResult() } + + return newHomePageResponse( + list = HomePageList( + name = request.name, + list = home, + isHorizontalImages = true + ), + hasNext = true + ) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = fixTitle(this.select("a").attr("title")) + val href = fixUrlNull(this.select("a").attr("href")) ?: return null + val posterUrl = fixUrlNull(this.select("a > div.post-thumbnail>div.post-thumbnail-container>img").attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.NSFW) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val searchResponse = mutableListOf<SearchResponse>() + + for (i in 1..5) { + val document = app.get("${mainUrl}/page/$i?s=$query").document + + val results = document.select("article.post").mapNotNull { it.toSearchResult() } + + if (!searchResponse.containsAll(results)) { + searchResponse.addAll(results) + } else { + break + } + + if (results.isEmpty()) break + } + + return searchResponse + } + + override suspend fun load(url: String): LoadResponse { + val document = app.get(url).document + + val title = document.selectFirst("meta[property=og:title]")?.attr("content")?.trim().toString() + val poster = fixUrlNull(document.selectFirst("meta[property=og:image]")?.attr("content").toString()) + val description = document.selectFirst("meta[property=og:description]")?.attr("content")?.trim() + + return newMovieLoadResponse(title, url, TvType.NSFW, url) { + this.posterUrl = poster + this.plot = description + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + val document = app.get(data).document + + document.select("div.video-player").map { res -> + callback.invoke( + ExtractorLink( + source = this.name, + name = this.name, + url = fixUrl(res.selectFirst("meta[itemprop=contentURL]")?.attr("content")?.trim().toString()), + referer = data, + quality = Qualities.Unknown.value, + type = INFER_TYPE + ) + ) + } + + return true + } +} \ No newline at end of file diff --git a/UncutMaza/src/main/kotlin/com/keyiflerolsun/UncutMazaProvider.kt b/UncutMaza/src/main/kotlin/com/keyiflerolsun/UncutMazaProvider.kt new file mode 100644 index 0000000000..86525287b1 --- /dev/null +++ b/UncutMaza/src/main/kotlin/com/keyiflerolsun/UncutMazaProvider.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class UncutMazaProvider: Plugin() { + override fun load(context: Context) { + registerMainAPI(UncutMaza()) + } +} \ No newline at end of file diff --git a/Watch2Movies/build.gradle.kts b/Watch2Movies/build.gradle.kts new file mode 100644 index 0000000000..7d640d7da9 --- /dev/null +++ b/Watch2Movies/build.gradle.kts @@ -0,0 +1,18 @@ +version = 0 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "en" + description = "!!! YAPIM AŞAMASINDA !!! Watch2Movies is a Free Movies streaming site with zero ads. We let you watch movies online without having to register or paying, with over 10000 movies and TV-Series. You can also Download full movies from Watch2Movies and watch it later if you want." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 3 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=watch2movies.net&sz=%size%" +} \ No newline at end of file diff --git a/Watch2Movies/src/main/AndroidManifest.xml b/Watch2Movies/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/Watch2Movies/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/Watch2Movies/src/main/kotlin/com/keyiflerolsun/W2MExtractor.kt b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/W2MExtractor.kt new file mode 100644 index 0000000000..16bd5657be --- /dev/null +++ b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/W2MExtractor.kt @@ -0,0 +1,109 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.annotation.SuppressLint +import android.content.Context +import android.webkit.WebResourceRequest +import android.webkit.WebResourceResponse +import android.webkit.WebSettings +import android.webkit.WebView +import android.webkit.WebViewClient +import com.lagradost.api.Log +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.withContext +import java.io.BufferedReader +import java.io.InputStreamReader +import java.net.HttpURLConnection +import java.net.URL + +open class W2MExtractor(override val mainUrl: String, private val context: Context) : ExtractorApi() { + override val name = "W2MExtractor" + override val requiresReferer = true + private lateinit var webView: WebView + + @SuppressLint("SetJavaScriptEnabled") + override suspend fun getUrl(url: String, referer: String?, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit) { + withContext(Dispatchers.Main) { + webView = WebView(context).apply { + settings.apply { + javaScriptEnabled = true + domStorageEnabled = true + javaScriptCanOpenWindowsAutomatically = true + loadWithOverviewMode = true + useWideViewPort = true + allowFileAccess = true + builtInZoomControls = true + displayZoomControls = false + allowContentAccess = true + mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW + userAgentString = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" + } + + evaluateJavascript( + """ +Object.defineProperty(navigator, 'webdriver', { get: () => undefined }); +Object.defineProperty(navigator, 'platform', { get: () => 'Win32' }); +Object.defineProperty(navigator, 'language', { get: () => 'en-US' }); +window.chrome = { runtime: {} }; +""".trimIndent() + ) {} + + webViewClient = object : WebViewClient() { + override fun shouldInterceptRequest(view: WebView?, request: WebResourceRequest?): WebResourceResponse? { + @Suppress("NAME_SHADOWING") val url = request?.url.toString() + val headers = request?.requestHeaders + + Thread { + fetchAndCheckResponse(url, headers) { sourceUrl, headers -> + callback.invoke( + ExtractorLink( + source = this@W2MExtractor.name, + name = this@W2MExtractor.name, + url = sourceUrl, + referer = headers["Referer"] ?: headers["referer"] ?: mainUrl, + quality = Qualities.Unknown.value, + type = ExtractorLinkType.M3U8, + headers = headers + ) + ) + } + }.start() + + return super.shouldInterceptRequest(view, request) + } + } + + loadUrl(url) + } + } + + delay(10_000) + } + + private fun fetchAndCheckResponse(url: String, headers: Map<String, String>?, onResponseCaptured: (url: String, headers: Map<String, String>) -> Unit) { + try { + val connection = URL(url).openConnection() as HttpURLConnection + connection.requestMethod = "GET" + + headers?.forEach { (key, value) -> + connection.setRequestProperty(key, value) + } + + connection.connect() + val response = BufferedReader(InputStreamReader(connection.inputStream)) + .lineSequence() + .joinToString("\n") + + if (response.startsWith("#EXTM3U")) { + Log.d("W2M", response) + onResponseCaptured(connection.url.toString(), headers ?: mapOf()) + } + } catch (e: Exception) { + e.printStackTrace() + } + } +} \ No newline at end of file diff --git a/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2Movies.kt b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2Movies.kt new file mode 100644 index 0000000000..0e390b1d70 --- /dev/null +++ b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2Movies.kt @@ -0,0 +1,151 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class Watch2Movies : MainAPI() { + override var mainUrl = "https://watch2movies.net" + override var name = "Watch2Movies" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/genre/action?page=" to "Action", + "${mainUrl}/genre/action-adventure?page=" to "Action & Adventure", + "${mainUrl}/genre/adventure?page=" to "Adventure", + "${mainUrl}/genre/animation?page=" to "Animation", + "${mainUrl}/genre/biography?page=" to "Biography", + "${mainUrl}/genre/comedy?page=" to "Comedy", + "${mainUrl}/genre/crime?page=" to "Crime", + "${mainUrl}/genre/documentary?page=" to "Documentary", + "${mainUrl}/genre/drama?page=" to "Drama", + "${mainUrl}/genre/family?page=" to "Family", + "${mainUrl}/genre/fantasy?page=" to "Fantasy", + "${mainUrl}/genre/history?page=" to "History", + "${mainUrl}/genre/horror?page=" to "Horror", + "${mainUrl}/genre/kids?page=" to "Kids", + "${mainUrl}/genre/music?page=" to "Music", + "${mainUrl}/genre/mystery?page=" to "Mystery", + "${mainUrl}/genre/news?page=" to "News", + "${mainUrl}/genre/reality?page=" to "Reality", + "${mainUrl}/genre/romance?page=" to "Romance", + "${mainUrl}/genre/sci-fi-fantasy?page=" to "Sci-Fi & Fantasy", + "${mainUrl}/genre/science-fiction?page=" to "Science Fiction", + "${mainUrl}/genre/soap?page=" to "Soap", + "${mainUrl}/genre/talk?page=" to "Talk", + "${mainUrl}/genre/thriller?page=" to "Thriller", + "${mainUrl}/genre/tv-movie?page=" to "TV Movie", + "${mainUrl}/genre/war?page=" to "War", + "${mainUrl}/genre/war-politics?page=" to "War & Politics", + "${mainUrl}/genre/western?page=" to "Western", + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}${page}").document + val home = document.select("div.flw-item").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("h2 a")?.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 } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/search/${query}").document + + return document.select("div.flw-item").mapNotNull { it.toMainPageResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("div.dp-i-content h2 a")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("meta[property=og:image]")?.attr("content")) + val description = document.selectFirst("meta[property=og:description]")?.attr("content")?.trim() + val year = document.select("div.row-line") + .firstOrNull { it.text().contains("Released:") } + ?.text() + ?.substringAfter("Released:") + ?.trim() + ?.split("-")?.firstOrNull() + ?.toIntOrNull() + + val tags = document.select("div.row-line a[href*='/genre/']").map { it.text() } + val rating = document.selectFirst("button.btn-imdb")?.text()?.trim()?.split(" ")?.last()?.toRatingInt() + val duration = document.select("div.row-line") + .firstOrNull { it.text().contains("Duration:") } + ?.text() + ?.substringAfter("Duration:") + ?.replace("min", "") + ?.trim() + ?.toIntOrNull() + val recommendations = document.select("div.flw-item").mapNotNull { it.toRecommendationResult() } + val actors = document.select("div.row-line a[href*='/cast/']").map { Actor(it.text()) } + val trailer = document.selectFirst("iframe#iframe-trailer")?.attr("data-src") + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } + + private fun Element.toRecommendationResult(): SearchResponse? { + val title = this.selectFirst("h3 a")?.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 } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("W2M", "data » $data") + val epId = data.split("-").last() + val document = app.get("${mainUrl}/ajax/episode/list/${epId}", referer=data).document + + document.select("li.nav-item a").forEach { + val dataId = it.attr("data-linkid") + Log.d("W2M", "dataId » $dataId") + loadExtractor("${data}.${dataId}", "${mainUrl}/", subtitleCallback, callback) + + // val dataSource = app.get("${mainUrl}/ajax/episode/sources/${dataId}", referer=data).parsedSafe<Sources>() + // Log.d("W2M", "iframe » ${dataSource!!.link}") + + // // ?   master  adb logcat -v tag | logcat-colorize | grep "W2M" + // // ! D W2M data » https://watch2movies.net/movie/watch-ferry-2-full-118828 + // // * D W2M iframe » https://hanatyury.online/v2/embed-4/NDCSpcJUwFUT?z= + // // * D W2M iframe » https://pepepeyo.xyz/v2/embed-4/MfDjL0xjrfrX?z= + // // ! D W2M data » https://watch2movies.net/movie/watch-adam-full-1542 + // // * D W2M iframe » https://hanatyury.online/v2/embed-4/0DMRS34RzDzF?z= + // // * D W2M iframe » https://hanatyury.online/v2/embed-4/j3MXnGNwTkdx?z= + // // * D W2M iframe » https://upstream.to/embed-tigfkb1a9wol.html + // // * D W2M iframe » https://mixdrop.co/e/kn98qnk6h3k9wv + + // // TODO: Extractors not coded yet » UpCloudExtractor.kt + // loadExtractor(dataSource!!.link, "${mainUrl}/", subtitleCallback, callback) + } + + return true + } +} \ No newline at end of file diff --git a/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2MoviesModels.kt b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2MoviesModels.kt new file mode 100644 index 0000000000..24feb2f66b --- /dev/null +++ b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2MoviesModels.kt @@ -0,0 +1,15 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +@Suppress("unused") +data class Sources( + @JsonProperty("type") val type: String, + @JsonProperty("link") val link: String, + @JsonProperty("sources") val sources: List<String?>, + @JsonProperty("tracks") val tracks: List<String?>, + @JsonProperty("title") val title: String +) \ No newline at end of file diff --git a/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2MoviesPlugin.kt b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2MoviesPlugin.kt new file mode 100644 index 0000000000..cd2de0c597 --- /dev/null +++ b/Watch2Movies/src/main/kotlin/com/keyiflerolsun/Watch2MoviesPlugin.kt @@ -0,0 +1,16 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class Watch2MoviesPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(Watch2Movies()) + registerExtractorAPI(W2MExtractor("https://hanatyury.online/", context)) + registerExtractorAPI(W2MExtractor("https://pepepeyo.xyz/", context)) + registerExtractorAPI(W2MExtractor("https://zizicoi.online/", context)) + registerExtractorAPI(W2MExtractor("https://watch2movies.net/", context)) + } +} \ No newline at end of file diff --git a/WebteIzle/build.gradle.kts b/WebteIzle/build.gradle.kts new file mode 100644 index 0000000000..086624c7d8 --- /dev/null +++ b/WebteIzle/build.gradle.kts @@ -0,0 +1,18 @@ +version = 15 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Her türlü filmi ister dublaj ister altyazılı, en kaliteli bir şekilde izleyebileceğiniz arşivi en geniş gerçek film izleme siteniz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=webteizle2.com&sz=%size%" +} diff --git a/WebteIzle/src/main/AndroidManifest.xml b/WebteIzle/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/WebteIzle/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzle.kt b/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzle.kt new file mode 100644 index 0000000000..deb15e97b2 --- /dev/null +++ b/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzle.kt @@ -0,0 +1,288 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue +import com.lagradost.cloudstream3.Actor +import com.lagradost.cloudstream3.HomePageResponse +import com.lagradost.cloudstream3.LoadResponse +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer +import com.lagradost.cloudstream3.MainAPI +import com.lagradost.cloudstream3.MainPageRequest +import com.lagradost.cloudstream3.SearchResponse +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.TvType +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.fixUrl +import com.lagradost.cloudstream3.fixUrlNull +import com.lagradost.cloudstream3.mainPageOf +import com.lagradost.cloudstream3.network.CloudflareKiller +import com.lagradost.cloudstream3.newHomePageResponse +import com.lagradost.cloudstream3.newMovieLoadResponse +import com.lagradost.cloudstream3.newMovieSearchResponse +import com.lagradost.cloudstream3.toRatingInt +import com.lagradost.cloudstream3.utils.AppUtils +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.Qualities +import com.lagradost.cloudstream3.utils.getQualityFromName +import com.lagradost.cloudstream3.utils.loadExtractor +import okhttp3.Interceptor +import okhttp3.Response +import org.jsoup.Jsoup +import org.jsoup.nodes.Element +import java.net.URLEncoder + +class WebteIzle : MainAPI() { + override var mainUrl = "https://webteizle.click" + override var name = "WebteIzle" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + // ! CloudFlare bypass + override var sequentialMainPage = true // * https://recloudstream.github.io/dokka/-cloudstream/com.lagradost.cloudstream3/-main-a-p-i/index.html#-2049735995%2FProperties%2F101969414 + override var sequentialMainPageDelay = 50L // ? 0.05 saniye + override var sequentialMainPageScrollDelay = 50L // ? 0.05 saniye + + // ! CloudFlare v2 + private val cloudflareKiller by lazy { CloudflareKiller() } + private val interceptor by lazy { CloudflareInterceptor(cloudflareKiller) } + + class CloudflareInterceptor(private val cloudflareKiller: CloudflareKiller): Interceptor { + override fun intercept(chain: Interceptor.Chain): Response { + val request = chain.request() + val response = chain.proceed(request) + val doc = Jsoup.parse(response.peekBody(1024 * 1024).string()) + + if (doc.text().contains("Just a moment")) { + return cloudflareKiller.intercept(chain) + } + + return response + } + } + + override val mainPage = mainPageOf( + "${mainUrl}/film-izle/" to "Güncel", + "${mainUrl}/yeni-filmler/" to "Yeni", + "${mainUrl}/tavsiye-filmler/" to "Tavsiye", + "${mainUrl}/filtre/SAYFA?tur=Aile" to "Aile", + "${mainUrl}/filtre/SAYFA?tur=Aksiyon" to "Aksiyon", + "${mainUrl}/filtre/SAYFA?tur=Animasyon" to "Animasyon", + "${mainUrl}/filtre/SAYFA?tur=Belgesel" to "Belgesel", + "${mainUrl}/filtre/SAYFA?tur=Bilim-Kurgu" to "Bilim Kurgu", + "${mainUrl}/filtre/SAYFA?tur=Biyografi" to "Biyografi", + "${mainUrl}/filtre/SAYFA?tur=Dram" to "Dram", + "${mainUrl}/filtre/SAYFA?tur=Fantastik" to "Fantastik", + "${mainUrl}/filtre/SAYFA?tur=Gerilim" to "Gerilim", + "${mainUrl}/filtre/SAYFA?tur=Gizem" to "Gizem", + "${mainUrl}/filtre/SAYFA?tur=Komedi" to "Komedi", + "${mainUrl}/filtre/SAYFA?tur=Korku" to "Korku", + "${mainUrl}/filtre/SAYFA?tur=Macera" to "Macera", + "${mainUrl}/filtre/SAYFA?tur=Romantik" to "Romantik", + "${mainUrl}/filtre/SAYFA?tur=Spor" to "Spor", + "${mainUrl}/filtre/SAYFA?tur=Tarihi" to "Tarihi", + "${mainUrl}/filtre/SAYFA?tur=Western" to "Western" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val url = if ("SAYFA" in request.data) request.data.replace("SAYFA", "$page") else "${request.data}$page" + val document = app.get(url).document + val home = document.select("div.golgever").mapNotNull { it.toSearchResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("div.filmname")?.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 } + } + + override suspend fun search(query: String): List<SearchResponse> { + @Suppress("NAME_SHADOWING", "BlockingMethodInNonBlockingContext") val query = URLEncoder.encode(query, "ISO-8859-9") + + val document = app.get( + "${mainUrl}/filtre?a=${query}", + referer = "${mainUrl}/", + interceptor = interceptor + ).document + + return document.select("div.golgever").mapNotNull { it.toSearchResult() } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("[property='og:title']")?.attr("content")?.substringBefore(" izle") ?: return null + val poster = fixUrlNull(document.selectFirst("div.card img")?.attr("data-src")) + val year = document.selectXpath("//td[contains(text(), 'Vizyon')]/following-sibling::td").text().trim().split(" ").last().toIntOrNull() + val description = document.selectFirst("blockquote")?.text()?.trim() + val tags = document.selectXpath("//a[@itemgroup='genre']").map { it.text() } + val rating = document.selectFirst("div.detail")?.text()?.trim()?.replace(",", ".").toRatingInt() + val duration = document.selectXpath("//td[contains(text(), 'Süre')]/following-sibling::td").text().trim().split(" ").first().toIntOrNull() + val trailer = document.selectFirst("button#fragman")?.attr("data-ytid") + val actors = document.selectXpath("//div[@data-tab='oyuncular']//a").map { + Actor(it.selectFirst("span")!!.text().trim(), fixUrlNull(it.selectFirst("img")!!.attr("data-src"))) + } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.year = year + this.plot = description + this.tags = tags + this.rating = rating + this.duration = duration + addTrailer("https://www.youtube.com/embed/${trailer}") + addActors(actors) + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("WBTI", "data » $data") + val document = app.get(data).document + + val filmId = document.selectFirst("button#wip")?.attr("data-id") ?: return false + Log.d("WBTI", "filmId » $filmId") + + val dilList = mutableListOf<String>() + if (document.selectFirst("div.golge a[href*=dublaj]")?.attr("src") != null) { + dilList.add("0") + } + + if (document.selectFirst("div.golge a[href*=altyazi]")?.attr("src") != null) { + dilList.add("1") + } + + dilList.forEach { + val dilAd = if (it == "0") "Dublaj" else "Altyazı" + + val playerApi = app.post( + "${mainUrl}/ajax/dataAlternatif3.asp", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf( + "filmid" to filmId, + "dil" to it, + "s" to "", + "b" to "", + "bot" to "0" + ) + ).text + val playerData = AppUtils.tryParseJson<DataAlternatif>(playerApi) ?: return@forEach + + for (thisEmbed in playerData.data) { + val embedApi = app.post( + "${mainUrl}/ajax/dataEmbed.asp", + headers = mapOf("X-Requested-With" to "XMLHttpRequest"), + data = mapOf("id" to thisEmbed.id.toString()) + ).document + + var iframe = fixUrlNull(embedApi.selectFirst("iframe")?.attr("src")) + + if (iframe == null) { + val scriptSource = embedApi.html() + val matchResult = Regex("""(vidmoly|okru|filemoon)\('([\d\w]+)','""").find(scriptSource) + + if (matchResult == null) { + Log.d("WBTI", "scriptSource » $scriptSource") + } else { + val platform = matchResult.groupValues[1] + val vidId = matchResult.groupValues[2] + + iframe = when(platform) { + "vidmoly" -> "https://vidmoly.to/embed-${vidId}.html" + "okru" -> "https://odnoklassniki.ru/videoembed/${vidId}" + "filemoon" -> "https://filemoon.sx/e/${vidId}" + else -> null + } + } + } else if (iframe.contains(mainUrl)) { + Log.d("WBTI", "iframe » $iframe") + val iSource = app.get(iframe, referer=data).text + + val encoded = Regex("""file": "([^"]+)""").find(iSource)?.groupValues?.get(1) ?: continue + val bytes = encoded.split("\\x").filter { str -> str.isNotEmpty() }.map { char -> char.toInt(16).toByte() }.toByteArray() + val m3uLink = String(bytes, Charsets.UTF_8) + Log.d("WBTI", "m3uLink » $m3uLink") + + val trackStr = Regex("""tracks = \[([^]]+)""").find(iSource)?.groupValues?.get(1) + if (trackStr != null) { + val tracks:List<Track> = jacksonObjectMapper().readValue("[${trackStr}]") + + for (track in tracks) { + if (track.file == null || track.label == null) continue + if (track.label.contains("Forced")) continue + + subtitleCallback.invoke( + SubtitleFile( + lang = track.label.replace("\\u0131", "ı").replace("\\u0130", "İ").replace("\\u00fc", "ü").replace("\\u00e7", "ç"), + url = fixUrl(track.file).replace("\\", "") + ) + ) + } + } + + callback.invoke( + ExtractorLink( + source = "$dilAd - ${this.name}", + name = "$dilAd - ${this.name}", + url = m3uLink, + referer = "${mainUrl}/", + quality = getQualityFromName("1440p"), + isM3u8 = true + ) + ) + + continue + } else if (iframe.contains("playerjs-three.vercel.app") || iframe.contains("cstkcstk.github.io")) { + val decoded = iframe.substringAfter("&v=").let { query -> + val hexString = query.replace("\\x", "") + val bytes = hexString.chunked(2).map { chunk -> chunk.toInt(16).toByte() }.toByteArray() + + bytes.toString(Charsets.UTF_8) + } + + callback.invoke( + ExtractorLink( + source = "$dilAd - ${this.name}", + name = "$dilAd - ${this.name}", + url = fixUrl(decoded), + referer = "${mainUrl}/", + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + } + + if (iframe != null) { + Log.d("WBTI", "iframe » $iframe") + loadExtractor(iframe, "${mainUrl}/", subtitleCallback) { link -> + callback.invoke( + ExtractorLink( + source = "$dilAd - ${link.name}", + name = "$dilAd - ${link.name}", + url = link.url, + referer = link.referer, + quality = link.quality, + headers = link.headers, + extractorData = link.extractorData, + type = link.type + ) + ) + } + } + } + } + + + return true + } +} diff --git a/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzleModels.kt b/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzleModels.kt new file mode 100644 index 0000000000..cbe05d6620 --- /dev/null +++ b/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzleModels.kt @@ -0,0 +1,24 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import com.fasterxml.jackson.annotation.JsonProperty + + +data class DataAlternatif( + @JsonProperty("status") val status: String, + @JsonProperty("data") val data: List<EmbedData>, +) + + +data class EmbedData( + @JsonProperty("id") val id: Int, + @JsonProperty("baslik") val baslik: String, + @JsonProperty("kalitesi") val kalitesi: Int, +) + +data class Track( + @JsonProperty("kind") val kind: String?, + @JsonProperty("file") val file: String?, + @JsonProperty("label") val label: String?, +) \ No newline at end of file diff --git a/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzlePlugin.kt b/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzlePlugin.kt new file mode 100644 index 0000000000..b6ea059e65 --- /dev/null +++ b/WebteIzle/src/main/kotlin/com/keyiflerolsun/WebteIzlePlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class WebteIzlePlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(WebteIzle()) + } +} \ No newline at end of file diff --git a/YouTube/build.gradle.kts b/YouTube/build.gradle.kts new file mode 100644 index 0000000000..08522fff09 --- /dev/null +++ b/YouTube/build.gradle.kts @@ -0,0 +1,18 @@ +version = 4 + +cloudstream { + authors = listOf("Cloudburst", "keyiflerolsun") + language = "tr" + description = "YouTube, izlediğiniz videolarla önerilerini iyileştirir. İlginizi çekebilecek içeriklerle dolu bir akış oluşturmak için video izlemeye başlayın." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 + tvTypes = listOf("Others") + iconUrl = "https://www.google.com/s2/favicons?domain=youtube.com&sz=%size%" +} diff --git a/YouTube/src/main/AndroidManifest.xml b/YouTube/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/YouTube/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/YouTube/src/main/kotlin/com/keyiflerolsun/YouTube.kt b/YouTube/src/main/kotlin/com/keyiflerolsun/YouTube.kt new file mode 100644 index 0000000000..b89ef155f6 --- /dev/null +++ b/YouTube/src/main/kotlin/com/keyiflerolsun/YouTube.kt @@ -0,0 +1,132 @@ +// ! https://github.com/recloudstream/extensions/blob/master/InvidiousProvider/src/main/kotlin/recloudstream/InvidiousProvider.kt + +package com.keyiflerolsun + +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson +import com.lagradost.cloudstream3.utils.StringUtils.encodeUri + +class YouTube : MainAPI() { + override var mainUrl = "https://inv.nadeko.net" + override var name = "YouTube" + override val hasMainPage = true + override var lang = "tr" + override val supportedTypes = setOf(TvType.Others) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val trending = tryParseJson<List<SearchEntry>>( + app.get("${mainUrl}/api/v1/trending?region=${lang.uppercase()}&type=news&fields=videoId,title").text + ) + val music = tryParseJson<List<SearchEntry>>( + app.get("${mainUrl}/api/v1/trending?region=${lang.uppercase()}&type=music&fields=videoId,title").text + ) + val movies = tryParseJson<List<SearchEntry>>( + app.get("${mainUrl}/api/v1/trending?region=${lang.uppercase()}&type=movies&fields=videoId,title").text + ) + val gaming = tryParseJson<List<SearchEntry>>( + app.get("${mainUrl}/api/v1/trending?region=${lang.uppercase()}&type=gaming&fields=videoId,title").text + ) + + return newHomePageResponse( + listOf( + HomePageList( + "Trend", + trending?.map { it.toSearchResponse(this) } ?: emptyList(), + true + ), + HomePageList( + "Müzik", + music?.map { it.toSearchResponse(this) } ?: emptyList(), + true + ), + HomePageList( + "Film", + movies?.map { it.toSearchResponse(this) } ?: emptyList(), + true + ), + HomePageList( + "Oyun", + gaming?.map { it.toSearchResponse(this) } ?: emptyList(), + true + ) + ), + false + ) + } + + // this function gets called when you search for something + override suspend fun search(query: String): List<SearchResponse> { + val res = tryParseJson<List<SearchEntry>>( + app.get("${mainUrl}/api/v1/search?q=${query.encodeUri()}®ion=${lang.uppercase()}&page=1&type=video&fields=videoId,title").text + ) + return res?.map { it.toSearchResponse(this) } ?: emptyList() + } + + override suspend fun load(url: String): LoadResponse? { + val videoId = Regex("watch\\?v=([a-zA-Z0-9_-]+)").find(url)?.groupValues?.get(1) + val res = tryParseJson<VideoEntry>( + app.get("${mainUrl}/api/v1/videos/${videoId}?region=${lang.uppercase()}&fields=videoId,title,description,recommendedVideos,author,authorThumbnails,formatStreams").text + ) + return res?.toLoadResponse(this) + } + + private data class SearchEntry(val title: String, val videoId: String) { + fun toSearchResponse(provider: YouTube): SearchResponse { + return provider.newMovieSearchResponse( + title, + "${provider.mainUrl}/watch?v=${videoId}", + TvType.Others + ) { + this.posterUrl = "${provider.mainUrl}/vi/${videoId}/mqdefault.jpg" + } + } + } + + private data class VideoEntry( + val title: String, + val description: String, + val videoId: String, + val recommendedVideos: List<SearchEntry>, + val author: String, + val authorThumbnails: List<Thumbnail> + ) { + suspend fun toLoadResponse(provider: YouTube): LoadResponse { + return provider.newMovieLoadResponse( + title, + "${provider.mainUrl}/watch?v=${videoId}", + TvType.Others, + videoId + ) { + plot = description + posterUrl = "${provider.mainUrl}/vi/${videoId}/hqdefault.jpg" + recommendations = recommendedVideos.map { it.toSearchResponse(provider) } + actors = listOf(ActorData(Actor( + author, + if (authorThumbnails.isNotEmpty()) authorThumbnails.last().url else "" + ))) + } + } + } + + private data class Thumbnail(val url: String) + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + loadExtractor("https://youtube.com/watch?v=${data}", subtitleCallback, callback) + callback( + ExtractorLink( + "YouTube", + "YouTube", + "${mainUrl}/api/manifest/dash/id/${data}", + "", + Qualities.Unknown.value, + false, + mapOf(), + null, + true + ) + ) + return true + } + +} diff --git a/YouTube/src/main/kotlin/com/keyiflerolsun/YouTubePlugin.kt b/YouTube/src/main/kotlin/com/keyiflerolsun/YouTubePlugin.kt new file mode 100644 index 0000000000..218e43deb2 --- /dev/null +++ b/YouTube/src/main/kotlin/com/keyiflerolsun/YouTubePlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class YouTubePlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(YouTube()) + } +} \ No newline at end of file diff --git a/__Temel/build.gradle.kts b/__Temel/build.gradle.kts new file mode 100644 index 0000000000..3756173d04 --- /dev/null +++ b/__Temel/build.gradle.kts @@ -0,0 +1,18 @@ +version = 0 + +cloudstream { + authors = listOf("keyiflerolsun") + language = "tr" + description = "Setfilmizle sitemizde, donma yaşamadan Türkçe dublaj ve altyazılı filmleri ile dizileri muhteşem 1080p full HD kalitesinde izleyebilirsiniz." + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + **/ + status = 1 // will be 3 if unspecified + tvTypes = listOf("Movie") + iconUrl = "https://www.google.com/s2/favicons?domain=www.setfilmizle.de&sz=%size%" +} \ No newline at end of file diff --git a/__Temel/src/main/AndroidManifest.xml b/__Temel/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/__Temel/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/__Temel/src/main/kotlin/com/keyiflerolsun/Temel.kt b/__Temel/src/main/kotlin/com/keyiflerolsun/Temel.kt new file mode 100644 index 0000000000..191237c404 --- /dev/null +++ b/__Temel/src/main/kotlin/com/keyiflerolsun/Temel.kt @@ -0,0 +1,102 @@ +// ! Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +package com.keyiflerolsun + +import android.util.Log +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.LoadResponse.Companion.addActors +import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer + +class Temel : MainAPI() { + override var mainUrl = "https://www.setfilmizle.lol" + override var name = "Temel" + override val hasMainPage = true + override var lang = "tr" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.Movie) + + override val mainPage = mainPageOf( + "${mainUrl}/tur/aile/" to "Aile", + "${mainUrl}/tur/aksiyon/" to "Aksiyon", + "${mainUrl}/tur/animasyon/" to "Animasyon", + "${mainUrl}/tur/belgesel/" to "Belgesel" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get("${request.data}").document + val home = document.select("div.items article").mapNotNull { it.toMainPageResult() } + + return newHomePageResponse(request.name, home) + } + + private fun Element.toMainPageResult(): SearchResponse? { + val title = this.selectFirst("div.flbaslik")?.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 } + } + + override suspend fun search(query: String): List<SearchResponse> { + val document = app.get("${mainUrl}/?s=${query}").document + + return document.select("div.result-item article").mapNotNull { it.toSearchResult() } + } + + private fun Element.toSearchResult(): SearchResponse? { + val title = this.selectFirst("div.title a")?.text() ?: return null + val href = fixUrlNull(this.selectFirst("div.title a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun quickSearch(query: String): List<SearchResponse> = search(query) + + override suspend fun load(url: String): LoadResponse? { + val document = app.get(url).document + + val title = document.selectFirst("h1")?.text()?.trim() ?: return null + val poster = fixUrlNull(document.selectFirst("div.poster img")?.attr("src")) + val description = document.selectFirst("div.wp-content p")?.text()?.trim() + val year = document.selectFirst("div.extra span.C a")?.text()?.trim()?.toIntOrNull() + val tags = document.select("div.sgeneros a").map { it.text() } + val rating = document.selectFirst("span.dt_rating_vgs")?.text()?.trim()?.toRatingInt() + val duration = document.selectFirst("span.runtime")?.text()?.split(" ")?.first()?.trim()?.toIntOrNull() + val recommendations = document.select("div.srelacionados article").mapNotNull { it.toRecommendationResult() } + val actors = document.select("span.valor a").map { Actor(it.text()) } + val trailer = Regex("""embed\/(.*)\?rel""").find(document.html())?.groupValues?.get(1)?.let { "https://www.youtube.com/embed/$it" } + + return newMovieLoadResponse(title, url, TvType.Movie, url) { + this.posterUrl = poster + this.plot = description + this.year = year + this.tags = tags + this.rating = rating + this.duration = duration + this.recommendations = recommendations + addActors(actors) + addTrailer(trailer) + } + } + + private fun Element.toRecommendationResult(): SearchResponse? { + val title = this.selectFirst("a img")?.attr("alt") ?: return null + val href = fixUrlNull(this.selectFirst("a")?.attr("href")) ?: return null + val posterUrl = fixUrlNull(this.selectFirst("a img")?.attr("data-src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + Log.d("STF", "data » ${data}") + val document = app.get(data).document + + // TODO: + // loadExtractor(iframe, "${mainUrl}/", subtitleCallback, callback) + + return true + } +} \ No newline at end of file diff --git a/__Temel/src/main/kotlin/com/keyiflerolsun/TemelPlugin.kt b/__Temel/src/main/kotlin/com/keyiflerolsun/TemelPlugin.kt new file mode 100644 index 0000000000..a8141f9d7b --- /dev/null +++ b/__Temel/src/main/kotlin/com/keyiflerolsun/TemelPlugin.kt @@ -0,0 +1,12 @@ +package com.keyiflerolsun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class TemelPlugin: Plugin() { + override fun load(context: Context) { + registerMainAPI(Temel()) + } +} \ No newline at end of file diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000000..b50f416f83 --- /dev/null +++ b/_config.yml @@ -0,0 +1,4 @@ +# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. + +theme : jekyll-theme-cayman +show_downloads : false \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 24138b41c2..bd845ceeb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,19 +1,19 @@ -import com.lagradost.cloudstream3.gradle.CloudstreamExtension +import com.lagradost.cloudstream3.gradle.CloudstreamExtension import com.android.build.gradle.BaseExtension buildscript { repositories { google() mavenCentral() - // Shitpack repo which contains our tools and dependencies + // Shitpack repo which contains our tools and dependencies maven("https://jitpack.io") } dependencies { - classpath("com.android.tools.build:gradle:7.0.4") + classpath("com.android.tools.build:gradle:8.7.3") // Cloudstream gradle plugin which makes everything work and builds plugins classpath("com.github.recloudstream:gradle:master-SNAPSHOT") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0") } } @@ -36,15 +36,18 @@ subprojects { cloudstream { // when running through github workflow, GITHUB_REPOSITORY should contain current repository name - setRepo(System.getenv("GITHUB_REPOSITORY") ?: "user/repo") + setRepo(System.getenv("GITHUB_REPOSITORY") ?: "https://github.com/keyiflerolsun/Kekik-cloudstream") + + authors = listOf("keyiflerolsun") } android { - compileSdkVersion(30) + namespace = "com.keyiflerolsun" defaultConfig { minSdk = 21 - targetSdk = 30 + compileSdkVersion(35) + targetSdk = 35 } compileOptions { @@ -52,34 +55,40 @@ subprojects { targetCompatibility = JavaVersion.VERSION_1_8 } - tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { - kotlinOptions { - jvmTarget = "1.8" // Required - // Disables some unnecessary features - freeCompilerArgs = freeCompilerArgs + - "-Xno-call-assertions" + - "-Xno-param-assertions" + + tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile> { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8) + freeCompilerArgs.addAll( + listOf( + "-Xno-call-assertions", + "-Xno-param-assertions", "-Xno-receiver-assertions" + ) + ) } } } + dependencies { - val apk by configurations + val cloudstream by configurations val implementation by configurations // Stubs for all Cloudstream classes - apk("com.lagradost:cloudstream3:pre-release") + cloudstream("com.lagradost:cloudstream3:pre-release") // these dependencies can include any of those which are added by the app, // but you dont need to include any of them if you dont need them // https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle - implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc - implementation("com.github.Blatzar:NiceHttp:0.3.2") // http library - implementation("org.jsoup:jsoup:1.13.1") // html parser + implementation(kotlin("stdlib")) // Kotlin'in temel kütüphanesi + implementation("com.github.Blatzar:NiceHttp:0.4.11") // HTTP kütüphanesi + implementation("org.jsoup:jsoup:1.18.3") // HTML ayrıştırıcı + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.16.0") // Kotlin için Jackson JSON kütüphanesi + implementation("com.fasterxml.jackson.core:jackson-databind:2.16.0") // JSON-nesne dönüştürme kütüphanesi + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1") // Kotlin için asenkron işlemler } } task<Delete>("clean") { - delete(rootProject.buildDir) + delete(rootProject.layout.buildDirectory) } diff --git a/gradle.properties b/gradle.properties index 01b80d70cf..c37f95af66 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,4 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true +# org.gradle.java.home=/usr/lib/jvm/java-17-openjdk diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d2f276a43b..7d960c667c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Feb 20 16:26:11 CET 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME \ No newline at end of file diff --git a/repo.json b/repo.json new file mode 100644 index 0000000000..3094f1eb1e --- /dev/null +++ b/repo.json @@ -0,0 +1,8 @@ +{ + "name": "Turkish Providers Repository | @KekikAkademi", + "description": "Türkçe içerikli eklenti havuzu", + "manifestVersion": 1, + "pluginLists": [ + "https://raw.githubusercontent.com/keyiflerolsun/Kekik-cloudstream/builds/plugins.json" + ] +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 43f715c33a..4a0dd0e1ba 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,9 +1,19 @@ rootProject.name = "CloudstreamPlugins" -// This file sets what projects are included. Every time you add a new project, you must add it -// to the includes below. +// This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable. -// Plugins are included like this -include( - "ExampleProvider" -) +val disabled = listOf("__Temel") + +File(rootDir, ".").eachDir { dir -> + if (!disabled.contains(dir.name) && File(dir, "build.gradle.kts").exists()) { + include(dir.name) + } +} + +fun File.eachDir(block: (File) -> Unit) { + listFiles()?.filter { it.isDirectory }?.forEach { block(it) } +} + + +// To only include a single project, comment out the previous lines (except the first one), and include your plugin like so: +// include("PluginName") \ No newline at end of file diff --git a/xHamster/build.gradle.kts b/xHamster/build.gradle.kts new file mode 100644 index 0000000000..6839c92ff6 --- /dev/null +++ b/xHamster/build.gradle.kts @@ -0,0 +1,18 @@ +version = 1 + +cloudstream { + authors = listOf("coxju") + language = "en" + description = "(VPN) 5 milyondan fazla Porno Videosunu ücretsiz izleyin." + + /** + * 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=xhamster.com&sz=%size%" +} \ No newline at end of file diff --git a/xHamster/src/main/AndroidManifest.xml b/xHamster/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..568741e54f --- /dev/null +++ b/xHamster/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest /> \ No newline at end of file diff --git a/xHamster/src/main/kotlin/com/keyiflerolsun/xHamster.kt b/xHamster/src/main/kotlin/com/keyiflerolsun/xHamster.kt new file mode 100644 index 0000000000..d3841692e1 --- /dev/null +++ b/xHamster/src/main/kotlin/com/keyiflerolsun/xHamster.kt @@ -0,0 +1,98 @@ +// ! https://codeberg.org/coxju/cs-ext-coxju/src/branch/master/Xhamster/src/main/kotlin/com/coxju/Xhamster.kt + +package com.keyiflerolsun + +import org.jsoup.nodes.Element +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* + +@Suppress("ClassName") +class xHamster : MainAPI() { + override var mainUrl = "https://xhamster.com" + override var name = "xHamster" + override val hasMainPage = true + override var lang = "en" + override val hasQuickSearch = false + override val supportedTypes = setOf(TvType.NSFW) + override val vpnStatus = VPNStatus.MightBeNeeded + + override val mainPage = mainPageOf( + "${mainUrl}/newest/" to "Newest", + "${mainUrl}/most-viewed/weekly/" to "Most viewed weekly", + "${mainUrl}/most-viewed/monthly/" to "Most viewed monthly", + "${mainUrl}/most-viewed" to "Most viewed all time", + "${mainUrl}/most-viewed/weekly/" to "Most viewed weekly" + ) + + override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { + val document = app.get(request.data + page + "?x_platform_switch=desktop").document + val home = document.select("div.thumb-list div.thumb-list__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("a.video-thumb-info__name")?.text() ?: return null + val href = fixUrl(this.selectFirst("a.video-thumb-info__name")!!.attr("href")) + val posterUrl = fixUrlNull(this.select("img.thumb-image-container__image").attr("src")) + + return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } + } + + override suspend fun search(query: String): List<SearchResponse> { + val searchResponse = mutableListOf<SearchResponse>() + + for (i in 0 until 15) { + val document = app.get("${mainUrl}/search/${query.replace(" ", "+")}/?page=$i&x_platform_switch=desktop").document + + val results = document.select("div.thumb-list div.thumb-list__item").mapNotNull { it.toSearchResult() } + + if (!searchResponse.containsAll(results)) { + searchResponse.addAll(results) + } else { + break + } + + if (results.isEmpty()) break + } + + return searchResponse + } + + override suspend fun load(url: String): LoadResponse { + val document = app.get(url).document + + val title = document.selectFirst("div.with-player-container h1")?.text()?.trim().toString() + val poster = fixUrlNull(document.selectFirst("div.xp-preload-image")?.attr("style")?.substringAfter("https:")?.substringBefore("\');")) + val tags = document.select(" nav#video-tags-list-container ul.root-8199e.video-categories-tags.collapsed-8199e li.item-8199e a.video-tag").map { it.text() } + val recommendations = document.select("div.related-container div.thumb-list div.thumb-list__item").mapNotNull { it.toSearchResult() } + + return newMovieLoadResponse(title, url, TvType.NSFW, url) { + this.posterUrl = poster + this.tags = tags + this.recommendations = recommendations + } + } + + override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean { + callback( + ExtractorLink( + source = name, + name = name, + url = fixUrl(app.get(url = data).document.selectXpath("//link[contains(@href,'.m3u8')]")[0].attr("href")), + referer = mainUrl, + quality = Qualities.Unknown.value, + isM3u8 = true + ) + ) + + return true + } +} \ No newline at end of file diff --git a/xHamster/src/main/kotlin/com/keyiflerolsun/xHamsterProvider.kt b/xHamster/src/main/kotlin/com/keyiflerolsun/xHamsterProvider.kt new file mode 100644 index 0000000000..256caa7569 --- /dev/null +++ b/xHamster/src/main/kotlin/com/keyiflerolsun/xHamsterProvider.kt @@ -0,0 +1,13 @@ +package com.keyiflerolsun + +import android.content.Context +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin + +@Suppress("ClassName") +@CloudstreamPlugin +class xHamsterProvider: Plugin() { + override fun load(context: Context) { + registerMainAPI(xHamster()) + } +} \ No newline at end of file