Compare commits

...

No commits in common. "master" and "builds" have entirely different histories.

166 changed files with 400 additions and 8124 deletions

View file

@ -1 +0,0 @@
buy_me_a_coffee: CakesTwix

View file

@ -1,57 +0,0 @@
name: "\U0001F195 Нове джерело"
description: Подати заявку на додавання нового сайту
labels: ["new-source"]
body:
- type: input
id: name
attributes:
label: Назва сайту
description: |
Вкажіть назву сайту
placeholder: |
Наприклад: "Unimay"
validations:
required: true
- type: input
id: url
attributes:
label: Посилання на сайт
description: |
Вказати актуальне посилання на ресурс
placeholder: |
Наприклад: "https://unimay.media"
validations:
required: true
- type: textarea
id: more-info
attributes:
label: Корисна інформація для парсингу
description: Вкажіть наявність API або звідки отримати посилання на m3u8
placeholder: |
Example:
1. https://api.unimay.media
2. https://api.unimay.media/api/release/search/?title=Пошук
3. etc
validations:
required: false
- type: textarea
id: other-details
attributes:
label: Інша інформація
placeholder: |
Додаткова інформація, причини додати.
- type: checkboxes
id: content
attributes:
label: Який тип медія там є?
description: 'Вкажіть наявність серіалів, фільмів і тд'
options:
- label: Фільми
- label: Серіали
- label: Мультфільми
- label: Мультсеріали
- label: Аніме
- label: Дорами
- label: "\U0001F353 18+"
validations:
required: true

View file

@ -1,28 +0,0 @@
---
name: Звіт про помилку
about: Створіть звіт, щоб допомогти нам покращитися
title: ''
labels: bug
assignees: ''
---
**Назва розширення**
Напишіть назву джерела, де знайшли помилку
**Опис помилки**
Чіткий і стислий опис того, в чому полягає помилка.
**Як повторити помилку**
Кроки для відтворення поведінки:
1. То-то-то
2. Во-во-во
**Що очікували**
Чіткий і стислий опис того, що ви очікували.
**Скріншоти**
Якщо можливо, додайте скріншоти, щоб пояснити вашу проблему.
**Додатковий контекст**
Додайте сюди будь-який інший контекст проблеми.

View file

@ -1,59 +0,0 @@
name: Build
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
concurrency:
group: "build"
cancel-in-progress: true
on:
push:
branches:
# choose your default branch
- master
- main
paths-ignore:
- '*.md'
jobs:
build:
runs-on: docker
steps:
- name: Checkout
uses: actions/checkout@master
with:
path: "src"
- name: Checkout builds
uses: actions/checkout@master
with:
ref: "builds"
path: "builds"
- name: Clean old builds
run: rm $GITHUB_WORKSPACE/builds/*.cs3 || true
- name: Setup JDK 17
uses: https://github.com/actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Setup Android SDK
uses: https://github.com/android-actions/setup-android@v2
- name: Build Plugins
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: Push builds
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 "Build $GITHUB_SHA" || exit 0 # do not error if nothing to commit
git push --force

12
.gitignore vendored
View file

@ -1,12 +0,0 @@
*.iml
.gradle
/local.properties
/.idea
.DS_Store
/build
**/build
/captures
.externalNativeBuild
.cxx
local.properties
.vscode

View file

@ -1,3 +0,0 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}

BIN
AnimeONProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,30 +0,0 @@
// use an integer for version numbers
version = 7
dependencies{
implementation("com.google.code.gson:gson:2.9.0")
}
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "AnimeON - Дивитися аніме україньскою"
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
"AnimeMovie",
"OVA",
)
iconUrl = "https://www.google.com/s2/favicons?domain=animeon.club&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,288 +0,0 @@
package com.lagradost
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.lagradost.cloudstream3.DubStatus
import com.lagradost.cloudstream3.Episode
import com.lagradost.cloudstream3.HomePageResponse
import com.lagradost.cloudstream3.LoadResponse
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
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.ShowStatus
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.TvType
import com.lagradost.cloudstream3.addDubStatus
import com.lagradost.cloudstream3.addEpisodes
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.mainPageOf
import com.lagradost.cloudstream3.newAnimeLoadResponse
import com.lagradost.cloudstream3.newAnimeSearchResponse
import com.lagradost.cloudstream3.newHomePageResponse
import com.lagradost.cloudstream3.newMovieLoadResponse
import com.lagradost.cloudstream3.toRatingInt
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.models.AnimeInfoModel
import com.lagradost.models.AnimeModel
import com.lagradost.models.FundubEpisode
import com.lagradost.models.FundubModel
import com.lagradost.models.FundubVideoUrl
import com.lagradost.models.NewAnimeModel
import com.lagradost.models.SearchModel
class AnimeONProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://animeon.club"
override var name = "AnimeON"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes =
setOf(
TvType.Anime,
TvType.AnimeMovie,
TvType.OVA,
)
private val apiUrl = "$mainUrl/api/anime"
private val posterApi = "$mainUrl/api/uploads/images/%s"
private val searchApi = "$apiUrl/search/%s?full=true"
// Sections
override val mainPage =
mainPageOf(
"$apiUrl/popular" to "Популярне",
"$apiUrl/seasons" to "Аніме поточного сезону ",
"$apiUrl?pageSize=24&pageIndex=%d" to "Нове",
)
private val listAnimeModel = object : TypeToken<List<AnimeModel>>() {}.type
private val listFundub = object : TypeToken<List<FundubModel>>() {}.type
private val listFundubEpisodes = object : TypeToken<List<FundubEpisode>>() {}.type
// Done
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
if(!request.data.contains("pageIndex") && page !=1) return HomePageResponse(emptyList())
val document = app.get(request.data.format(page),
headers = mapOf(
"Referer" to "https://animeon.club/",
)).text
// Нове
if(request.data.contains("pageIndex")) {
val parsedJSON = Gson().fromJson(document, NewAnimeModel::class.java)
val homeList =
parsedJSON.results.map {
newAnimeSearchResponse(it.titleUa, "anime/${it.id}", TvType.Anime) {
this.posterUrl = posterApi.format(it.image.preview)
}
}
// Log.d("CakesTwix-Debug", "$cdnUrl${parsedJSON.data[1].posterId}")
return newHomePageResponse(request.name, homeList)
} else {
val parsedJSON = Gson().fromJson<List<AnimeModel>>(document, listAnimeModel)
val homeList =
parsedJSON.map {
newAnimeSearchResponse(it.titleUa, "anime/${it.id}", TvType.Anime) {
this.posterUrl = posterApi.format(it.image.preview)
}
}
// Log.d("CakesTwix-Debug", "$cdnUrl${parsedJSON.data[1].posterId}")
return newHomePageResponse(request.name, homeList)
}
}
override suspend fun search(query: String): List<SearchResponse> {
val animeJSON =
Gson().fromJson(app.get(searchApi.format(query)).text, SearchModel::class.java)
val findList =
animeJSON.result.map {
newAnimeSearchResponse(it.titleUa, "anime/${it.id}", TvType.Anime) {
this.posterUrl = posterApi.format(it.poster)
addDubStatus(isDub = true, it.episodes)
}
}
return findList
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val animeJSON =
Gson()
.fromJson(
app.get(url.replace("/anime/", "/api/anime/"),
headers = mapOf(
"Referer" to "https://animeon.club/",
)).text,
AnimeInfoModel::class.java
)
val showStatus =
with(animeJSON.status.name) {
when {
contains("Онґоїнґ") -> ShowStatus.Ongoing
contains("Завершений") -> ShowStatus.Completed
else -> null
}
}
val tvType =
with(animeJSON.type.name) {
when {
contains("ТБ-Серіал") -> TvType.Anime
contains("OVA") -> TvType.OVA
contains("Спеціальний випуск") -> TvType.OVA
contains("ONA") -> TvType.OVA
contains("Фільм") -> TvType.AnimeMovie
else -> TvType.Anime
}
}
val episodes = mutableListOf<Episode>()
// Get all fundub for title and parse only first fundub/player
val fundubs = Gson().fromJson<List<FundubModel>>(app.get("${apiUrl}/player/fundubs/${animeJSON.id}",
headers = mapOf(
"Referer" to "https://animeon.club/",
)).text, listFundub)
Gson().fromJson<List<FundubEpisode>>(app.get("${apiUrl}/player/episodes/${fundubs?.get(0)?.player?.get(0)?.id}/${fundubs?.get(0)?.fundub?.id}",
headers = mapOf(
"Referer" to "https://animeon.club/",
)).text, listFundubEpisodes)?.map { epd -> // Episode
episodes.add(
Episode(
"${animeJSON.id}, ${epd.episode}",
"Епізод ${epd.episode}",
episode = epd.episode,
posterUrl = epd.poster
)
)
}
return if (tvType == TvType.Anime || tvType == TvType.OVA) {
newAnimeLoadResponse(
animeJSON.titleUa,
"$mainUrl/anime/${animeJSON.id}",
tvType,
) {
this.posterUrl = posterApi.format(animeJSON.poster)
this.engName = animeJSON.titleEn
this.tags = animeJSON.genres.map { it.name }
this.plot = animeJSON.description
addTrailer(animeJSON.trailer)
this.showStatus = showStatus
this.duration = extractIntFromString(animeJSON.episodeTime)
this.year = animeJSON.releaseDate
this.rating = animeJSON.rating.toString().toRatingInt()
addEpisodes(DubStatus.Dubbed, episodes)
addMalId(animeJSON.malId)
}
} else {
var backgroundImage = animeJSON.backgroundImage
if(backgroundImage.isNullOrBlank()){
backgroundImage = posterApi.format(animeJSON.poster)
} else {
backgroundImage = posterApi.format(animeJSON.backgroundImage)
}
newMovieLoadResponse(animeJSON.titleUa, "$mainUrl/anime/${animeJSON.id}", tvType, "${animeJSON.id}") {
this.posterUrl = posterApi.format(animeJSON.poster)
this.tags = animeJSON.genres.map { it.name }
this.plot = animeJSON.description
addTrailer(animeJSON.trailer)
this.duration = extractIntFromString(animeJSON.episodeTime)
this.year = animeJSON.releaseDate
this.backgroundPosterUrl = backgroundImage
this.rating = animeJSON.rating.toString().toRatingInt()
addMalId(animeJSON.malId)
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serisl) [id title, episode] | (Film) ?
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
val fundubs = Gson().fromJson<List<FundubModel>>(app.get("${apiUrl}/player/fundubs/${dataList[0]}",
headers = mapOf(
"Referer" to "https://animeon.club/",
)).text, listFundub)
if(dataList.size == 2){
fundubs.map { dub ->
Gson().fromJson<List<FundubEpisode>>(app.get("${apiUrl}/player/episodes/${dub.player[0].id}/${dub.fundub.id}",
headers = mapOf(
"Referer" to "https://animeon.club/",
)).text, listFundubEpisodes).filter{ it.episode == dataList[1].toIntOrNull() }.map { epd -> // Episode
M3u8Helper.generateM3u8(
source = "${dub.fundub.name} (${dub.player[0].name})",
streamUrl = getM3U(app.get("${apiUrl}/player/episode/${epd.id}",
headers = mapOf(
"Referer" to "https://animeon.club/",
)).parsedSafe<FundubVideoUrl>()!!.videoUrl),
referer = "https://animeon.club"
).last().let(callback)
}
}
return true
}
fundubs.map { dub ->
M3u8Helper.generateM3u8(
source = "${dub.fundub.name} (${dub.player[0].name})",
streamUrl = getM3U(app.get("${apiUrl}/player/${dub.player[0].id}/${dub.fundub.id}",
headers = mapOf(
"Referer" to "https://animeon.club/",
)).parsedSafe<FundubVideoUrl>()!!.videoUrl),
referer = "https://animeon.club"
).last().let(callback)
}
return true
}
private fun extractIntFromString(string: String): Int? {
val value = Regex("(\\d+)").findAll(string).lastOrNull() ?: return null
if (value.value[0].toString() == "0") {
return value.value.drop(1).toIntOrNull()
}
return value.value.toIntOrNull()
}
private suspend fun getM3U(url: String): String{
with(url){
when {
contains("https://moonanime.art") -> {
val document = app.get(this,
headers = mapOf(
"Host" to "moonanime.art",
"Accept" to "*/*",
"User-Agent" to "Mozilla/5.0 (Windows NT 10.0; rv:126.0) Gecko/20100101 Firefox/126.0",
"accept-language" to "en-US,en;q=0.5"
)).document
return document.select("script").html()
.substringAfterLast("file: \"")
.substringBefore("\",")
}
contains("https://ashdi.vip/vod") -> {
return app.get(this).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
}
else -> return ""
}
}
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AnimeONProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AnimeONProvider())
}
}

View file

@ -1,49 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
class AnimeInfoModel (
@SerializedName("id") val id : Int,
@SerializedName("titleUa") val titleUa : String,
@SerializedName("titleEn") val titleEn : String,
@SerializedName("description") val description : String,
@SerializedName("releaseDate") val releaseDate : Int,
@SerializedName("episodeTime") val episodeTime : String,
@SerializedName("poster") val poster : String,
@SerializedName("backgroundImage") val backgroundImage : String,
@SerializedName("trailer") val trailer : String,
@SerializedName("malId") val malId : Int,
@SerializedName("rating") val rating : Double,
@SerializedName("genres") val genres : List<Genres>,
@SerializedName("status") val status : Status,
@SerializedName("type") val type : Type,
@SerializedName("player") val player : List<Player>,
)
data class Genres (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String,
@SerializedName("malId") val malId : String,
)
data class Player (
@SerializedName("id") val id : Long,
@SerializedName("url") val url : String,
@SerializedName("numEpisodeFrom") val numEpisodeFrom : String,
@SerializedName("numEpisodeTo") val numEpisodeTo : String
)
data class Status (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String
)
data class Type (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String
)

View file

@ -1,16 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
class AnimeModel (
@SerializedName("id") val id : Int,
@SerializedName("titleUa") val titleUa : String,
@SerializedName("image") val image : Image,
)
data class Image (
@SerializedName("id") val id : Int,
@SerializedName("original") val original : String,
@SerializedName("preview") val preview : String
)

View file

@ -1,11 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
data class FundubEpisode (
@SerializedName("id") val id : Int,
@SerializedName("episode") val episode : Int,
@SerializedName("subtitles") val subtitles : Boolean,
@SerializedName("poster") val poster : String
)

View file

@ -1,27 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
class FundubModel (
@SerializedName("fundub") val fundub : Fundub,
@SerializedName("player") val player : List<FundubPlayer>
)
data class Fundub (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String,
// @SerializedName("synonyms") val synonyms : List<String>,
// @SerializedName("description") val description : String,
// @SerializedName("team") val team : String,
// @SerializedName("telegram") val telegram : String,
// @SerializedName("youtube") val youtube : String,
// @SerializedName("avatar") val avatar : String
)
data class FundubPlayer (
@SerializedName("name") val name : String,
@SerializedName("id") val id : Int
)

View file

@ -1,7 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
class FundubVideoUrl (
@SerializedName("videoUrl") val videoUrl : String
)

View file

@ -1,22 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
class NewAnimeModel (
@SerializedName("results") val results : List<Results>,
@SerializedName("totalCount") val totalCount : Int
)
data class Results (
@SerializedName("id") val id : Int,
@SerializedName("titleUa") val titleUa : String,
@SerializedName("description") val description : String,
@SerializedName("image") val image : Image,
@SerializedName("malId") val malId : Int,
@SerializedName("rating") val rating : Double,
@SerializedName("status") val status : Status,
@SerializedName("type") val type : Type,
@SerializedName("genres") val genres : List<Genres>
)

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

View file

@ -1,33 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
class SearchModel (
@SerializedName("result") val result : List<Result>,
@SerializedName("count") val count : Int
)
data class Result (
@SerializedName("id") val id : Int,
@SerializedName("titleUa") val titleUa : String,
@SerializedName("titleEn") val titleEn : String,
@SerializedName("description") val description : String,
@SerializedName("releaseDate") val releaseDate : Int,
@SerializedName("producer") val producer : String,
@SerializedName("views") val views : Int,
@SerializedName("episodes") val episodes : Int,
@SerializedName("episodeTime") val episodeTime : String,
@SerializedName("poster") val poster : String,
@SerializedName("backgroundImage") val backgroundImage : String,
@SerializedName("episodesAired") val episodesAired : Int,
@SerializedName("createdAt") val createdAt : String,
@SerializedName("updatedAt") val updatedAt : String,
@SerializedName("ashdiId") val ashdiId : String,
@SerializedName("malId") val malId : Int,
@SerializedName("season") val season : Int,
@SerializedName("rating") val rating : Double,
@SerializedName("type") val type : Type,
@SerializedName("status") val status : Status
)

BIN
AnimeUAProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,27 +0,0 @@
// use an integer for version numbers
version = 6
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Тут на вас чекають різноманітні жанри, в яких ви зможете переживати разом із героями все їхнє життя від моментів радості та закоханості з жанру романтики до неймовірних пригод фентазійних серіалів. "
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
"AnimeMovie",
"OVA",
)
iconUrl = "https://www.google.com/s2/favicons?domain=animeua.club&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,212 +0,0 @@
package com.lagradost
import com.lagradost.models.PlayerJson
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import org.jsoup.nodes.Element
class AnimeUAProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://animeua.club"
override var name = "AnimeUA"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Anime,
TvType.AnimeMovie,
TvType.OVA,
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/page/" to "Нове аніме",
"$mainUrl/film/page/" to "Повнометражки",
"$mainUrl/anime/page/" to "Аніме серіали",
"$mainUrl/ona/page/" to "ONA",
"$mainUrl/ova/page/" to "OVA",
)
// Main Page
private val animeSelector = "a.poster"
private val titleSelector = "h3.poster__title"
private val hrefSelector = ".fd-column"
private val posterSelector = ".img-fit-cover img"
// Load info
private val titleLoadSelector = ".page__subcol-main h1"
private val genresSelector = ".pmovie__genres a"
private val yearSelector = ".pmovie__year"
private val playerSelector = ".video-responsive > iframe"
private val descriptionSelector = ".full-text"
// private val ratingSelector = ".pmovie__subrating img"
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(animeSelector).map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): AnimeSearchResponse {
val title = this.selectFirst(titleSelector)?.text()?.trim().toString()
val href = this.selectFirst(hrefSelector)?.attr("href").toString()
val posterUrl = mainUrl + this.selectFirst(posterSelector)?.attr("data-src")
// TODO: Use it
val status = this.select(".poster__label").text()
return newAnimeSearchResponse(title, href, TvType.Anime) {
this.posterUrl = posterUrl
addDubStatus(isDub = true)
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = mainUrl,
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select(animeSelector).map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
val title = document.selectFirst(titleLoadSelector)?.text()?.trim().toString()
val engTitle = document.select(".pmovie__original-title").text()
val poster = mainUrl + document.selectFirst("div.page__subcol-side $posterSelector")?.attr("data-src")
val tags = document.select(genresSelector).map { it.text() }
val year = document.select(yearSelector).text().substringAfter(": ").substringBefore("-").toIntOrNull()
val playerUrl = document.select(playerSelector).attr("data-src")
val tvType = with(tags){
when{
contains("Повнометражка") -> TvType.AnimeMovie
contains("OVA") -> TvType.OVA
contains("ONA") -> TvType.Anime
else -> TvType.Anime
}
}
val description = document.selectFirst(descriptionSelector)?.text()?.trim()
// val rating = document.select(ratingSelector).next().text().toRatingInt()
val recommendations = document.select(animeSelector).map {
it.toSearchResponse()
}
val (malId, anilistId, image, cover) = Tracker().getTracker(engTitle, "TV", year)
// Log.d("load-debug", engTitle)
// Log.d("load-debug", anilistId!!)
// Return to app
// Parse Episodes as Series
return if (tvType == TvType.Anime || tvType == TvType.OVA) {
val episodes = mutableListOf<Episode>()
val playerRawJson = app.get(playerUrl).document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
for(episode in season.folder){ // Episodes
episodes.add(
Episode(
"${season.title}, ${episode.title}, $playerUrl",
episode.title,
season.title.replace(" Сезон ","").toIntOrNull(),
episode.title.replace("Серія ","").toIntOrNull(),
episode.poster
)
)
}
}
}
newAnimeLoadResponse(title, url, tvType) {
this.posterUrl = poster
this.engName = engTitle
this.year = year
this.plot = description
this.tags = tags
this.recommendations = recommendations
addEpisodes(DubStatus.Dubbed, episodes)
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
}
} else { // Parse as Movie.
newMovieLoadResponse(title, url, tvType, "$title, $playerUrl") {
this.posterUrl = poster
this.name = engTitle
this.year = year
this.plot = description
this.tags = tags
this.recommendations = recommendations
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serisl) [Season, Episode, Player Url] | (Film) [Title, Player Url]
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
// Its film, parse one m3u8
if(dataList.size == 2){
val m3u8Url = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
M3u8Helper.generateM3u8(
source = dataList[0],
streamUrl = m3u8Url,
referer = "https://tortuga.wtf/"
).last().let(callback)
return true
}
val playerRawJson = app.get(dataList[2]).document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
if(season.title == dataList[0]){
for(episode in season.folder){ // Episodes
if(episode.title == dataList[1]){
// Add as source
M3u8Helper.generateM3u8(
source = dubs.title,
streamUrl = episode.file,
referer = "https://tortuga.wtf/"
).last().let(callback)
}
}
}
}
}
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AnimeUAProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AnimeUAProvider())
}
}

View file

@ -1,57 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.app
class Tracker {
suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
// Log.d("load-debug", media.toString())
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
))
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
val romaji: String? = null,
val english: String? = null,
)
data class Results(
val aniId: String? = null,
val malId: Int? = null,
val title: Title? = null,
val releaseDate: Int? = null,
val type: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class AniSearch(
val results: ArrayList<Results>? = arrayListOf(),
)
private data class Episodes(
val file: String? = null,
val title: String? = null,
val poster: String? = null,
)
private data class Home(
val table: String? = null,
)
private data class Search(
val mes: String? = null,
)
}

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

BIN
AnitubeinuaProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,25 +0,0 @@
// use an integer for version numbers
version = 10
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "На нашому сайті ви можете подивитися аніме онлайн українською безкоштовно. Великий список аніме онлайн тільки у нас."
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 3 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
)
iconUrl = "https://www.google.com/s2/favicons?domain=anitube.in.ua&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,468 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.extractors.Mp4Upload
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.extractors.AshdiExtractor
import com.lagradost.extractors.csstExtractor
import com.lagradost.models.Ajax
import com.lagradost.models.Link
import com.lagradost.models.PlayerJson
import com.lagradost.models.videoConstructor
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
class AnitubeinuaProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://anitube.in.ua"
override var name = "Anitubeinua Beta"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes =
setOf(
TvType.AnimeMovie,
TvType.Anime,
)
// Sections
override val mainPage =
mainPageOf(
"$mainUrl/anime/page/" to "Нові",
"$mainUrl/f/sort=rating/order=desc/page/" to "Популярні",
)
private var dle_login_hash = ""
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(".story").map { it.toSearchResponse() }
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): AnimeSearchResponse {
val title = this.selectFirst(".story_c h2 a, div.text_content a")?.text()?.trim().toString()
val href = this.selectFirst(".story_c h2 a, div.text_content a")?.attr("href").toString()
var posterUrl = this.selectFirst(".story_c_l span.story_post img")?.attr("src")
// For recommendations
if (posterUrl.isNullOrEmpty()) posterUrl = this.selectFirst("a img")?.attr("data-src")
var isSub = this.select(".box .sub").isNotEmpty()
var isDub = this.select(".box .ukr").isNotEmpty()
if (!isSub && !isDub) {
isSub = true
isDub = true
}
return newAnimeSearchResponse(title, href, TvType.Anime) {
this.posterUrl = mainUrl + posterUrl
addDubStatus(isDub, isSub)
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document =
app.post(
url = mainUrl,
data =
mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")))
.document
return document.select("article.story").map { it.toSearchResponse() }
}
// Detailed information
override suspend fun load(url: String): AnimeLoadResponse {
val document = app.get(url).document
val someInfo = document.select(".story_c_r")
// Parse info
val title = document.selectFirst(".story_c h2")?.text()?.trim().toString()
val poster = mainUrl + document.selectFirst(".story_c_left span.story_post img")?.attr("src")
val tags = someInfo.select("a[href*=/anime/]").map { it.text() }
val year = someInfo.select("a[href*=/xfsearch/year/]").text().toIntOrNull()
val tvType = TvType.Anime
val description = document.selectFirst("div.my-text")?.text()?.trim()
// val author = someInfo.select("strong:contains(Студія:)").next().html()
val trailer = document.selectFirst(".rcol a.rollover")?.attr("href").toString()
val rating = document.selectFirst(".lexington-box > div:last-child span")?.text().toRatingInt()
val recommendations = document.select(".horizontal ul li").map { it.toSearchResponse() }
// Return to app
// Players, Episodes, Number of episodes
val subEpisodes = mutableListOf<Episode>()
val dubEpisodes = mutableListOf<Episode>()
val id = url.split("/").last().split("-").first()
dle_login_hash =
document
.body()
.selectFirst("script")!!
.html()
.substringAfterLast("dle_login_hash = '")
.substringBefore("';")
val ajax =
fromPlaylistAjax(
"$mainUrl/engine/ajax/playlists.php?news_id=$id&xfield=playlist&user_hash=$dle_login_hash")
if (!ajax.isNullOrEmpty()) { // Ajax list
ajax
.groupBy { it.name }
.forEach { episodes -> // Group by name
episodes.value.forEach lit@{
// UFDub player, drop
if (it.urls.url.contains("video.ufdub")) return@lit
if (it.urls.isDub) {
dubEpisodes.add(
Episode(
"${it.name}, $id, ${it.urls.isDub}", it.name, episode = it.numberEpisode))
} else {
subEpisodes.add(
Episode(
"${it.name}, $id, ${it.urls.isDub}", it.name, episode = it.numberEpisode))
}
}
}
} else {
document.select("script").map { script ->
if (script.data().contains("RalodePlayer.init(")) {
val episodesList = fromVideoContructor(script)
episodesList.forEach { episode ->
// UFDub player, drop
var varEpisodeNumber = episode.episodeNumber
if (episode.episodeName == "ПЛЕЙЛИСТ") return@forEach
if (varEpisodeNumber == null) {
varEpisodeNumber = episodesList.last().episodeNumber?.plus(1)
}
dubEpisodes.add(
Episode(
"$varEpisodeNumber, $url",
episode.episodeName,
episode = varEpisodeNumber,
))
}
}
}
}
return newAnimeLoadResponse(title, url, tvType) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
addTrailer(trailer)
this.recommendations = recommendations
addEpisodes(DubStatus.Dubbed, dubEpisodes)
addEpisodes(DubStatus.Subbed, subEpisodes)
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Ajax) Name, id title, isDub | (Two) Episode name, url title
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
// Log.d("CakesTwix-Debug", data)
if (dataList[1].toIntOrNull() != null) { // Its ajax list
val ajax =
fromPlaylistAjax(
"$mainUrl/engine/ajax/playlists.php?news_id=${dataList[1]}&xfield=playlist&user_hash=$dle_login_hash")
// Filter by name and isDub
ajax
?.filter { it.name == dataList[0] }
?.filter { it.urls.isDub == dataList[2].toBoolean() }
?.forEach {
// Get m3u8 url
with(it) {
when {
it.urls.url.contains("https://tortuga.wtf/vod/") -> {
M3u8Helper.generateM3u8(
source = "${it.urls.playerName} (${it.urls.name})",
streamUrl = AshdiExtractor().ParseM3U8(this.urls.url),
referer = "https://tortuga.wtf/")
.last().let(callback)
}
it.urls.url.contains("https://ashdi.vip/vod") -> {
M3u8Helper.generateM3u8(
source = "${it.urls.playerName} (${it.urls.name})",
streamUrl = AshdiExtractor().ParseM3U8(this.urls.url),
referer = "https://qeruya.cyou")
.last().let(callback)
}
it.urls.url.contains("https://www.udrop.com") -> {
callback.invoke(
ExtractorLink(
this.urls.url,
name = "${it.urls.playerName} (${it.urls.name})",
this.urls.url,
"",
0,
isM3u8 = false,
))
}
it.urls.url.contains("https://csst.online/embed/") ||
it.urls.url.contains("https://monstro.site/embed/") -> {
csstExtractor().ParseUrl(it.urls.url).split(",").forEach { csstUrl ->
callback.invoke(
ExtractorLink(
this.urls.url,
name =
"${it.urls.playerName} (${it.urls.name}) ${csstUrl.substringBefore("]").drop(1)}",
csstUrl.substringAfter("]"),
"",
0,
isM3u8 = false,
))
}
}
it.urls.url.contains("https://www.mp4upload.com/") -> {
Mp4Upload().getUrl(it.urls.url)?.forEach { extlink ->
callback.invoke(
ExtractorLink(
extlink.source,
"${it.urls.playerName} (${it.urls.name})",
extlink.url,
extlink.referer,
extlink.quality,
extlink.type,
extlink.headers,
))
}
}
else -> {}
}
}
}
} else {
val document = app.get(dataList[1]).document
document.select("script").map { script ->
if (script.data().contains("RalodePlayer.init(")) {
var latestNumber: Int? = 0
fromVideoContructor(script).forEach { dub ->
if (dub.episodeName == "ПЛЕЙЛИСТ") return@forEach
// Parse by number episode
// If null, just add +1
if (dub.episodeNumber == null) {
dub.episodeNumber = latestNumber?.plus(1)
}
latestNumber = dub.episodeNumber
if (latestNumber != dataList[0].toIntOrNull()) return@forEach
with(dub.episodeUrl) {
when {
contains("https://tortuga.wtf/vod/") -> {
M3u8Helper.generateM3u8(
source = dub.playerName,
streamUrl = AshdiExtractor().ParseM3U8(this),
referer = "https://tortuga.wtf/")
.last().let(callback)
}
contains("https://ashdi.vip/vod") -> {
M3u8Helper.generateM3u8(
source = dub.playerName,
streamUrl = AshdiExtractor().ParseM3U8(this),
referer = "https://qeruya.cyou")
.last().let(callback)
}
contains("https://www.udrop.com") -> {
callback.invoke(
ExtractorLink(
dub.playerName,
name = dub.playerName,
this,
"",
0,
isM3u8 = false,
))
}
contains("https://monstro.site/embed/") ||
contains("https://csst.online/embed/") -> {
csstExtractor().ParseUrl(this).split(",").forEach {
callback.invoke(
ExtractorLink(
dub.playerName,
name =
"${dub.playerName.replace("\"", "")} ${it.substringBefore("]").drop(1)}",
it.substringAfter("]"),
"",
0,
isM3u8 = false))
}
}
contains("https://www.mp4upload.com/") -> {
Mp4Upload().getUrl(this)?.forEach { extlink ->
callback.invoke(
ExtractorLink(
extlink.source,
dub.playerName,
extlink.url,
extlink.referer,
extlink.quality,
extlink.type,
extlink.headers,
))
}
}
else -> {}
}
}
}
}
}
}
return true
}
private fun decode(input: String): String {
// Decoded string, thanks to Secozzi
val hexRegex = Regex("\\\\u([0-9a-fA-F]{4})")
return hexRegex.replace(input) { matchResult ->
Integer.parseInt(matchResult.groupValues[1], 16).toChar().toString()
}
}
data class Responses(val success: Boolean?, val response: String?, val message: String?)
// Thanks to Andro999b
// https://github.com/Andro999b/movies-telegram-bot/blob/a296c7d4122a25fa70b612e75d741dd55c154640/functions/src/providers/AnitubeUAProvider.ts#L86-L137
private suspend fun fromPlaylistAjax(url: String): List<Ajax>? {
val responseGet = app.get(url).parsedSafe<Responses>()
// Not Ajax, return null
if (responseGet?.success == false) {
// Log.d("load-debug", "Not Ajax")
return null
}
val returnEpisodes = mutableListOf<Ajax>()
val playlist = Jsoup.parse(responseGet?.response!!)
val audios = mutableListOf<Pair<String, String>>() // (INARI, 0_0, ...)
val listDubStatus = mutableListOf<Pair<String, String>>() // (СУБТИТРИ, 0_0_0, ...)
val listPlayers = mutableListOf<Pair<String, String>>() // (ПЛЕЄР МОНСТР, 0_0_0_0, ...)
playlist.select(".playlists-lists .playlists-items:first-child li").forEach {
audios.add(Pair(it.text(), it.attr("data-id")))
}
// Set listPlayers and listDubStatus
// If has subs - So players in 3 index
if (playlist.select(".playlists-lists .playlists-items").count() == 3) {
// Players
playlist.select(".playlists-lists .playlists-items:nth-child(3) li").forEach {
listPlayers.add(Pair(it.text(), it.attr("data-id")))
}
// Subs/Dubs index
playlist.select(".playlists-lists .playlists-items:nth-child(2) li").forEach {
listDubStatus.add(Pair(it.text(), it.attr("data-id")))
}
} else {
// No subs
// Players
playlist.select(".playlists-lists .playlists-items:nth-child(2) li").forEach {
listPlayers.add(Pair(it.text(), it.attr("data-id")))
}
}
// Parse episodes
playlist.select(".playlists-videos .playlists-items li").forEach { element ->
val audioId = element.attr("data-id") // 0_0_0 or 0_0_0_0 if subs
val episodeId = extractIntFromString(element.text())
val url = element.attr("data-file")
var isDub = true
var audio: String? = null
var playerName = ""
// Set this element Dub name
audios.forEach {
if (audioId.startsWith(it.second)) {
audio = it.first
}
}
if (audioId.count { it == '_' } == 3) {
listDubStatus.forEach {
if (audioId.startsWith(it.second)) {
if (it.first == "СУБТИТРИ") {
isDub = false
}
}
}
}
listPlayers.forEach {
if (audioId.startsWith(it.second)) {
playerName = it.first
}
}
returnEpisodes.add(
Ajax(
episodeId,
element.text(),
Link(
isDub,
url,
audio.toString(),
playerName,
)))
}
return returnEpisodes.toList()
}
private fun fromVideoContructor(script: Element): List<videoConstructor> {
val playerScriptRawJson = script.data().substringAfterLast(".init(").substringBefore(");")
val playerEpisodesRawJson = playerScriptRawJson.substringAfter("],").substringBeforeLast(",")
val playerNamesArray =
(playerScriptRawJson.substringBefore("],") + "]")
.dropLast(1)
.drop(1)
.replace("\",\"", ",,,")
.split(",,,")
// val numberOfEpisodesInt = playerScriptRawJson.substringAfterLast(",").toIntOrNull()
val jsonEpisodes = tryParseJson<List<List<PlayerJson>>>(playerEpisodesRawJson)!!
val episodes = mutableListOf<videoConstructor>()
jsonEpisodes.forEachIndexed { index, episode ->
val playerName = decode(playerNamesArray[index])
episode.forEach {
episodes.add(
videoConstructor(
playerName,
it.name,
extractIntFromString(it.name),
Jsoup.parse(it.code).select("iframe").attr("src")))
// Log.d("load-debug", "$playerName ${it.name}")
}
}
return episodes.toList()
}
private fun extractIntFromString(string: String): Int? {
val value = Regex("(\\d+)").findAll(string).lastOrNull() ?: return null
if (value.value[0].toString() == "0") {
return value.value.drop(1).toIntOrNull()
}
return value.value.toIntOrNull()
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AnitubeinuaProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AnitubeinuaProvider())
}
}

View file

@ -1,12 +0,0 @@
package com.lagradost.extractors;
import com.lagradost.cloudstream3.app
class AshdiExtractor() {
suspend fun ParseM3U8(url: String): String{
return app.get(url).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
}
}

View file

@ -1,11 +0,0 @@
package com.lagradost.extractors
import com.lagradost.cloudstream3.app
class csstExtractor {
suspend fun ParseUrl(url: String): String{
return app.get(url).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
}
}

View file

@ -1,15 +0,0 @@
package com.lagradost.models
data class Ajax (
val numberEpisode : Int?,
val name : String,
val urls : Link,
)
data class Link (
val isDub : Boolean,
val url : String,
val name : String,
val playerName : String,
)

View file

@ -1,9 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val name : String, // Серія 0
val code : String, // iframe block
val zid : Int,
val sid : Int
)

View file

@ -1,8 +0,0 @@
package com.lagradost.models
data class videoConstructor (
val playerName: String,
val episodeName: String,
var episodeNumber: Int?,
val episodeUrl: String
)

BIN
BambooUAProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,29 +0,0 @@
// use an integer for version numbers
version = 5
dependencies {
implementation("com.google.code.gson:gson:2.9.0")
}
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "BambooUA - Ми команда, що дарує переклади азійських фільмів / шоу / кліпів / дорам українською мовою. Приєднуйтеся до нас! З нами ти завжди будеш першим!"
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
"AsianDrama",
)
iconUrl = "https://www.google.com/s2/favicons?domain=bambooua.com&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,223 +0,0 @@
package com.lagradost
import com.google.gson.Gson
import com.lagradost.cloudstream3.AnimeSearchResponse
import com.lagradost.cloudstream3.DubStatus
import com.lagradost.cloudstream3.Episode
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.addDubStatus
import com.lagradost.cloudstream3.addEpisodes
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.mainPageOf
import com.lagradost.cloudstream3.newAnimeLoadResponse
import com.lagradost.cloudstream3.newAnimeSearchResponse
import com.lagradost.cloudstream3.newHomePageResponse
import com.lagradost.cloudstream3.newMovieLoadResponse
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import org.jsoup.nodes.Element
class BambooUAProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://bambooua.com"
override var name = "BambooUA"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Anime,
TvType.AsianDrama,
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/dorama/page/" to "Дорама",
"$mainUrl/anime/page/" to "Аніме",
"$mainUrl/lakorn/page/" to "Лакорн",
"$mainUrl/cinema/page/" to "Кіно",
"$mainUrl/voice/page/" to "Озвучення",
"$mainUrl/tv-show/page/" to "ТВ-шоу",
"$mainUrl/done/page/" to "Завершені",
"$mainUrl/world-bl/page/" to "Світ ЛГБТ",
"$mainUrl/now/page/" to "Поточні",
)
// Main Page
private val animeSelector = "li.slide-item"
private val titleSelector = ".block-description > h6"
private val hrefSelector = ".block-images .hover-buttons"
private val posterSelector = ".img-fluid"
// Load info
// private val titleLoadSelector = ".movie-detail .trending-info .trending-text"
private val genresSelector = "span.full_cat a"
private val yearSelector = ".trending-info .text-detail span.badge-danger"
// private val playerSelector = ".video-responsive > iframe"
// private val descriptionSelector = ".full-text"
// private val ratingSelector = ".pmovie__subrating img"
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(animeSelector).map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): AnimeSearchResponse {
val title = this.selectFirst(titleSelector)?.text()?.trim().toString()
val href = this.selectFirst(hrefSelector)?.attr("href").toString()
val posterUrl = mainUrl + this.selectFirst(posterSelector)?.attr("src")
val sub = this.select(".Type_project_SUB").text().substringAfter(". ")
val dub = this.select(".Type_project_DUB").text().substringAfter(". ")
// Log.d("load-debug", dub)
return newAnimeSearchResponse(title, href, TvType.Anime) {
this.posterUrl = posterUrl
addDubStatus(dub.isNotEmpty(), sub.isNotEmpty(), dub.toIntOrNull(), sub.toIntOrNull())
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = mainUrl,
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select(animeSelector).map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
// val json = tryParseJson<JSONModel>(document.select("script[type*=json]").html())
val gJson = Gson().fromJson(document.select("script[type*=json]").html(), JSONModel::class.java)
// Log.d("load-debug-json", gJson.graph[0].name)
val title = gJson.graph[0].name
val poster = gJson.graph[0].image[1]
val tags = document.select(genresSelector).map { it.text() }
val year = document.select(yearSelector).text().toIntOrNull()
val tvType = with(tags){
when{
contains("Аніме") -> TvType.Anime
contains("Кіно") -> TvType.Movie
else -> TvType.AsianDrama
}
}
val description = gJson.graph[0].description
// val rating = document.select(ratingSelector).next().text().toRatingInt()
val recommendations = document.select(".favorites-slider li.slide-item").map {
it.toSearchResponse()
}
val subEpisodes = mutableListOf<Episode>()
val dubEpisodes = mutableListOf<Episode>()
// Parse episodes (sub/dub)
document.select(".mt-4").forEach {
// Parse sub
if(it.select("h3.my-4").text() == "Субтитри"){
it.select("span.play_me").forEach{ episode ->
subEpisodes.add(
Episode(
episode.attr("data-file"),
episode.attr("data-title"),
episode = episode.attr("data-title").replace("Серія ","").toIntOrNull(),
)
)
}
// Parse dub
} else if(it.select("h3.my-4").text() == "Озвучення"){
it.select("span.play_me").forEach{ episode ->
dubEpisodes.add(
Episode(
episode.attr("data-file"),
episode.attr("data-title"),
episode = episode.attr("data-title").replace("Серія ","").toIntOrNull(),
)
)
}
}
}
// Return to app
// Parse Episodes as Series
return if(tvType != TvType.Movie){
newAnimeLoadResponse(title, url, tvType) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.recommendations = recommendations
this.addEpisodes(DubStatus.Dubbed, dubEpisodes)
this.addEpisodes(DubStatus.Subbed, subEpisodes)
}
} else{
newMovieLoadResponse(title, url, tvType, url) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
this.recommendations = recommendations
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
// Movie
if(data.startsWith("https://bambooua.com")){
val document = app.get(data).document
document.select("span.mr-3").forEach {
// Log.d("load-debug", it.attr("data-file"))
M3u8Helper.generateM3u8(
source = it.attr("data-title"),
streamUrl = it.attr("data-file"),
referer = ""
).last().let(callback)
}
return true
}
// Serial
M3u8Helper.generateM3u8(
source = "Bambooua",
streamUrl = data,
referer = ""
).last().let(callback)
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class BambooUAProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(BambooUAProvider())
}
}

View file

@ -1,43 +0,0 @@
package com.lagradost
import com.google.gson.annotations.SerializedName
data class JSONModel (
@SerializedName("@context") val context : String,
@SerializedName("@graph") val graph : List<graph>
)
data class graph (
@SerializedName("@type") val type : String,
@SerializedName("@context") val context : String,
val publisher : Publisher,
val name : String,
val headline : String,
val mainEntityOfPage : MainEntityOfPage,
val datePublished : String,
val dateModified : String,
val author : Author,
val image : List<String>,
val description : String
)
data class Publisher (
@SerializedName("@type") val type : String,
val name : String
)
data class MainEntityOfPage (
@SerializedName("@type") val type : String,
@SerializedName("@id") val id : String
)
data class Author (
@SerializedName("@type") val type : String,
val name : String,
val url : String
)

View file

@ -1,50 +0,0 @@
# Contributing до cloudstream-extensions-uk
Перш за все, дякуємо за те, що ви знайшли час, щоб зробити свій внесок! ❤️
Всі види внесків заохочуються і цінуються. Дивіться зміст, щоб дізнатися про різні способи допомоги та деталі про те, як вони обробляються в цьому проекті. Будь ласка, обов'язково прочитайте відповідний розділ перед тим, як зробити свій внесок. Це значно полегшить роботу нам, супровідникам, і згладить досвід для всіх учасників. Спільнота з нетерпінням чекає на ваші внески. 🎉
> І якщо вам подобається проект, але у вас просто немає часу, щоб зробити свій внесок, нічого страшного. Є й інші прості способи підтримати проєкт і висловити свою вдячність, яким ми також будемо дуже раді:
> - Станьте зіркою проєкту
> - Напишіть про нього у Mastodon/Telegram/etc
> - Посилайтеся на цей проект в readme вашого проекту
> - Згадайте про проект на місцевих мітапах та розкажіть друзям/колегам
## Зміст
- [У мене є питання](#у-мене-є-питання)
- [Я хочу зробити внесок](#я-хочу-зробити-внесок)
- [Я хочу попросити додати нове джерело](#я-хочу-попросити-додати-нове-джерело)
## У мене є питання
> Якщо ви хочете поставити запитання, ми припускаємо, що ви прочитали доступну [Документацію](http://recloudstream.github.io/csdocs/).
Перед тим, як поставити запитання, найкраще пошукати існуючі [Issues](https://github.com/CakesTwix/cloudstream-extensions-uk/issues), які можуть вам допомогти. Якщо ви знайшли відповідне issue, але все ще потребуєте роз'яснень, ви можете написати своє питання в цьому issue. Також бажано спочатку пошукати відповіді в Інтернеті.
Якщо ви все ще відчуваєте потребу поставити запитання і потребуєте роз'яснень, ми рекомендуємо зробити наступне:
- Відкрийте [Issue](https://github.com/CakesTwix/cloudstream-extensions-uk/issues/new).
- Надайте якомога більше контексту про те, з чим ви зіткнулися.
Після цього ми подбаємо про вирішення проблеми якомога швидше.
## Я хочу зробити внесок
Якщо ви хочете додати чи щось виправити, слід спершу форкнути проєкт, зробити необхідні правки та надіслати мені PR, який перегляну.
У мене є деякі вимоги щодо оформлення назв коміту, а конкретніше робити за таким шаблоном
- name: Commit name
> Де name - назва парсера, наприклад Aniage - aniage
Припустімо, ви зробили зміни одразу в кількох парсерах і ви не хочете робити купу коммітів.
- exts: Commit name
## Я хочу попросити додати нове джерело
Ви знайшли чудовий сайт з купою фільмів, серіалів і тд і хочете, щоб я додав його в CS3? Тоді пропоную Вам піти і зробити [Issue за шаблоном](https://github.com/CakesTwix/cloudstream-extensions-uk/issues/new?assignees=&labels=new-source&projects=&template=new_source.yml). Детально розпишіть про сайт, наявність API буде великим плюсом і спростить мені роботу з ним.
> Напевно не потрібно писати, що я додаю джерела, де ТІЛЬКИ українська мова. Тобто HDRezka собі не додам, хоч там є українські доріжки

BIN
CikavaIdeyaProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,27 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "А це ідея)"
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Cartoon",
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=cikava-ideya.top&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,211 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.Episode
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.newMovieLoadResponse
import com.lagradost.cloudstream3.newMovieSearchResponse
import com.lagradost.cloudstream3.newTvSeriesLoadResponse
import com.lagradost.cloudstream3.toRatingInt
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import org.json.JSONObject
import org.jsoup.nodes.Element
class CikavaIdeyaProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://cikava-ideya.top"
override var name = "Цікава Ідея"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
TvType.Cartoon,
)
private var dle_login_hash = ""
// Sections
override val mainPage = mainPageOf(
"$mainUrl/filmy/page/" to "Фільми",
"$mainUrl/serialy/page/" to "Серіали",
"$mainUrl/arthaus/page/" to "Артхаус",
"$mainUrl/cartoon/page/" to "Мультсеріали",
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(".th-item").map {
it.toSearchResponse()
}
// Need for search
dle_login_hash =
document
.body()
.selectFirst("script")!!
.html()
.substringAfterLast("dle_login_hash = '")
.substringBefore("';")
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): SearchResponse {
val title = this.selectFirst(".th-title")?.text()?.trim().toString()
val href = this.selectFirst(".th-in")?.attr("href").toString()
val posterUrl = mainUrl + this.selectFirst(".img-fit img")?.attr("src")
return newMovieSearchResponse(title, href, TvType.Movie) {
this.posterUrl = posterUrl
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document =
app.post(
url = mainUrl,
data =
mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")))
.document
return document.select(".th-item").map { it.toSearchResponse() }
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
val fullInfo = document.select(".flist li")
val title = document.selectFirst(".full h1")?.text()?.trim().toString()
val poster = mainUrl + document.selectFirst(".img-fit img")?.attr("src")
val banner = document.select(".fx-row").attr("data-img")
val tags = fullInfo[2].select("a").map { it.text() }
val year = fullInfo[0].select("li").text().toIntOrNull()
val playerUrl = document.select(".video-box iframe").attr("src")
val tvType = if (tags.contains("Фільми") or tags.contains("Артхаус")) TvType.Movie else TvType.TvSeries
val description = document.selectFirst(".fdesc")?.text()?.trim()
// val trailer = document.selectFirst("div#trailer_place iframe")?.attr("src").toString()
val rating = document.select(".likes").text().dropLast(1).toRatingInt()
// val actors = fullInfo[4].select("a").map { it.text() }
val recommendations = document.select(".th-rel").map {
it.toSearchResponse()
}
// Grab player json from html
var playerJson = JSONObject()
document.select("script").forEach {
val scriptContent = it.html()
// Skip if no switches
if (!scriptContent.contains("switches = Object")) return@forEach
val jsonStart = scriptContent.indexOf("Object(") + "Object(".length
val jsonEnd = scriptContent.lastIndexOf(");")
val jsonString = scriptContent.substring(jsonStart, jsonEnd)
playerJson = JSONObject(jsonString)
// Log.d("CakesTwix-Debug", playerJson.getJSONObject("Player1").toString())
}
// Return to app
// Parse Episodes as Series
return if (tvType == TvType.TvSeries) {
val episodesList = mutableListOf<Episode>()
if (playerJson.has("Player1")) {
val player1 = playerJson.getJSONObject("Player1")
for (seasonKey in player1.keys()) {
val episodes = player1.getJSONObject(seasonKey)
for (episodeKey in episodes.keys()) {
episodesList.add(
Episode(
episodes.getString(episodeKey),
episodeKey,
seasonKey.replace(" сезон","").toIntOrNull(),
episodeKey.replace(" серія","").toIntOrNull(),
)
)
}
}
}
newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodesList) {
this.posterUrl = poster
this.backgroundPosterUrl = banner
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
// addActors(actors)
this.recommendations = recommendations
// addTrailer(trailer)
}
} else { // Parse as Movie.
newMovieLoadResponse(title, url, TvType.Movie, playerJson.getString("Player1")) {
this.posterUrl = poster
this.backgroundPosterUrl = banner
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
// addActors(actors)
this.recommendations = recommendations
// addTrailer(trailer)
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val document = app.get(data).document
val m3u8Url = document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
M3u8Helper.generateM3u8(
source = "Цікава Ідея",
streamUrl = m3u8Url.replace("https://", "http://"),
referer = "https://tortuga.wtf/"
).last().let(callback)
val subtitleUrl = document.select("script").html()
.substringAfterLast("subtitle:\"")
.substringBefore("\",")
if(subtitleUrl.isNullOrBlank()) return true
subtitleCallback.invoke(
SubtitleFile(
subtitleUrl.substringAfterLast("[").substringBefore("]"),
subtitleUrl.substringAfter("]")
)
)
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class CikavaIdeyaProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(CikavaIdeyaProvider())
}
}

BIN
EneyidaProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,27 +0,0 @@
// use an integer for version numbers
version = 8
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Мета проекту «Енеїда» - популяризація української мови, демонстрація її різнобарвності та сучасності. Ми плануємо робити це через ретрансляцію якісного кіно, мультфільмів, телесеріалів та різноманітних телешоу в якісному українському перекладі. Тож, у добрий шлях дорогі конфіденти!."
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 3 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=eneyida.tv&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,212 +0,0 @@
package com.lagradost
import android.util.Log
import com.lagradost.models.PlayerJson
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import org.jsoup.nodes.Element
class EneyidaProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://eneyida.tv"
override var name = "Eneyida"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
TvType.Anime,
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/films/page/" to "Фільми",
"$mainUrl/series/page/" to "Серіали",
"$mainUrl/anime/page/" to "Аніме",
"$mainUrl/cartoon/page/" to "Мультфільми",
"$mainUrl/cartoon-series/page/" to "Мультсеріали",
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select("article.short").map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): SearchResponse {
val title = this.selectFirst("a.short_title")?.text()?.trim().toString()
val href = this.selectFirst("a.short_title")?.attr("href").toString()
val posterUrl = mainUrl + this.selectFirst("a.short_img img")?.attr("data-src")
return newMovieSearchResponse(title, href, TvType.Movie) {
this.posterUrl = posterUrl
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = mainUrl,
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select("article.short").map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
val fullInfo = document.select(".full_info li")
val title = document.selectFirst("div.full_header-title h1")?.text()?.trim().toString()
val poster = mainUrl + document.selectFirst(".full_content-poster img")?.attr("src")
val banner = document.select(".full_header__bg-img").attr("style").substringAfterLast("url(").substringBefore(");")
val tags = fullInfo[1].select("a").map { it.text() }
val year = fullInfo[0].select("a").text().toIntOrNull()
val playerUrl = document.select(".tabs_b.visible iframe").attr("src")
val tvType = if (tags.contains("фільм") or playerUrl.contains("/vod/")) TvType.Movie else TvType.TvSeries
val description = document.selectFirst(".full_content-desc p")?.text()?.trim()
val trailer = document.selectFirst("div#trailer_place iframe")?.attr("src").toString()
val rating = document.selectFirst(".r_kp span, .r_imdb span")?.text().toRatingInt()
val actors = fullInfo[4].select("a").map { it.text() }
val recommendations = document.select(".short.related_item").map {
it.toSearchResponse()
}
// Return to app
// Parse Episodes as Series
return if (tvType == TvType.TvSeries) {
val episodes = mutableListOf<Episode>()
val playerRawJson = app.get(playerUrl).document.select("script").html()
.substringAfterLast("file: \'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
for(episode in season.folder){ // Episodes
episodes.add(
Episode(
"${season.title}, ${episode.title}, $playerUrl",
episode.title,
season.title.replace(" Сезон ","").toIntOrNull(),
episode.title.replace("Серія ","").toIntOrNull(),
episode.poster
)
)
}
}
}
newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) {
this.posterUrl = poster
this.backgroundPosterUrl = banner
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
addActors(actors)
this.recommendations = recommendations
addTrailer(trailer)
}
} else { // Parse as Movie.
newMovieLoadResponse(title, url, TvType.Movie, "$title, $playerUrl") {
this.posterUrl = poster
this.backgroundPosterUrl = banner
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
addActors(actors)
this.recommendations = recommendations
addTrailer(trailer)
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serisl) [Season, Episode, Player Url] | (Film) [Title, Player Url]
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
// Its film, parse one m3u8
if(dataList.size == 2){
val m3u8Url = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("file: \"")
.substringBefore("\",")
M3u8Helper.generateM3u8(
source = dataList[0],
streamUrl = m3u8Url.replace("https://", "http://"),
referer = "https://tortuga.wtf/"
).last().let(callback)
val subtitleUrl = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("subtitle: \"")
.substringBefore("\",")
if(subtitleUrl.isNullOrBlank()) return true
subtitleCallback.invoke(
SubtitleFile(
subtitleUrl.substringAfterLast("[").substringBefore("]"),
subtitleUrl.substringAfter("]")
)
)
return true
}
val playerRawJson = app.get(dataList[2]).document.select("script").html()
.substringAfterLast("file: \'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
if(season.title == dataList[0]){
for(episode in season.folder){ // Episodes
if(episode.title == dataList[1]){
// Add as source
M3u8Helper.generateM3u8(
source = dubs.title,
streamUrl = episode.file.replace("https://", "http://"),
referer = "https://tortuga.wtf/"
).last().let(callback)
if(episode.subtitle.isBlank()) return@map
episode.subtitle.split(",").forEach{
subtitleCallback.invoke(
SubtitleFile(
it.substringAfterLast("[").substringBefore("]"),
it.substringAfter("]")
)
)
}
}
}
}
}
}
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class EneyidaProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(EneyidaProvider())
}
}

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

View file

@ -1,2 +0,0 @@
github: CakesTwix
buy_me_a_coffee: CakesTwix

BIN
HentaiUkrProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,29 +0,0 @@
// use an integer for version numbers
version = 3
// TODO: Need drop this
dependencies{
implementation("com.google.code.gson:gson:2.9.0")
}
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Сайт виконаний на некомерційній основі з вірою у Українську спільноту."
authors = listOf("CakesTwix")
/**
* 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=hentaiukr.com&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class HentaiUkrProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(HentaiUkrProvider())
}
}

View file

@ -1,133 +0,0 @@
package com.lagradost
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.lagradost.cloudstream3.Episode
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.newAnimeSearchResponse
import com.lagradost.cloudstream3.newHomePageResponse
import com.lagradost.cloudstream3.newTvSeriesLoadResponse
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.models.CfgModel
import com.lagradost.models.ObjectsModel
class HentaiUkrProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://hentaiukr.com"
override var name = "HentaiUkr 18+"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.NSFW,
)
private val listCfgJSONModel = object : TypeToken<List<CfgModel>>() { }.type
private val objectsUrl = "$mainUrl/search/objects.json"
// Sections
override val mainPage = mainPageOf(
objectsUrl to "\uD83D\uDD1E Хентай",
)
// Done
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data).text
// Log.d("CakesTwix-Debug", document)
val parsedJSON = Gson().fromJson(document, ObjectsModel::class.java).video
val homeList = parsedJSON.map {
newAnimeSearchResponse(it.name, "$mainUrl${it.url}", TvType.NSFW) {
this.posterUrl = "$mainUrl${it.thumb}"
this.otherName = it.orig_name
}
}
// Log.d("CakesTwix-Debug", "$cdnUrl${parsedJSON.data[1].posterId}")
return newHomePageResponse(request.name, homeList)
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.get(objectsUrl).text
val hentai = mutableListOf<SearchResponse>()
Gson().fromJson(document, ObjectsModel::class.java).video.map {
if(it.name.contains(query, true)){
hentai.add(newAnimeSearchResponse(it.name, "$mainUrl${it.url}", TvType.NSFW) {
this.posterUrl = "$mainUrl${it.thumb}"
this.otherName = it.orig_name
})
}
}
return hentai
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val parsedJSON = Gson().fromJson<List<CfgModel>>(app.get(url + "plur.cfg.json").text, listCfgJSONModel)
val document = app.get(url).document
//Log.d("CakesTwix-Debug", document.select("div[id*=year]").text().substringAfterLast(": "))
val episodes = mutableListOf<Episode>()
parsedJSON.forEachIndexed { index, cfgModel ->
episodes.add(
Episode(
"$url, $index",
"Серія ${index + 1}",
episode = index + 1,
posterUrl = "$mainUrl${cfgModel.poster}"
)
)
}
return newTvSeriesLoadResponse(
document.select("#name-ukr").text(), url, TvType.NSFW, episodes
){
this.posterUrl = "$mainUrl${document.select("#img-placeholder img").attr("src")}"
this.plot = document.select("#about").text()
this.year = document.select("div[id*=year]").text().substringAfterLast(": ").toIntOrNull()
this.tags = document.select("div.tag").map { it.select("div.name").text() }
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
val parsedJSON = Gson().fromJson<List<CfgModel>>(app.get("${dataList[0]}plur.cfg.json").text, listCfgJSONModel)[dataList[1].toInt()]
parsedJSON.sources.forEach {
// Add as source
val quality = with(it.size){
when{
this == 1080 -> Qualities.P1080.value
this == 720 -> Qualities.P720.value
this == 480 -> Qualities.P480.value
else -> Qualities.Unknown.value
}
}
callback(ExtractorLink("${dataList[0]}${it.src}","Серія ${dataList[1] + 1}", "${dataList[0]}${it.src}",
dataList[0],
quality, false))
}
return true
}
}

View file

@ -1,82 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
data class ObjectsModel (
@SerializedName("manga") val manga : List<Manga>,
@SerializedName("video") val video : List<Video>,
@SerializedName("korean") val korean : List<Korean>
)
data class Korean (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String,
@SerializedName("eng_name") val eng_name : String,
@SerializedName("orig_name") val orig_name : String,
@SerializedName("author") val author : String,
@SerializedName("sourse") val sourse : String,
@SerializedName("tags") val tags : List<Tags>,
@SerializedName("team") val team : String,
@SerializedName("url") val url : String,
@SerializedName("thumb") val thumb : String,
@SerializedName("add_date") val add_date : String
)
data class Manga (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String,
@SerializedName("eng_name") val eng_name : String,
@SerializedName("orig_name") val orig_name : String,
@SerializedName("author") val author : String,
@SerializedName("sourse") val sourse : String,
@SerializedName("tags") val tags : List<Tags>,
@SerializedName("team") val team : String,
@SerializedName("url") val url : String,
@SerializedName("thumb") val thumb : String,
@SerializedName("add_date") val add_date : String
)
data class Tags (
@SerializedName("id") val id : String,
@SerializedName("name") val name : String,
)
data class Video (
@SerializedName("id") val id : Int,
@SerializedName("name") val name : String,
@SerializedName("eng_name") val eng_name : String,
@SerializedName("orig_name") val orig_name : String,
@SerializedName("studio") val studio : String,
@SerializedName("tags") val tags : List<Tags>,
@SerializedName("team") val team : String,
@SerializedName("url") val url : String,
@SerializedName("thumb") val thumb : String,
@SerializedName("add_date") val add_date : String
)
data class CfgModel (
@SerializedName("type") val type : String,
@SerializedName("sources") val sources : List<Sources>,
@SerializedName("tracks") val tracks : List<Tracks>,
@SerializedName("poster") val poster : String
)
data class Sources (
@SerializedName("src") val src : String,
@SerializedName("size") val size : Int,
@SerializedName("type") val type : String
)
data class Tracks (
@SerializedName("src") val src : String,
@SerializedName("label") val label : String,
@SerializedName("srclang") val srclang : String,
@SerializedName("kind") val kind : String,
@SerializedName("default") val default : Boolean
)

BIN
KinoTronProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,28 +0,0 @@
// use an integer for version numbers
version = 5
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Твій KinoTron, де фільми завжди українською."
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Cartoon",
"TvSeries",
"Movie",
"Anime"
)
iconUrl = "https://www.google.com/s2/favicons?domain=kinotron.top&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,204 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.Episode
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.newMovieLoadResponse
import com.lagradost.cloudstream3.newMovieSearchResponse
import com.lagradost.cloudstream3.newTvSeriesLoadResponse
import com.lagradost.cloudstream3.toRatingInt
import com.lagradost.cloudstream3.utils.AppUtils
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.models.PlayerJson
import org.jsoup.nodes.Element
class KinoTronProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://kinotron.tv"
override var name = "KinoTron"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.Cartoon,
TvType.TvSeries,
TvType.Anime
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/serials/page/" to "Серіали",
"$mainUrl/films/page/" to "Фільми",
"$mainUrl/cartoons/page/" to "Мультфільми",
"$mainUrl/cartoon-series/page/" to "Мультсеріали",
"$mainUrl/anime/page/" to "Аніме",
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(".th-item").map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): SearchResponse {
val title = this.select(".th-title").text()
val href = this.select(".th-in").attr("href")
val posterUrl = mainUrl + this.select(".img-fit img").attr("data-src")
return newMovieSearchResponse(title, href, TvType.TvSeries) {
this.posterUrl = posterUrl
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = "$mainUrl/index.php?do=search",
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select(".th-item").map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
val title = document.select(".full h1").text()
val poster = mainUrl + document.select(".img-box img").attr("data-src")
val tags = document.select(".flist li")[2].select("a").map { it.text() }
val year = document.select(".flist li")[0].select("a").text().toIntOrNull()
var tvType = with(document.select(".fsubtitle").text()) {
when {
contains("аніме") -> TvType.Anime
contains("серіал") -> TvType.TvSeries
contains("мультсеріал") -> TvType.Cartoon
else -> {
TvType.Movie
}
}
}
val description = document.select(".full-text").text()
// val author = someInfo.select("strong:contains(Студія:)").next().html()
val rating = document.selectFirst(".fqualityimdb")?.text().toRatingInt()
// Parse episodes
val episodes = mutableListOf<Episode>()
val playerUrl = document.select("div.video-box iframe").attr("data-src")
if (playerUrl.contains("/vod/")) { tvType = TvType.Movie }
// Log.d("load-debug", playerUrl)
// Return to app
// Parse Episodes as Series
return if (tvType == TvType.TvSeries || tvType == TvType.Anime) {
val playerRawJson = app.get(playerUrl).document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
for(episode in season.folder){ // Episodes
episodes.add(
Episode(
"${season.title}, ${episode.title}, $playerUrl",
episode.title,
season.title.replace(" Сезон ","").toIntOrNull(),
episode.title.replace("Серія ","").toIntOrNull(),
episode.poster
)
)
}
}
}
newTvSeriesLoadResponse(title, url, tvType, episodes) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
}
} else { // Parse as Movie.
newMovieLoadResponse(title, url, TvType.Movie, "$title, $playerUrl") {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serisl) [Season, Episode, Player Url] | (Film) [Title, Player Url]
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
// Its film, parse one m3u8
if(dataList.size == 2){
val m3u8Url = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
M3u8Helper.generateM3u8(
source = dataList[0],
streamUrl = m3u8Url,
referer = "https://tortuga.wtf/"
).last().let(callback)
return true
}
val playerRawJson = app.get(dataList[2]).document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
if(season.title == dataList[0]){
for(episode in season.folder){ // Episodes
if(episode.title == dataList[1]){
// Add as source
M3u8Helper.generateM3u8(
source = dubs.title,
streamUrl = episode.file,
referer = "https://tortuga.wtf/"
).last().let(callback)
}
}
}
}
}
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class KinoTronProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(KinoTronProvider())
}
}

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

BIN
KinoVezhaProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,27 +0,0 @@
// use an integer for version numbers
version = 5
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Наша мета — популяризація нашої рідної мови, шляхом збору в одному місці величезної колекції найкращих і найпопулярніших фільмів, серіалів, мультфільмів та мультсеріалів українською мовою, які ви можете дивитися онлайн в HD якості безкоштовно. Приємного перегляду!"
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Cartoon",
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=kinovezha.com&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,177 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.models.PlayerJson
import com.lagradost.cloudstream3.utils.AppUtils
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import org.jsoup.nodes.Element
class KinoVezhaProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://kinovezha.com"
override var name = "KinoVezha"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.Cartoon,
TvType.TvSeries
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/series/page/" to "Серіали",
"$mainUrl/films/page/" to "Фільми",
"$mainUrl/cartoons/page/" to "Мультфільми",
"$mainUrl/s-cartoons/page/" to "Мультсеріали",
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(".movie-item").map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): SearchResponse {
val title = this.select(".movie-item__title").text()
val href = this.select(".movie-item__link").attr("href").toString()
val posterUrl = mainUrl + this.select(".img-fit-cover img").attr("data-src")
return newMovieSearchResponse(title, href, TvType.TvSeries) {
this.posterUrl = posterUrl
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = "$mainUrl/index.php?do=search",
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select(".movie-item").map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
val title = document.select(".inner-page__title").text()
val poster = mainUrl + document.select(".img-fit-cover img").attr("src")
val tags = document.select(".inner-page__list li")[1].select("a").map { it.text() }
// Log.d("load-debug", tags.toString())
val year = document.select(".inner-page__list li")[0].select("a").text().toIntOrNull()
val tvType = if(tags.contains("Мультсеріали") or tags.contains("Серіали")) TvType.TvSeries else TvType.Movie
val description = document.select("div.inner-page__text").text()
// val author = someInfo.select("strong:contains(Студія:)").next().html()
val rating = document.selectFirst(".dd-imdb-colours")?.text().toRatingInt()
// Parse episodes
val episodes = mutableListOf<Episode>()
val playerUrl = document.select(".video-responsive > iframe").attr("src")
// Return to app
// Parse Episodes as Series
return if (tvType == TvType.TvSeries) {
val playerRawJson = app.get(playerUrl).document.select("script").html()
.substringAfterLast("file: \'")
.substringBefore("\',")
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
for(episode in season.folder){ // Episodes
episodes.add(
Episode(
"${season.title}, ${episode.title}, $playerUrl",
episode.title,
season.title.replace(" Сезон ","").toIntOrNull(),
episode.title.replace("Серія ","").toIntOrNull(),
episode.poster
)
)
}
}
}
newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
}
} else { // Parse as Movie.
newMovieLoadResponse(title, url, TvType.Movie, "$title, $playerUrl") {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serisl) [Season, Episode, Player Url] | (Film) [Title, Player Url]
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
// Its film, parse one m3u8
if(dataList.size == 2){
val m3u8Url = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("file: \"")
.substringBefore("\",")
M3u8Helper.generateM3u8(
source = dataList[0],
streamUrl = m3u8Url,
referer = "https://tortuga.wtf/"
).last().let(callback)
return true
}
val playerRawJson = app.get(dataList[2]).document.select("script").html()
.substringAfterLast("file: \'")
.substringBefore("\',")
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
if(season.title == dataList[0]){
for(episode in season.folder){ // Episodes
if(episode.title == dataList[1]){
// Add as source
M3u8Helper.generateM3u8(
source = dubs.title,
streamUrl = episode.file,
referer = "https://tortuga.wtf/"
).last().let(callback)
}
}
}
}
}
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class KinoVezhaProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(KinoVezhaProvider())
}
}

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

BIN
KlonTVProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,28 +0,0 @@
// use an integer for version numbers
version = 6
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Команда Klon.TV створила безкоштовний онлайн-сервіс, щоб кожен наш глядач з легкістю та без зайвих суперечок вибрав цікавий фільм, або одразу продовжив дивитися улюблений серіал. Минула та пора, коли треба стежити за афішами твого міста, і вгадувати якість майбутньої стрічки. Також вже можна забути про трату часу на довгу дорогу в кінотеатр, півгодинного перегляду трейлерів перед показом, сусідами, що чавкають, яким не зрозуміти, що фільм треба іноді й слухати, а не тільки дивитися. Вибравши наш сервіс для перегляду фільмів онлайн безкоштовно, ви будете приємно здивовані: українське озвучення, перегляд без реєстрації, ніякої реклами на весь екран, і багато інших цікавих можливостей. Klon.TV - цінує кожного глядача, і зробить все можливе, щоб Ви до нас повернулися:)."
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
"TvSeries",
"Cartoon",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=klon.tv&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,238 +0,0 @@
package com.lagradost
import com.lagradost.models.PlayerJson
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.models.GeneralInfo
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
class KlonTVProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://klon.tv"
override var name = "KlonTV"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Anime,
TvType.TvSeries,
TvType.Cartoon,
TvType.Movie,
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/serialy/page/" to "Серіали",
"$mainUrl/anime/page/" to "Аніме",
"$mainUrl/filmy/page/" to "Зарубіжні фільми",
"$mainUrl/multfilmy/page/" to "Мультфільми",
"$mainUrl/multserialy/page/" to "Мультсеріали",
)
// Main Page
private val animeSelector = ".short-news__slide-item"
private val titleSelector = ".card-link__style, .text-module__main"
private val hrefSelector = titleSelector
private val posterSelector = ".card-poster__img, .cover-image, .owl-carousel .owl-item img"
// Load info
private val titleLoadSelector = ".seo-h1__position"
private val genresSelector = ".table-info__link"
private val yearSelector = ".table-info__link a"
private val playerSelector = "div.film-player iframe"
private val descriptionSelector = ".info-clamp__hid"
private val recommendationsSelector = ".related-news__small-card"
// private val ratingSelector = ".pmovie__subrating img"
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(animeSelector).map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): AnimeSearchResponse {
val title = this.selectFirst(titleSelector)?.text()?.trim().toString()
val href = this.selectFirst(hrefSelector)?.attr("href").toString()
val posterUrl = mainUrl + this.selectFirst(posterSelector)?.attr("data-src")
val status = this.select(".poster__label").text()
return newAnimeSearchResponse(title, href, TvType.Anime) {
this.posterUrl = posterUrl
addDubStatus(isDub = true)
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = mainUrl,
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select(animeSelector).map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// Parse info
val titleJson = tryParseJson<GeneralInfo>(document.selectFirst("script[type=application/ld+json]")?.html())!!
// JSON
val title = titleJson.name
val poster = titleJson.image
val rating = titleJson.aggregateRating?.ratingValue.toString().toRatingInt()
val actors = titleJson.actor.map { it.name }
// HTML
val tags = document.select(genresSelector).map { it.text() }
val year = document.selectFirst(yearSelector)?.text()?.toIntOrNull()
val playerUrl = document.select(playerSelector).attr("data-src")
var tvType = with(tags){
when{
contains("Серіали") -> TvType.TvSeries
contains("Фільми") -> TvType.Movie
contains("Аніме") -> TvType.Anime
contains("Мультфільми") -> TvType.Movie
contains("Мультсеріали") -> TvType.TvSeries
else -> TvType.TvSeries
}
}
// https://klon.tv/filmy/1783-rik-ta-morti.html not movie
if(playerUrl.contains("/serial/")){ tvType = TvType.TvSeries }
val description = Jsoup.parse(titleJson.description).text()
val recommendations = document.select(recommendationsSelector).map {
it.toSearchResponse()
}
// Return to app
// Parse Episodes as Series
return if (tvType != TvType.Movie) {
val episodes = mutableListOf<Episode>()
val playerRawJson = app.get(playerUrl).document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
for(episode in season.folder){ // Episodes
episodes.add(
Episode(
"${season.title}, ${episode.title}, $playerUrl",
episode.title,
season.title.replace(" Сезон ","").toIntOrNull(),
episode.title.replace("Серія ","").toIntOrNull(),
episode.poster
)
)
}
}
}
newAnimeLoadResponse(title, url, tvType) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
this.recommendations = recommendations
addEpisodes(DubStatus.Dubbed, episodes)
addActors(actors)
}
} else { // Parse as Movie.
newMovieLoadResponse(title, url, tvType, "$title, $playerUrl") {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
this.recommendations = recommendations
addActors(actors)
}
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serisl) [Season, Episode, Player Url] | (Film) [Title, Player Url]
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
// Its film, parse one m3u8
if(dataList.size == 2){
val m3u8Url = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("file:\"")
.substringBefore("\",")
M3u8Helper.generateM3u8(
source = dataList[0],
streamUrl = m3u8Url,
referer = "https://tortuga.wtf/"
).last().let(callback)
val subtitleUrl = app.get(dataList[1]).document.select("script").html()
.substringAfterLast("subtitle: \"")
.substringBefore("\",")
if(subtitleUrl.isNullOrBlank()) return true
subtitleCallback.invoke(
SubtitleFile(
subtitleUrl.substringAfterLast("[").substringBefore("]"),
subtitleUrl.substringAfter("]")
)
)
return true
}
val playerRawJson = app.get(dataList[2]).document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
if(season.title == dataList[0]){
for(episode in season.folder){ // Episodes
if(episode.title == dataList[1]){
// Add as source
M3u8Helper.generateM3u8(
source = dubs.title,
streamUrl = episode.file,
referer = "https://tortuga.wtf/"
).last().let(callback)
if(episode.subtitle.isBlank()) return true
subtitleCallback.invoke(
SubtitleFile(
episode.subtitle.substringAfterLast("[").substringBefore("]"),
episode.subtitle.substringAfter("]")
)
)
}
}
}
}
}
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class KlonTVProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(KlonTVProvider())
}
}

View file

@ -1,57 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.app
class Tracker {
suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
// Log.d("load-debug", media.toString())
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
))
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
val romaji: String? = null,
val english: String? = null,
)
data class Results(
val aniId: String? = null,
val malId: Int? = null,
val title: Title? = null,
val releaseDate: Int? = null,
val type: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class AniSearch(
val results: ArrayList<Results>? = arrayListOf(),
)
private data class Episodes(
val file: String? = null,
val title: String? = null,
val poster: String? = null,
)
private data class Home(
val table: String? = null,
)
private data class Search(
val mes: String? = null,
)
}

View file

@ -1,41 +0,0 @@
package com.lagradost.models
data class GeneralInfo (
val url : String,
val name : String,
val alternativeHeadline : String,
val description : String,
val image : String,
val isFamilyFriendly : Boolean,
val timeRequired : Int,
val datePublished : String,
val director : List<Director>,
val actor : List<Actor>,
val countryOfOrigin : List<CountryOfOrigin>,
val aggregateRating : AggregateRating?,
)
data class Director (
val name : String
)
data class Actor (
val name : String
)
data class CountryOfOrigin (
val name : String
)
data class AggregateRating (
val bestRating : Int,
val ratingValue : Double,
val ratingCount : Int
)

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

674
LICENSE
View file

@ -1,674 +0,0 @@
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>.

View file

@ -1,45 +0,0 @@
<p align="center">
<!-- Title -->
<img src="assets/cloudstream3.png" width="128"/><br>
<b>🇺🇦 Розширення Cloudstream (Україна)</b>
</p>
<p align="center">
<img src="https://img.shields.io/github/languages/code-size/CakesTwix/cloudstream-extensions-uk?style=for-the-badge"/>
<img src="https://img.shields.io/github/actions/workflow/status/CakesTwix/cloudstream-extensions-uk/build.yml?style=for-the-badge"/>
<img src="https://img.shields.io/badge/Made_with-Kotlin-8051ff?style=for-the-badge&logo=kotlin"/>
</p>
| <p align="center"><img src="assets/ss1.png"/></p> | <p align="center"><img src="assets/ss2.png"/></p> | <p align="center"><img src="assets/ss3.png"/></p> | <p align="center"><img src="assets/ss4.png"/></p> |
|-----|--------|-----|--------|
<!-- Brief information about the extension -->
## 📖 Що це таке?
Це спеціальне розширення для перегляду фільмів, серіалів та аніме в якісному українському дубляжу від різних постачальників в стрімінговій програмі [Cloudstream](https://github.com/recloudstream/cloudstream).
<!-- Installation guide -->
## ⚙️ Інсталяція
Скопіюйте посилання нижче і перейдіть в Додаток -> Параметри -> Розширення -> Додати репозиторій
```
https://git.cakestwix.com/CakesTwix/cloudstream-extensions-uk/raw/branch/master/repo.json
```
<!-- Support -->
## ✅ Підтримка
- [Fediverse](https://pl.m0e.space/mangane/@CakesTwix) aka @CakesTwix@shkey.cakestwix.com
- [Matrix-чат](https://matrix.to/#/#cakestwix:matrix.org)
<!-- Contributing -->
## 💖 Зробити внесок
Внески завжди вітаються! Якщо щось зламається - не кричіть, що гівно, краще піду в X. Краще напишіть Issue про проблему, яка у вас трапилася. Я давно вже не користуюся своїм творінням, тому баги, які останнім часом фікшу - багрепорти від користувачів. Так само буду радий, якщо ви особисто надішлете мені Pull Request!
## 🛠 Збірка
- Windows: `.\gradlew.bat ExampleProvider:make` або `.\gradlew.bat ExampleProvider:deployWithAdb`
- Linux & Mac: `./gradlew ExampleProvider:make` або `./gradlew ExampleProvider:deployWithAdb`
<!-- Developers -->
## ⭐️ Розробники
- [@CakesTwix](https://www.github.com/CakesTwix)
<p align="center">
<br><a href="https://discord.gg/5Hus6fM"><img src="https://invidget.switchblade.xyz/5Hus6fM"/></a>
</p>

BIN
SerialnoProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,26 +0,0 @@
// use an integer for version numbers
version = 5
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Відкриваємо світ серіалів, фентезі, містики, екшну, драми та ще безлічі інших жанрів українською мовою - все це Серіально.ТВ. Можна багато чого писати, але сенсу особливо немає. Ви тут, а значить прийшли дивитися серіали. То ж, вперед!:)"
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Cartoon",
"TvSeries",
)
iconUrl = "https://www.google.com/s2/favicons?domain=serialno.tv&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,183 +0,0 @@
package com.lagradost
import com.lagradost.api.Log
import com.lagradost.cloudstream3.Episode
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.newMovieSearchResponse
import com.lagradost.cloudstream3.newTvSeriesLoadResponse
import com.lagradost.cloudstream3.toRatingInt
import com.lagradost.cloudstream3.utils.AppUtils
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.models.PlayerJson
import org.jsoup.nodes.Element
class SerialnoProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://serialno.tv"
override var name = "Serialno"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.Cartoon,
TvType.TvSeries,
TvType.Anime
)
// Sections
override val mainPage = mainPageOf(
"$mainUrl/series/page/" to "Серіали",
"$mainUrl/cartoons/page/" to "Мультсеріали",
"$mainUrl/mini-serials/page/" to "Міні-серіали",
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val document = app.get(request.data + page).document
val home = document.select(".th-item").map {
it.toSearchResponse()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResponse(): SearchResponse {
val title = this.select(".th-title").text()
val href = this.select(".th-in").attr("href")
val posterUrl = mainUrl + this.select(".img-fit img").attr("data-src")
return newMovieSearchResponse(title, href, TvType.TvSeries) {
this.posterUrl = posterUrl
}
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.post(
url = "$mainUrl/",
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
return document.select(".th-item").map {
it.toSearchResponse()
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
// General info
val generalInfo = document.select(".flist li")
// Parse info
val title = document.select(".full h1").text()
val poster = document.select(".fposter a").attr("href")
val tags = mutableListOf<String>()
// Can be smaller
if (generalInfo.size > 4) {
document.select(".flist li")[4].select("a").map { tags.add(it.text()) }
} else {
document.select(".flist li")[3].select("a").map { tags.add(it.text()) }
}
val year = document.select(".flist li")[1].select("a").text().toIntOrNull()
val tvType = TvType.TvSeries
val description = document.select(".full-text").text()
// val author = someInfo.select("strong:contains(Студія:)").next().html()
val rating = document.selectFirst(".th-voice")?.text().toRatingInt()
// Parse episodes
val episodes = mutableListOf<Episode>()
val playerUrl = document.select("div.video-box iframe").attr("src")
// Return to app
// Parse Episodes as Series
val playerRawJson = app.get(playerUrl).document.select("script").html()
.substringAfterLast("file: \'")
.substringBefore("\',")
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for (season in dubs.folder) { // Seasons
for (episode in season.folder) { // Episodes
episodes.add(
Episode(
"${season.title}, ${episode.title}, $playerUrl",
episode.title,
season.title.replace(" Сезон ", "").toIntOrNull(),
episode.title.replace("Серія ", "").toIntOrNull(),
episode.poster
)
)
}
}
}
return newTvSeriesLoadResponse(title, url, tvType, episodes) {
this.posterUrl = poster
this.year = year
this.plot = description
this.tags = tags
this.rating = rating
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String, // (Serial) [Season, Episode, Player Url]
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val dataList = data.split(", ")
Log.d("CakesTwix-Debug", data)
val playerRawJson = app.get(dataList[2]).document.select("script").html()
.substringAfterLast("file: \'")
.substringBefore("\',")
AppUtils.tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
for(season in dubs.folder){ // Seasons
if(season.title == dataList[0]){
for(episode in season.folder){ // Episodes
if(episode.title == dataList[1]){
// Add as source
M3u8Helper.generateM3u8(
source = dubs.title,
streamUrl = episode.file,
referer = "https://tortuga.wtf/"
).last().let(callback)
if(episode.subtitle.isNullOrBlank()) return true
subtitleCallback.invoke(
SubtitleFile(
episode.subtitle.substringAfterLast("[").substringBefore("]"),
episode.subtitle.substringAfter("]")
)
)
}
}
}
}
}
return true
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class SerialnoProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(SerialnoProvider())
}
}

View file

@ -1,22 +0,0 @@
package com.lagradost.models
data class PlayerJson (
val title : String,
val folder : List<Season>
)
data class Season (
val title : String,
val folder : List<Episode>
)
data class Episode (
val title : String,
val file : String,
val id : String,
val poster : String,
val subtitle : String,
)

BIN
TeleportalProvider.cs3 Normal file

Binary file not shown.

View file

@ -1,29 +0,0 @@
// use an integer for version numbers
version = 3
dependencies{
implementation("com.google.code.gson:gson:2.9.0")
}
cloudstream {
language = "uk"
// All of these properties are optional, you can safely remove them
description = "Telepotral - Серіали. шоу, Док. фільми"
authors = listOf("CakesTwix")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Series",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=teleportal.ua&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,171 +0,0 @@
package com.lagradost
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.lagradost.cloudstream3.DubStatus
import com.lagradost.cloudstream3.Episode
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.addEpisodes
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.mainPageOf
import com.lagradost.cloudstream3.newAnimeLoadResponse
import com.lagradost.cloudstream3.newAnimeSearchResponse
import com.lagradost.cloudstream3.newHomePageResponse
import com.lagradost.cloudstream3.newMovieLoadResponse
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.models.Media
import com.lagradost.models.MediaShows
import com.lagradost.models.Search
import com.lagradost.models.SeasonModel
import com.lagradost.models.TitleShows
import com.lagradost.models.VideoPlayer
class TeleportalProvider : MainAPI() {
// Basic Info
override var mainUrl = "https://teleportal.ua"
override var name = "Teleportal"
override val hasMainPage = true
override var lang = "uk"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.TvSeries,
TvType.Movie,
)
private val apiUrl = "https://tp-back.starlight.digital"
private val findUrl = "$apiUrl/ua/live-search?q="
private val playerUrl = "https://vcms-api2.starlight.digital/player-api/"
private val listSearch = object : TypeToken<List<Search>>() {}.type
// Sections
override val mainPage = mainPageOf(
"$apiUrl/ua/serials" to "Серіали",
"$apiUrl/ua/show" to "Шоу",
"$apiUrl/ua/documentaries" to "Документальні фільми",
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
// Movies
if(request.data.substringAfterLast("/") == "documentaries"){
val homeList = Gson().fromJson(app.get(request.data).text, Media::class.java).items.map{
newAnimeSearchResponse(it.title, "$apiUrl/ua${it.videoSlug}", TvType.TvSeries) {
this.posterUrl = "$mainUrl${it.image}"
}
}
return newHomePageResponse(request.name, homeList)
}
// Shows
else {
val homeList = Gson().fromJson(app.get(request.data).text, MediaShows::class.java).items.map{
newAnimeSearchResponse(it.name, "$apiUrl/ua/${request.data.substringAfterLast("/")}/${it.channelSlug}/${it.projectSlug}", TvType.TvSeries) {
this.posterUrl = "$mainUrl${it.image}"
}
}
return newHomePageResponse(request.name, homeList)
}
}
override suspend fun search(query: String): List<SearchResponse> {
return Gson().fromJson<List<Search>>(app.get("$findUrl$query").text, listSearch).map{
newAnimeSearchResponse(it.title, "$apiUrl/ua/${it.typeSlug}/${it.channelSlug}/${it.projectSlug}", TvType.TvSeries) {
this.posterUrl = "$mainUrl/${it.image}"
}
}
}
// Detailed information
override suspend fun load(url: String): LoadResponse {
//val title = app.get(url).parsedSafe<TitleShows>()!!
val title = Gson().fromJson(app.get(url).text, TitleShows::class.java)
val tvType = when(title.typeSlug){
"show" -> TvType.TvSeries
"series" -> TvType.TvSeries
"serials" -> TvType.TvSeries
else -> TvType.Movie
}
val episodes = mutableListOf<Episode>()
if (tvType == TvType.TvSeries){
title.seasons.map{
val season = Gson().fromJson(app.get("$url/${it.seasonSlug}").text, SeasonModel::class.java)
if(season.seasonGallery.items.isNullOrEmpty()) return@map
season.seasonGallery.items.forEach { episode ->
episodes.add(
Episode(
"$url/${it.seasonSlug}/${episode.videoSlug}",
episode.title,
extractIntFromString(season.seasonTitle),
extractIntFromString(episode.seriesTitle),
"$mainUrl${episode.image}",
description = episode.tizer,
)
)
}
}
return newAnimeLoadResponse(
title.title,
"$mainUrl${title.projectSlug}",
tvType,
) {
this.posterUrl = "$mainUrl${title.image}"
this.plot = title.description
addEpisodes(DubStatus.Dubbed, episodes)
}
}
return newMovieLoadResponse(title.title, url, TvType.Movie, "$apiUrl/ua/${title.typeSlug}/${title.channelSlug}/${title.videoSlug}") {
this.posterUrl = "$mainUrl${title.image}"
this.plot = title.description
}
}
// It works when I click to view the series
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
// Log.d("CakesTwix-Debug", data)
val videoHash = Gson().fromJson(app.get(data).text, TitleShows::class.java).hash
// Log.d("CakesTwix-Debug", "$playerUrl$videoHash?referer=https://teleportal.ua/")
val video = Gson().fromJson(app.get("$playerUrl$videoHash?referer=https://teleportal.ua/").text, VideoPlayer::class.java).video[0]
// Log.d("CakesTwix-Debug", video.toString())
if(video.mediaHlsNoAdv.isNullOrEmpty()) return false
// Log.d("CakesTwix-Debug", video.mediaHlsNoAdv)
M3u8Helper.generateM3u8(
source = video.projectName,
streamUrl = video.mediaHlsNoAdv,
referer = mainUrl
).last().let(callback)
return true
}
private fun extractIntFromString(string: String): Int? {
val value = Regex("(\\d+)").findAll(string).lastOrNull() ?: return null
if(value.value[0].toString() == "0"){
return value.value.drop(1).toIntOrNull()
}
return value.value.toIntOrNull()
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class TeleportalProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(TeleportalProvider())
}
}

View file

@ -1,23 +0,0 @@
package com.lagradost.models
data class Media(
val galleryName : String,
val typeSlug : String,
val seoTitle : String,
val seoDescription : String,
val seoKeywords : String,
val channels : List<String>,
val items : List<Items>
)
data class Items (
val title : String,
val tizer : String,
val image : String,
val imageMob : String,
val videoSlug : String,
val seriesTitle : String,
)

View file

@ -1,30 +0,0 @@
package com.lagradost.models
data class MediaShows (
val galleryName : String,
val typeSlug : String,
val seoTitle : String,
val seoDescription : String,
val seoKeywords : String,
val channels : List<Channels>,
val items : List<ItemsShows>
)
data class Channels (
val title : String,
val channelSlug : String,
val seoTitle : String,
val seoDescription : String,
val seoKeywords : String
)
data class ItemsShows (
val name : String,
val image : String,
val imageMob : String,
val channelSlug : String,
val projectSlug : String
)

View file

@ -1,14 +0,0 @@
package com.lagradost.models
data class Search (
val id : Int,
val title : String,
val age : Int,
val image : String,
val description : String,
val typeSlug : String,
val channelSlug : String,
val projectSlug : String,
val seasons : String
)

View file

@ -1,36 +0,0 @@
package com.lagradost.models
data class SeasonModel (
val id : Int,
val seoTitle : String,
val seoDescription : String,
val seoKeywords : String,
val typeTitle : String,
val channelTitle : String,
val channelImage : String,
val sortableCompilations : String,
val projectTitle : String,
val seasonTitle : String,
val age : String,
val image : String,
val imageTab : String,
val imageMob : String,
val logoImage : String,
val description : String,
val typeSlug : String,
val channelSlug : String,
val projectSlug : String,
val seasonSlug : String,
val personPage : Boolean,
// val persons : List<Persons>,
val seasons : List<Seasons>,
val seasonGallery : SeasonGallery,
)
data class SeasonGallery (
val title : String,
val seasonSlug : String,
val items : List<Items>
)

View file

@ -1,27 +0,0 @@
package com.lagradost.models
data class TitleShows (
val id : Int,
val typeTitle : String,
val title : String,
val image : String,
val imageTab : String,
val imageMob : String,
val logoImage : String,
val description : String,
val typeSlug : String,
val channelSlug : String,
val projectSlug : String,
val videoSlug : String,
val seasons : List<Seasons>,
val video : String,
val hash : String,
)
data class Seasons (
val id : Int,
val title : String,
val seasonSlug : String
)

View file

@ -1,49 +0,0 @@
package com.lagradost.models
data class VideoPlayer (
val version : String,
val type : String,
val poster : String,
val posterMob : String,
val name : String,
val video : List<Video>
)
data class Video (
val vcmsId : Int,
val hash : String,
val channel : String,
val channel_domain : String,
val project_id : String,
val projectName : String,
val seasonName : String,
val releaseName : String,
val year_of_production : Int,
val countries_of_production : List<String>,
val content_language : List<String>,
val publishDate : String,
val date_of_broadcast : String,
val time_upload_video : String,
val cache_time : String,
val current_time : String,
val videoAccessible : Boolean,
val videoAccessible_type : String,
val autoplay : Boolean,
val showadv : Boolean,
val anons : Boolean,
val program : String,
val name : String,
val duration : Int,
val poster : String,
val projectPostURL : String,
val preview_url : String,
val tt : String,
val plug_type : String,
val canonicalPageUrl : String,
val media : List<Media>,
val mediaHls : String,
val mediaHlsNoAdv : String,
val availableHls : Int
)

Some files were not shown because too many files have changed in this diff Show more