Anime providers [indonesian] : Moved into inbuild tracker

This commit is contained in:
hexated 2023-05-20 03:21:12 +07:00
parent c138edbafa
commit cca513b1ff
20 changed files with 26 additions and 522 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 7 version = 8
cloudstream { cloudstream {

View file

@ -1,9 +1,6 @@
package com.hexated package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.mvvm.safeApiCall import com.lagradost.cloudstream3.mvvm.safeApiCall
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
@ -113,8 +110,6 @@ class AnimeSailProvider : MainAPI() {
val type = document.select("tbody th:contains(Tipe)").next().text().lowercase() val type = document.select("tbody th:contains(Tipe)").next().text().lowercase()
val year = document.select("tbody th:contains(Dirilis)").next().text().trim().toIntOrNull() val year = document.select("tbody th:contains(Dirilis)").next().text().trim().toIntOrNull()
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val episodes = document.select("ul.daftar > li").map { val episodes = document.select("ul.daftar > li").map {
val link = fixUrl(it.select("a").attr("href")) val link = fixUrl(it.select("a").attr("href"))
val name = it.select("a").text() val name = it.select("a").text()
@ -123,8 +118,7 @@ class AnimeSailProvider : MainAPI() {
}.reversed() }.reversed()
return newAnimeLoadResponse(title, url, getType(type)) { return newAnimeLoadResponse(title, url, getType(type)) {
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = showStatus =
@ -132,8 +126,6 @@ class AnimeSailProvider : MainAPI() {
plot = document.selectFirst("div.entry-content > p")?.text() plot = document.selectFirst("div.entry-content > p")?.text()
this.tags = this.tags =
document.select("tbody th:contains(Genre)").next().select("a").map { it.text() } document.select("tbody th:contains(Genre)").next().select("a").map { it.text() }
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
} }
} }
@ -165,7 +157,7 @@ class AnimeSailProvider : MainAPI() {
else -> this.name else -> this.name
} }
val quality = val quality =
Regex("\\.([0-9]{3,4})\\.").find(link)?.groupValues?.get(1) Regex("\\.(\\d{3,4})\\.").find(link)?.groupValues?.get(1)
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
source = source, source = source,
@ -201,41 +193,4 @@ class AnimeSailProvider : MainAPI() {
return true return true
} }
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
} }

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 4 version = 5
cloudstream { cloudstream {

View file

@ -2,8 +2,6 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
import java.util.ArrayList import java.util.ArrayList
@ -100,7 +98,6 @@ class Gomunimeis : MainAPI() {
)?.groupValues?.get(1)?.toIntOrNull() )?.groupValues?.get(1)?.toIntOrNull()
val status = getStatus(document.selectFirst(".spe > span")!!.ownText()) val status = getStatus(document.selectFirst(".spe > span")!!.ownText())
val description = document.select("div[itemprop = description] > p").text() val description = document.select("div[itemprop = description] > p").text()
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val episodes = document.select(".eplister > ul > li").map { val episodes = document.select(".eplister > ul > li").map {
val episode = Regex("Episode\\s?(\\d+)").find( val episode = Regex("Episode\\s?(\\d+)").find(
it.select(".epl-title").text() it.select(".epl-title").text()
@ -111,13 +108,10 @@ class Gomunimeis : MainAPI() {
return newAnimeLoadResponse(title, url, getType(type)) { return newAnimeLoadResponse(title, url, getType(type)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
plot = description plot = description
this.tags = tags this.tags = tags
} }
@ -142,43 +136,6 @@ class Gomunimeis : MainAPI() {
return true return true
} }
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
data class Streamsb( data class Streamsb(
@JsonProperty("link") val link: String?, @JsonProperty("link") val link: String?,
) )

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 10 version = 11
cloudstream { cloudstream {

View file

@ -1,16 +1,12 @@
package com.hexated package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.mvvm.safeApiCall import com.lagradost.cloudstream3.mvvm.safeApiCall
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.Jsoup import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import java.util.ArrayList
class KuramanimeProvider : MainAPI() { class KuramanimeProvider : MainAPI() {
override var mainUrl = "https://kuramanime.net" override var mainUrl = "https://kuramanime.net"
@ -112,7 +108,6 @@ class KuramanimeProvider : MainAPI() {
) )
val type = document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()?.lowercase() ?: "tv" val type = document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()?.lowercase() ?: "tv"
val description = document.select(".anime__details__text > p").text().trim() val description = document.select(".anime__details__text > p").text().trim()
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val episodes = mutableListOf<Episode>() val episodes = mutableListOf<Episode>()
@ -142,14 +137,11 @@ class KuramanimeProvider : MainAPI() {
return newAnimeLoadResponse(title, url, getType(type, episodes.size)) { return newAnimeLoadResponse(title, url, getType(type, episodes.size)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
plot = description plot = description
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
this.tags = tags this.tags = tags
this.recommendations = recommendations this.recommendations = recommendations
} }
@ -212,41 +204,4 @@ class KuramanimeProvider : MainAPI() {
return true return true
} }
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
} }

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 10 version = 11
cloudstream { cloudstream {

View file

@ -2,8 +2,6 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.mvvm.safeApiCall import com.lagradost.cloudstream3.mvvm.safeApiCall
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
@ -128,7 +126,6 @@ class KuronimeProvider : MainAPI() {
val year = Regex("\\d, (\\d*)").find( val year = Regex("\\d, (\\d*)").find(
document.select(".infodetail > ul > li:nth-child(5)").text() document.select(".infodetail > ul > li:nth-child(5)").text()
)?.groupValues?.get(1)?.toIntOrNull() )?.groupValues?.get(1)?.toIntOrNull()
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val status = getStatus( val status = getStatus(
document.selectFirst(".infodetail > ul > li:nth-child(3)")!!.ownText() document.selectFirst(".infodetail > ul > li:nth-child(3)")!!.ownText()
.replace(Regex("\\W"), "") .replace(Regex("\\W"), "")
@ -145,14 +142,11 @@ class KuronimeProvider : MainAPI() {
return newAnimeLoadResponse(title, url, getType(type)) { return newAnimeLoadResponse(title, url, getType(type)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
plot = description plot = description
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
addTrailer(trailer) addTrailer(trailer)
this.tags = tags this.tags = tags
} }
@ -211,43 +205,6 @@ class KuronimeProvider : MainAPI() {
return true return true
} }
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
data class All( data class All(
@JsonProperty("post_image") var postImage: String? = null, @JsonProperty("post_image") var postImage: String? = null,
@JsonProperty("post_image_html") var postImageHtml: String? = null, @JsonProperty("post_image_html") var postImageHtml: String? = null,

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 6 version = 7
cloudstream { cloudstream {

View file

@ -1,15 +1,11 @@
package com.hexated package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import java.net.URI import java.net.URI
import java.util.*
class NeonimeProvider : MainAPI() { class NeonimeProvider : MainAPI() {
override var mainUrl = "https://neonime.fun" override var mainUrl = "https://neonime.fun"
@ -124,17 +120,13 @@ class NeonimeProvider : MainAPI() {
val mPoster = document.selectFirst(".sbox > .imagen > .fix > img[itemprop = image]")?.attr("data-src") val mPoster = document.selectFirst(".sbox > .imagen > .fix > img[itemprop = image]")?.attr("data-src")
val mTrailer = document.selectFirst("div.youtube_id iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"} val mTrailer = document.selectFirst("div.youtube_id iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"}
val year = document.selectFirst("a[href*=release-year]")!!.text().toIntOrNull() val year = document.selectFirst("a[href*=release-year]")!!.text().toIntOrNull()
val (malId, anilistId, image, cover) = getTracker(mTitle, "movie", year)
return newMovieLoadResponse(name = mTitle, url = url, type = TvType.Movie, dataUrl = url) { return newMovieLoadResponse(name = mTitle, url = url, type = TvType.Movie, dataUrl = url) {
posterUrl = image ?: mPoster posterUrl = mPoster
backgroundPosterUrl = cover ?: image ?: mPoster
this.year = year this.year = year
plot = document.select("div[itemprop = description]").text().trim() plot = document.select("div[itemprop = description]").text().trim()
rating = document.select("span[itemprop = ratingValue]").text().toIntOrNull() rating = document.select("span[itemprop = ratingValue]").text().toIntOrNull()
tags = document.select("p.meta_dd > a").map { it.text() } tags = document.select("p.meta_dd > a").map { it.text() }
addTrailer(mTrailer) addTrailer(mTrailer)
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
} }
} }
else { else {
@ -142,7 +134,6 @@ class NeonimeProvider : MainAPI() {
val poster = document.selectFirst(".imagen > img")?.attr("data-src") val poster = document.selectFirst(".imagen > img")?.attr("data-src")
val trailer = document.selectFirst("div.youtube_id_tv iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"} val trailer = document.selectFirst("div.youtube_id_tv iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"}
val year = document.select("#info a[href*=\"-year/\"]").text().toIntOrNull() val year = document.select("#info a[href*=\"-year/\"]").text().toIntOrNull()
val (malId, anilistId, image, cover) = getTracker(title, "tv", year)
val episodes = document.select("ul.episodios > li").mapNotNull { val episodes = document.select("ul.episodios > li").mapNotNull {
val link = fixUrl(it.selectFirst(".episodiotitle > a")!!.attr("href")) val link = fixUrl(it.selectFirst(".episodiotitle > a")!!.attr("href"))
val name = it.selectFirst(".episodiotitle > a")?.ownText().toString() val name = it.selectFirst(".episodiotitle > a")?.ownText().toString()
@ -152,16 +143,13 @@ class NeonimeProvider : MainAPI() {
return newAnimeLoadResponse(title, url, TvType.Anime) { return newAnimeLoadResponse(title, url, TvType.Anime) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = getStatus(document.select("div.metadatac > span").last()!!.text().trim()) showStatus = getStatus(document.select("div.metadatac > span").last()!!.text().trim())
plot = document.select("div[itemprop = description] > p").text().trim() plot = document.select("div[itemprop = description] > p").text().trim()
tags = document.select("#info a[href*=\"-genre/\"]").map { it.text() } tags = document.select("#info a[href*=\"-genre/\"]").map { it.text() }
addTrailer(trailer) addTrailer(trailer)
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
} }
} }
} }
@ -195,41 +183,4 @@ class NeonimeProvider : MainAPI() {
} }
} }
private 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 ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
} }

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 13 version = 14
cloudstream { cloudstream {

View file

@ -2,8 +2,6 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
@ -133,8 +131,6 @@ class NontonAnimeIDProvider : MainAPI() {
val description = document.select(".entry-content.seriesdesc > p").text().trim() val description = document.select(".entry-content.seriesdesc > p").text().trim()
val trailer = document.selectFirst("a.trailerbutton")?.attr("href") val trailer = document.selectFirst("a.trailerbutton")?.attr("href")
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val episodes = if (document.select("button.buttfilter").isNotEmpty()) { val episodes = if (document.select("button.buttfilter").isNotEmpty()) {
val id = document.select("input[name=series_id]").attr("value") val id = document.select("input[name=series_id]").attr("value")
val numEp = val numEp =
@ -181,15 +177,12 @@ class NontonAnimeIDProvider : MainAPI() {
return newAnimeLoadResponse(title, url, getType(type)) { return newAnimeLoadResponse(title, url, getType(type)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
this.rating = rating this.rating = rating
plot = description plot = description
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
addTrailer(trailer) addTrailer(trailer)
this.tags = tags this.tags = tags
this.recommendations = recommendations this.recommendations = recommendations
@ -234,43 +227,6 @@ class NontonAnimeIDProvider : MainAPI() {
return true return true
} }
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: java.util.ArrayList<Results>? = arrayListOf(),
)
private data class EpResponse( private data class EpResponse(
@JsonProperty("posts") val posts: String?, @JsonProperty("posts") val posts: String?,
@JsonProperty("max_page") val max_page: Int?, @JsonProperty("max_page") val max_page: Int?,

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 14 version = 15
cloudstream { cloudstream {

View file

@ -1,89 +0,0 @@
package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
class Krakenfiles : ExtractorApi() {
override val name = "Krakenfiles"
override val mainUrl = "https://krakenfiles.com"
override val requiresReferer = false
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val id = Regex("(?://|\\.)(krakenfiles\\.com)/(?:view|embed-video)?/([\\da-zA-Z]+)").find(url)?.groupValues?.get(2)
val doc = app.get("$mainUrl/embed-video/$id").document
val link = doc.selectFirst("source")?.attr("src")
callback.invoke(
ExtractorLink(
this.name,
this.name,
httpsify(link ?: return),
"",
Qualities.Unknown.value
)
)
}
}
class Gofile : ExtractorApi() {
override val name = "Gofile"
override val mainUrl = "https://gofile.io"
override val requiresReferer = false
private val mainApi = "https://api.gofile.io"
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val id =
Regex("(?://|\\.)(gofile\\.io)/(?:\\?c=|d/)([\\da-zA-Z]+)").find(url)?.groupValues?.get(
2
)
val token = app.get("$mainApi/createAccount").parsedSafe<Account>()?.data?.get("token")
app.get("$mainApi/getContent?contentId=$id&token=$token&websiteToken=12345")
.parsedSafe<Source>()?.data?.contents?.forEach {
callback.invoke(
ExtractorLink(
this.name,
this.name,
it.value["link"] ?: return,
"",
getQuality(it.value["name"]),
headers = mapOf(
"Cookie" to "accountToken=$token"
)
)
)
}
}
private fun getQuality(str: String?): Int {
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull()
?: Qualities.Unknown.value
}
data class Account(
@JsonProperty("data") val data: HashMap<String, String>? = null,
)
data class Data(
@JsonProperty("contents") val contents: HashMap<String, HashMap<String, String>>? = null,
)
data class Source(
@JsonProperty("data") val data: Data? = null,
)
}

View file

@ -2,14 +2,11 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.extractors.Filesim import com.lagradost.cloudstream3.extractors.Filesim
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
import org.jsoup.Jsoup import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import java.util.ArrayList
class OploverzProvider : MainAPI() { class OploverzProvider : MainAPI() {
override var mainUrl = "https://oploverz.top" override var mainUrl = "https://oploverz.top"
@ -144,12 +141,9 @@ class OploverzProvider : MainAPI() {
"Movie" -> "Movie" "Movie" -> "Movie"
else -> "TV" else -> "TV"
} }
val type = getType(typeCheck)
val description = document.select(".entry-content > p").text().trim() val description = document.select(".entry-content > p").text().trim()
val trailer = document.selectFirst("a.trailerbutton")?.attr("href") val trailer = document.selectFirst("a.trailerbutton")?.attr("href")
val (malId, anilistId, image, cover) = getTracker(title, typeCheck, year)
val episodes = document.select(".eplister > ul > li").map { val episodes = document.select(".eplister > ul > li").map {
val link = fixUrl(it.select("a").attr("href")) val link = fixUrl(it.select("a").attr("href"))
val name = it.select(".epl-title").text() val name = it.select(".epl-title").text()
@ -170,17 +164,14 @@ class OploverzProvider : MainAPI() {
} }
} }
return newAnimeLoadResponse(title, url, type) { return newAnimeLoadResponse(title, url, getType(typeCheck)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
plot = description plot = description
this.tags = tags this.tags = tags
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
this.recommendations = recommendations this.recommendations = recommendations
addTrailer(trailer) addTrailer(trailer)
} }
@ -252,43 +243,6 @@ class OploverzProvider : MainAPI() {
} }
} }
private 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 ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
data class RList( data class RList(
@JsonProperty("url") val url: String, @JsonProperty("url") val url: String,
@JsonProperty("resolution") val resolution: String?, @JsonProperty("resolution") val resolution: String?,

View file

@ -11,7 +11,5 @@ class OploverzProviderPlugin: Plugin() {
// All providers should be added in this manner. Please don't edit the providers list directly. // All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(OploverzProvider()) registerMainAPI(OploverzProvider())
registerExtractorAPI(Streamhide()) registerExtractorAPI(Streamhide())
registerExtractorAPI(Krakenfiles())
registerExtractorAPI(Gofile())
} }
} }

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 11 version = 12
cloudstream { cloudstream {

View file

@ -2,15 +2,12 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.extractors.JWPlayer import com.lagradost.cloudstream3.extractors.JWPlayer
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.Jsoup import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import java.util.ArrayList
class OtakudesuProvider : MainAPI() { class OtakudesuProvider : MainAPI() {
override var mainUrl = "https://otakudesu.lol" override var mainUrl = "https://otakudesu.lol"
@ -65,7 +62,7 @@ class OtakudesuProvider : MainAPI() {
val title = this.selectFirst("h2.jdlflm")?.text()?.trim() ?: return null val title = this.selectFirst("h2.jdlflm")?.text()?.trim() ?: return null
val href = this.selectFirst("a")!!.attr("href") val href = this.selectFirst("a")!!.attr("href")
val posterUrl = this.select("div.thumbz > img").attr("src").toString() val posterUrl = this.select("div.thumbz > img").attr("src").toString()
val epNum = this.selectFirst("div.epz")?.ownText()?.replace(Regex("[^0-9]"), "")?.trim() val epNum = this.selectFirst("div.epz")?.ownText()?.replace(Regex("\\D"), "")?.trim()
?.toIntOrNull() ?.toIntOrNull()
return newAnimeSearchResponse(title, href, TvType.Anime) { return newAnimeSearchResponse(title, href, TvType.Anime) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
@ -107,7 +104,7 @@ class OtakudesuProvider : MainAPI() {
val type = document.selectFirst("div.infozingle > p:nth-child(5) > span")?.ownText() val type = document.selectFirst("div.infozingle > p:nth-child(5) > span")?.ownText()
?.replace(":", "")?.trim() ?: "tv" ?.replace(":", "")?.trim() ?: "tv"
val year = Regex("\\d, ([0-9]*)").find( val year = Regex("\\d, (\\d*)").find(
document.select("div.infozingle > p:nth-child(9) > span").text() document.select("div.infozingle > p:nth-child(9) > span").text()
)?.groupValues?.get(1)?.toIntOrNull() )?.groupValues?.get(1)?.toIntOrNull()
val status = getStatus( val status = getStatus(
@ -117,11 +114,9 @@ class OtakudesuProvider : MainAPI() {
) )
val description = document.select("div.sinopc > p").text() val description = document.select("div.sinopc > p").text()
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val episodes = document.select("div.episodelist")[1].select("ul > li").mapNotNull { val episodes = document.select("div.episodelist")[1].select("ul > li").mapNotNull {
val name = it.selectFirst("a")?.text() ?: return@mapNotNull null val name = it.selectFirst("a")?.text() ?: return@mapNotNull null
val episode = Regex("Episode\\s?([0-9]+)").find(name)?.groupValues?.getOrNull(0) val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)
?: it.selectFirst("a")?.text() ?: it.selectFirst("a")?.text()
val link = fixUrl(it.selectFirst("a")!!.attr("href")) val link = fixUrl(it.selectFirst("a")!!.attr("href"))
Episode(link, name, episode = episode?.toIntOrNull()) Episode(link, name, episode = episode?.toIntOrNull())
@ -140,15 +135,12 @@ class OtakudesuProvider : MainAPI() {
return newAnimeLoadResponse(title, url, getType(type)) { return newAnimeLoadResponse(title, url, getType(type)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
plot = description plot = description
this.tags = tags this.tags = tags
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
this.recommendations = recommendations this.recommendations = recommendations
// posterHeaders = interceptor.getCookieHeaders(url).toMap() // posterHeaders = interceptor.getCookieHeaders(url).toMap()
} }
@ -222,43 +214,6 @@ class OtakudesuProvider : MainAPI() {
return true return true
} }
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: ArrayList<Results>? = arrayListOf(),
)
} }
class Moedesu : JWPlayer() { class Moedesu : JWPlayer() {

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 8 version = 9
cloudstream { cloudstream {

View file

@ -1,9 +1,6 @@
package com.hexated package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.extractors.XStreamCdn import com.lagradost.cloudstream3.extractors.XStreamCdn
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
@ -105,7 +102,7 @@ class Samehadaku : MainAPI() {
val poster = document.selectFirst("div.thumb > img")?.attr("src") val poster = document.selectFirst("div.thumb > img")?.attr("src")
val tags = document.select("div.genre-info > a").map { it.text() } val tags = document.select("div.genre-info > a").map { it.text() }
val year = document.selectFirst("div.spe > span:contains(Rilis)")?.ownText()?.let { val year = document.selectFirst("div.spe > span:contains(Rilis)")?.ownText()?.let {
Regex("\\d,\\s([0-9]*)").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull() Regex("\\d,\\s(\\d*)").find(it)?.groupValues?.getOrNull(1)?.toIntOrNull()
} }
val status = getStatus(document.selectFirst("div.spe > span:contains(Status)")?.ownText() ?: return null) val status = getStatus(document.selectFirst("div.spe > span:contains(Status)")?.ownText() ?: return null)
val type = document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase() ?: "tv" val type = document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase() ?: "tv"
@ -113,11 +110,9 @@ class Samehadaku : MainAPI() {
val description = document.select("div.desc p").text().trim() val description = document.select("div.desc p").text().trim()
val trailer = document.selectFirst("div.trailer-anime iframe")?.attr("src") val trailer = document.selectFirst("div.trailer-anime iframe")?.attr("src")
val (malId, anilistId, image, cover) = getTracker(title, type, year)
val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull { val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull {
val header = it.selectFirst("span.lchx > a") ?: return@mapNotNull null val header = it.selectFirst("span.lchx > a") ?: return@mapNotNull null
val episode = Regex("Episode\\s?([0-9]+)").find(header.text())?.groupValues?.getOrNull(1)?.toIntOrNull() val episode = Regex("Episode\\s?(\\d+)").find(header.text())?.groupValues?.getOrNull(1)?.toIntOrNull()
val link = fixUrl(header.attr("href")) val link = fixUrl(header.attr("href"))
Episode(link, episode = episode) Episode(link, episode = episode)
}.reversed() }.reversed()
@ -128,15 +123,12 @@ class Samehadaku : MainAPI() {
return newAnimeLoadResponse(title, url, getType(type)) { return newAnimeLoadResponse(title, url, getType(type)) {
engName = title engName = title
posterUrl = image ?: poster posterUrl = poster
backgroundPosterUrl = cover ?: image ?: poster
this.year = year this.year = year
addEpisodes(DubStatus.Subbed, episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
this.rating = rating this.rating = rating
plot = description plot = description
addMalId(malId)
addAniListId(anilistId?.toIntOrNull())
addTrailer(trailer) addTrailer(trailer)
this.tags = tags this.tags = tags
this.recommendations = recommendations this.recommendations = recommendations
@ -184,43 +176,6 @@ class Samehadaku : MainAPI() {
return this.replace(Regex("(Nonton)|(Anime)|(Subtitle\\sIndonesia)"), "").trim() return this.replace(Regex("(Nonton)|(Anime)|(Subtitle\\sIndonesia)"), "").trim()
} }
private 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 ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}
data class Tracker(
val malId: Int? = null,
val aniId: String? = null,
val image: String? = null,
val cover: String? = null,
)
data class Title(
@JsonProperty("romaji") val romaji: String? = null,
@JsonProperty("english") val english: String? = null,
)
data class Results(
@JsonProperty("id") val aniId: String? = null,
@JsonProperty("malId") val malId: Int? = null,
@JsonProperty("title") val title: Title? = null,
@JsonProperty("releaseDate") val releaseDate: Int? = null,
@JsonProperty("type") val type: String? = null,
@JsonProperty("image") val image: String? = null,
@JsonProperty("cover") val cover: String? = null,
)
data class AniSearch(
@JsonProperty("results") val results: java.util.ArrayList<Results>? = arrayListOf(),
)
} }
class Suzihaza: XStreamCdn() { class Suzihaza: XStreamCdn() {