removed bloat, removed KawaiifuProvider, bump

This commit is contained in:
LagradOst 2021-12-09 00:39:30 +01:00
parent 444488849e
commit a8d8d9fcf2
48 changed files with 354 additions and 567 deletions

View file

@ -35,8 +35,8 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 31 targetSdkVersion 31
versionCode 34 versionCode 35
versionName "2.3.3" versionName "2.4.3"
resValue "string", "app_version", resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}" "${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -32,7 +32,6 @@ object APIHolder {
//ShiroProvider(), // v2 fucked me //ShiroProvider(), // v2 fucked me
//AnimePaheProvider(), //ddos guard //AnimePaheProvider(), //ddos guard
AnimeFlickProvider(), AnimeFlickProvider(),
KawaiifuProvider(),
TenshiProvider(), TenshiProvider(),
WcoProvider(), WcoProvider(),
@ -49,10 +48,10 @@ object APIHolder {
VfSerieProvider(), VfSerieProvider(),
AsianLoadProvider(), AsianLoadProvider(),
SflixProvider("https://sflix.to","Sflix"), SflixProvider("https://sflix.to", "Sflix"),
SflixProvider("https://dopebox.to","Dopebox"), SflixProvider("https://dopebox.to", "Dopebox"),
// TmdbProvider(), //TmdbProvider(),
TrailersTwoProvider(), TrailersTwoProvider(),
@ -66,16 +65,25 @@ object APIHolder {
AsiaFlixProvider(), AsiaFlixProvider(),
) )
private val backwardsCompatibleProviders = arrayListOf(
KawaiifuProvider(), // removed due to cloudflare
)
fun getApiFromName(apiName: String?): MainAPI { fun getApiFromName(apiName: String?): MainAPI {
return getApiFromNameNull(apiName) ?: apis[defProvider]
}
fun getApiFromNameNull(apiName: String?): MainAPI? {
if (apiName == null) return null
for (api in apis) { for (api in apis) {
if (apiName == api.name) if (apiName == api.name)
return api return api
} }
return apis[defProvider] for (api in restrictedApis) {
} if (apiName == api.name)
return api
fun getApiFromNameNull(apiName: String?): MainAPI? { }
for (api in apis) { for (api in backwardsCompatibleProviders) {
if (apiName == api.name) if (apiName == api.name)
return api return api
} }
@ -278,6 +286,7 @@ fun imdbUrlToIdNullable(url: String?): String? {
enum class ProviderType { enum class ProviderType {
// When data is fetched from a 3rd party site like imdb // When data is fetched from a 3rd party site like imdb
MetaProvider, MetaProvider,
// When all data is from the site // When all data is from the site
DirectProvider, DirectProvider,
} }
@ -460,8 +469,8 @@ data class AnimeLoadResponse(
override var recommendations: List<SearchResponse>? = null, override var recommendations: List<SearchResponse>? = null,
) : LoadResponse ) : LoadResponse
fun AnimeLoadResponse.addEpisodes(status : DubStatus, episodes : List<AnimeEpisode>?) { fun AnimeLoadResponse.addEpisodes(status: DubStatus, episodes: List<AnimeEpisode>?) {
if(episodes == null) return if (episodes == null) return
this.episodes[status] = episodes this.episodes[status] = episodes
} }

View file

@ -3,7 +3,6 @@ package com.lagradost.cloudstream3.animeproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
@ -16,14 +15,10 @@ import java.util.*
class AllAnimeProvider : MainAPI() { class AllAnimeProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://allanime.site"
get() = "https://allanime.site" override val name = "AllAnime"
override val name: String override val hasQuickSearch = false
get() = "AllAnime" override val hasMainPage = false
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = false
private val hlsHelper = M3u8Helper() private val hlsHelper = M3u8Helper()
@ -35,8 +30,7 @@ class AllAnimeProvider : MainAPI() {
} }
} }
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie)
get() = setOf(TvType.Anime, TvType.AnimeMovie)
private data class Data( private data class Data(
@JsonProperty("shows") val shows: Shows @JsonProperty("shows") val shows: Shows

View file

@ -1,7 +1,6 @@
package com.lagradost.cloudstream3.animeproviders package com.lagradost.cloudstream3.animeproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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.extractorApis import com.lagradost.cloudstream3.utils.extractorApis
@ -17,22 +16,16 @@ class AnimeFlickProvider : MainAPI() {
} }
} }
override val mainUrl: String override val mainUrl = "https://animeflick.net"
get() = "https://animeflick.net" override val name = "AnimeFlick"
override val name: String override val hasQuickSearch = false
get() = "AnimeFlick" override val hasMainPage = false
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.AnimeMovie,
TvType.Anime,
TvType.ONA
)
override val supportedTypes = setOf(
TvType.AnimeMovie,
TvType.Anime,
TvType.ONA
)
override fun search(query: String): ArrayList<SearchResponse> { override fun search(query: String): ArrayList<SearchResponse> {
val link = "https://animeflick.net/search.php?search=$query" val link = "https://animeflick.net/search.php?search=$query"

View file

@ -4,10 +4,9 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
import com.lagradost.cloudstream3.network.* import com.lagradost.cloudstream3.network.AppResponse
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import okhttp3.Response
import org.jsoup.Jsoup import org.jsoup.Jsoup
import java.util.* import java.util.*
import kotlin.math.pow import kotlin.math.pow
@ -44,21 +43,16 @@ class AnimePaheProvider : MainAPI() {
Regex("""(^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be/|youtube(?:-nocookie)?\.(?:[A-Za-z]{2,4}|[A-Za-z]{2,3}\.[A-Za-z]{2})/)(?:watch|embed/|vi?/)*(?:\?[\w=&]*vi?=)?[^#&?/]{11}.*${'$'})""") Regex("""(^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be/|youtube(?:-nocookie)?\.(?:[A-Za-z]{2,4}|[A-Za-z]{2,3}\.[A-Za-z]{2})/)(?:watch|embed/|vi?/)*(?:\?[\w=&]*vi?=)?[^#&?/]{11}.*${'$'})""")
} }
override val mainUrl: String override val mainUrl = MAIN_URL
get() = MAIN_URL override val name = "AnimePahe"
override val name: String override val hasQuickSearch = false
get() = "AnimePahe" override val hasMainPage = true
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(
get() = setOf( TvType.AnimeMovie,
TvType.AnimeMovie, TvType.Anime,
TvType.Anime, TvType.ONA
TvType.ONA )
)
override fun getMainPage(): HomePageResponse { override fun getMainPage(): HomePageResponse {
data class Data( data class Data(

View file

@ -5,27 +5,21 @@ import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.APIHolder.unixTime import com.lagradost.cloudstream3.APIHolder.unixTime
import com.lagradost.cloudstream3.APIHolder.unixTimeMS import com.lagradost.cloudstream3.APIHolder.unixTimeMS
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
import java.util.* import java.util.*
class DubbedAnimeProvider : MainAPI() { class DubbedAnimeProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://bestdubbedanime.com"
get() = "https://bestdubbedanime.com" override val name = "DubbedAnime"
override val name: String override val hasQuickSearch = true
get() = "DubbedAnime" override val hasMainPage = true
override val hasQuickSearch: Boolean
get() = true
override val hasMainPage: Boolean
get() = true
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(
get() = setOf( TvType.AnimeMovie,
TvType.AnimeMovie, TvType.Anime,
TvType.Anime, )
)
data class QueryEpisodeResultRoot( data class QueryEpisodeResultRoot(
@JsonProperty("result") @JsonProperty("result")

View file

@ -1,8 +1,6 @@
package com.lagradost.cloudstream3.animeproviders package com.lagradost.cloudstream3.animeproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.network.url
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.extractorApis import com.lagradost.cloudstream3.utils.extractorApis
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
@ -28,21 +26,16 @@ class GogoanimeProvider : MainAPI() {
val qualityRegex = Regex("(\\d+)P") val qualityRegex = Regex("(\\d+)P")
} }
override val mainUrl: String override val mainUrl = "https://gogoanime.vc"
get() = "https://gogoanime.vc" override val name = "GogoAnime"
override val name: String override val hasQuickSearch = false
get() = "GogoAnime" override val hasMainPage = true
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(
get() = setOf( TvType.AnimeMovie,
TvType.AnimeMovie, TvType.Anime,
TvType.Anime, TvType.ONA
TvType.ONA )
)
override fun getMainPage(): HomePageResponse { override fun getMainPage(): HomePageResponse {
val headers = mapOf( val headers = mapOf(

View file

@ -1,25 +1,18 @@
package com.lagradost.cloudstream3.animeproviders package com.lagradost.cloudstream3.animeproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
import java.util.* import java.util.*
class KawaiifuProvider : MainAPI() { class KawaiifuProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://kawaiifu.com"
get() = "https://kawaiifu.com" override val name = "Kawaiifu"
override val name: String override val hasQuickSearch = false
get() = "Kawaiifu" override val hasMainPage = true
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val supportedTypes: Set<TvType>
get() = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
override fun getMainPage(): HomePageResponse { override fun getMainPage(): HomePageResponse {
val items = ArrayList<HomePageList>() val items = ArrayList<HomePageList>()
@ -96,10 +89,10 @@ class KawaiifuProvider : MainAPI() {
val description = soup.select(".sub-desc p") val description = soup.select(".sub-desc p")
.filter { it.select("strong").isEmpty() && it.select("iframe").isEmpty() }.joinToString("\n") { it.text() } .filter { it.select("strong").isEmpty() && it.select("iframe").isEmpty() }.joinToString("\n") { it.text() }
val year = url.split("/").filter { it.contains("-") }[0].split("-")[1].toIntOrNull() val year = url.split("/").filter { it.contains("-") }[0].split("-")[1].toIntOrNull()
val episodesLink = soup.selectFirst("a[href*=\".html-episode\"]").attr("href") ?: throw ErrorLoadingException("Error getting episode list")
val episodes = Jsoup.parse( val episodes = Jsoup.parse(
app.get( app.get(episodesLink).text
soup.selectFirst("a[href*=\".html-episode\"]").attr("href")
).text
).selectFirst(".list-ep").select("li").map { ).selectFirst(".list-ep").select("li").map {
AnimeEpisode( AnimeEpisode(
it.selectFirst("a").attr("href"), it.selectFirst("a").attr("href"),

View file

@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
@ -24,18 +23,13 @@ class TenshiProvider : MainAPI() {
} }
} }
override val mainUrl: String override val mainUrl = "https://tenshi.moe"
get() = "https://tenshi.moe" override val name = "Tenshi.moe"
override val name: String override val hasQuickSearch = false
get() = "Tenshi.moe" override val hasMainPage = true
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
get() = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
/*private fun loadToken(): Boolean { /*private fun loadToken(): Boolean {
return try { return try {
@ -56,7 +50,11 @@ class TenshiProvider : MainAPI() {
try { try {
if (section.attr("id") == "toplist-tabs") { if (section.attr("id") == "toplist-tabs") {
for (top in section.select(".tab-content > [role=\"tabpanel\"]")) { for (top in section.select(".tab-content > [role=\"tabpanel\"]")) {
val title = "Top - " + top.attr("id").split("-")[1].capitalize(Locale.UK) val title = "Top - " + top.attr("id").split("-")[1].replaceFirstChar {
if (it.isLowerCase()) it.titlecase(
Locale.UK
) else it.toString()
}
val anime = top.select("li > a").map { val anime = top.select("li > a").map {
AnimeSearchResponse( AnimeSearchResponse(
it.selectFirst(".thumb-title").text(), it.selectFirst(".thumb-title").text(),
@ -133,7 +131,7 @@ class TenshiProvider : MainAPI() {
@SuppressLint("SimpleDateFormat") @SuppressLint("SimpleDateFormat")
private fun dateParser(dateString: String?): String? { private fun dateParser(dateString: String?): String? {
if(dateString == null) return null if (dateString == null) return null
try { try {
val format = SimpleDateFormat("dd 'of' MMM',' yyyy") val format = SimpleDateFormat("dd 'of' MMM',' yyyy")
val newFormat = SimpleDateFormat("dd-MM-yyyy") val newFormat = SimpleDateFormat("dd-MM-yyyy")
@ -228,8 +226,8 @@ class TenshiProvider : MainAPI() {
val episodeNodes = document.select("li[class*=\"episode\"] > a").toMutableList() val episodeNodes = document.select("li[class*=\"episode\"] > a").toMutableList()
val totalEpisodePages = if (document.select(".pagination").size > 0) val totalEpisodePages = if (document.select(".pagination").size > 0)
document.select(".pagination .page-item a.page-link:not([rel])").last().text().toIntOrNull() document.select(".pagination .page-item a.page-link:not([rel])").last().text().toIntOrNull()
else 1 else 1
if (totalEpisodePages != null && totalEpisodePages > 1) { if (totalEpisodePages != null && totalEpisodePages > 1) {
for (pageNum in 2..totalEpisodePages) { for (pageNum in 2..totalEpisodePages) {
@ -267,14 +265,14 @@ class TenshiProvider : MainAPI() {
val synonyms = val synonyms =
document.select("li.synonym.meta-data > div.info-box > span.value").map { it?.text()?.trim().toString() } document.select("li.synonym.meta-data > div.info-box > span.value").map { it?.text()?.trim().toString() }
return newAnimeLoadResponse(canonicalTitle,url,getType(type ?: "")) { return newAnimeLoadResponse(canonicalTitle, url, getType(type ?: "")) {
engName = englishTitle engName = englishTitle
japName = japaneseTitle japName = japaneseTitle
posterUrl = poster posterUrl = poster
this.year = year.toIntOrNull() this.year = year.toIntOrNull()
addEpisodes(DubStatus.Subbed,episodes) addEpisodes(DubStatus.Subbed, episodes)
showStatus = status showStatus = status
tags = genre tags = genre
this.synonyms = synonyms this.synonyms = synonyms

View file

@ -3,7 +3,6 @@ package com.lagradost.cloudstream3.animeproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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 org.jsoup.Jsoup import org.jsoup.Jsoup
@ -13,18 +12,15 @@ import java.util.*
class WatchCartoonOnlineProvider : MainAPI() { class WatchCartoonOnlineProvider : MainAPI() {
override val name: String override val name = "WatchCartoonOnline"
get() = "WatchCartoonOnline" override val mainUrl = "https://www.wcostream.com"
override val mainUrl: String
get() = "https://www.wcostream.com"
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(
get() = setOf( TvType.Cartoon,
TvType.Cartoon, TvType.Anime,
TvType.Anime, TvType.AnimeMovie,
TvType.AnimeMovie, TvType.TvSeries
TvType.TvSeries )
)
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "https://www.wcostream.com/search" val url = "https://www.wcostream.com/search"
@ -75,8 +71,8 @@ class WatchCartoonOnlineProvider : MainAPI() {
data = mapOf("catara" to query, "konuara" to "episodes") data = mapOf("catara" to query, "konuara" to "episodes")
).text ).text
document = Jsoup.parse(response) document = Jsoup.parse(response)
items = document.select("#catlist-listview2 > ul > li").filter { it?.text() != null && !it.text().toString().contains("Episode") } items = document.select("#catlist-listview2 > ul > li")
.filter { it?.text() != null && !it.text().toString().contains("Episode") }
for (item in items) { for (item in items) {
val titleHeader = item.selectFirst("a") val titleHeader = item.selectFirst("a")

View file

@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.animeproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.WcoStream import com.lagradost.cloudstream3.extractors.WcoStream
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import org.json.JSONObject import org.json.JSONObject
import org.jsoup.Jsoup import org.jsoup.Jsoup
@ -19,21 +18,16 @@ class WcoProvider : MainAPI() {
} }
} }
override val mainUrl: String override val mainUrl = "https://wcostream.cc"
get() = "https://wcostream.cc" override val name = "WCO Stream"
override val name: String override val hasQuickSearch = true
get() = "WCO Stream" override val hasMainPage = true
override val hasQuickSearch: Boolean
get() = true
override val hasMainPage: Boolean
get() = true
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(
get() = setOf( TvType.AnimeMovie,
TvType.AnimeMovie, TvType.Anime,
TvType.Anime, TvType.ONA
TvType.ONA )
)
override fun getMainPage(): HomePageResponse { override fun getMainPage(): HomePageResponse {
val urls = listOf( val urls = listOf(
@ -46,9 +40,11 @@ class WcoProvider : MainAPI() {
val items = ArrayList<HomePageList>() val items = ArrayList<HomePageList>()
for (i in urls) { for (i in urls) {
try { try {
val response = JSONObject(app.get( val response = JSONObject(
i.first, app.get(
).text).getString("html") // I won't make a dataclass for this shit i.first,
).text
).getString("html") // I won't make a dataclass for this shit
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
val results = document.select("div.flw-item").map { val results = document.select("div.flw-item").map {
val filmPoster = it.selectFirst("> div.film-poster") val filmPoster = it.selectFirst("> div.film-poster")
@ -61,14 +57,14 @@ class WcoProvider : MainAPI() {
val poster = filmPoster.selectFirst("> img").attr("data-src") val poster = filmPoster.selectFirst("> img").attr("data-src")
val set: EnumSet<DubStatus> = val set: EnumSet<DubStatus> =
EnumSet.of(if (isDub) DubStatus.Dubbed else DubStatus.Subbed) EnumSet.of(if (isDub) DubStatus.Dubbed else DubStatus.Subbed)
AnimeSearchResponse(title, href, this.name, TvType.Anime, poster,null, set) AnimeSearchResponse(title, href, this.name, TvType.Anime, poster, null, set)
} }
items.add(HomePageList(i.second, results)) items.add(HomePageList(i.second, results))
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
} }
} }
if(items.size <= 0) throw ErrorLoadingException() if (items.size <= 0) throw ErrorLoadingException()
return HomePageResponse(items) return HomePageResponse(items)
} }
@ -105,7 +101,7 @@ class WcoProvider : MainAPI() {
img, img,
year, year,
EnumSet.of(if (isDub) DubStatus.Dubbed else DubStatus.Subbed), EnumSet.of(if (isDub) DubStatus.Dubbed else DubStatus.Subbed),
) )
} }
) )
} }
@ -135,10 +131,12 @@ class WcoProvider : MainAPI() {
override fun quickSearch(query: String): List<SearchResponse> { override fun quickSearch(query: String): List<SearchResponse> {
val returnValue: ArrayList<SearchResponse> = ArrayList() val returnValue: ArrayList<SearchResponse> = ArrayList()
val response = JSONObject(app.post( val response = JSONObject(
"https://wcostream.cc/ajax/search", app.post(
data = mapOf("keyword" to query) "https://wcostream.cc/ajax/search",
).text).getString("html") // I won't make a dataclass for this shit data = mapOf("keyword" to query)
).text
).getString("html") // I won't make a dataclass for this shit
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
document.select("a.nav-item").forEach { document.select("a.nav-item").forEach {
@ -206,12 +204,12 @@ class WcoProvider : MainAPI() {
val genre = document.select("div.elements div.row > div:nth-child(1) > div.row-line:nth-child(5) > a") val genre = document.select("div.elements div.row > div:nth-child(1) > div.row-line:nth-child(5) > a")
.map { it?.text()?.trim().toString() } .map { it?.text()?.trim().toString() }
return newAnimeLoadResponse(canonicalTitle,url,getType(type ?: "")) { return newAnimeLoadResponse(canonicalTitle, url, getType(type ?: "")) {
japName = japaneseTitle japName = japaneseTitle
engName = canonicalTitle engName = canonicalTitle
posterUrl = poster posterUrl = poster
this.year = year this.year = year
addEpisodes(if(isDubbed) DubStatus.Dubbed else DubStatus.Subbed,episodes) addEpisodes(if (isDubbed) DubStatus.Dubbed else DubStatus.Subbed, episodes)
showStatus = status showStatus = status
plot = synopsis plot = synopsis
tags = genre tags = genre

View file

@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.movieproviders.SflixProvider
import com.lagradost.cloudstream3.movieproviders.SflixProvider.Companion.toExtractorLink import com.lagradost.cloudstream3.movieproviders.SflixProvider.Companion.toExtractorLink
import com.lagradost.cloudstream3.movieproviders.SflixProvider.Companion.toSubtitleFile import com.lagradost.cloudstream3.movieproviders.SflixProvider.Companion.toSubtitleFile
import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.network.WebViewResolver
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import org.jsoup.Jsoup import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
@ -15,32 +14,19 @@ import java.net.URI
import java.util.* import java.util.*
class ZoroProvider : MainAPI() { class ZoroProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://zoro.to"
get() = "https://zoro.to" override val name = "Zoro"
override val name: String override val hasQuickSearch = false
get() = "Zoro" override val hasMainPage = true
override val hasChromecastSupport = true
override val hasDownloadSupport = true
override val usesWebView = true
override val hasQuickSearch: Boolean override val supportedTypes = setOf(
get() = false TvType.Anime,
TvType.AnimeMovie,
override val hasMainPage: Boolean TvType.ONA
get() = true )
override val hasChromecastSupport: Boolean
get() = true
override val hasDownloadSupport: Boolean
get() = true
override val usesWebView: Boolean
get() = true
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Anime,
TvType.AnimeMovie,
TvType.ONA
)
companion object { companion object {
fun getType(t: String): TvType { fun getType(t: String): TvType {

View file

@ -1,18 +1,13 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.network.url
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
import java.net.URI import java.net.URI
class AsianLoad : ExtractorApi() { class AsianLoad : ExtractorApi() {
override val name: String override val name = "AsianLoad"
get() = "AsianLoad" override val mainUrl = "https://asianembed.io"
override val mainUrl: String override val requiresReferer = true
get() = "https://asianembed.io"
override val requiresReferer: Boolean
get() = true
private val sourceRegex = Regex("""sources:[\W\w]*?file:\s*?["'](.*?)["']""") private val sourceRegex = Regex("""sources:[\W\w]*?file:\s*?["'](.*?)["']""")
override fun getUrl(url: String, referer: String?): List<ExtractorLink> { override fun getUrl(url: String, referer: String?): List<ExtractorLink> {

View file

@ -1,29 +1,23 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorApi
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 java.lang.Thread.sleep import java.lang.Thread.sleep
class DoodToExtractor : DoodLaExtractor() { class DoodToExtractor : DoodLaExtractor() {
override val mainUrl: String override val mainUrl = "https://dood.to"
get() = "https://dood.to"
} }
class DoodSoExtractor : DoodLaExtractor() { class DoodSoExtractor : DoodLaExtractor() {
override val mainUrl: String override val mainUrl = "https://dood.so"
get() = "https://dood.so"
} }
open class DoodLaExtractor : ExtractorApi() { open class DoodLaExtractor : ExtractorApi() {
override val name: String override val name = "DoodStream"
get() = "DoodStream" override val mainUrl = "https://dood.la"
override val mainUrl: String override val requiresReferer = false
get() = "https://dood.la"
override val requiresReferer: Boolean
get() = false
override fun getExtractorUrl(id: String): String { override fun getExtractorUrl(id: String): String {
return "$mainUrl/d/$id" return "$mainUrl/d/$id"

View file

@ -1,12 +1,11 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
class MixDrop : ExtractorApi() { class MixDrop : ExtractorApi() {
override val name: String = "MixDrop" override val name = "MixDrop"
override val mainUrl: String = "https://mixdrop.co" override val mainUrl = "https://mixdrop.co"
private val srcRegex = Regex("""wurl.*?=.*?"(.*?)";""") private val srcRegex = Regex("""wurl.*?=.*?"(.*?)";""")
override val requiresReferer = false override val requiresReferer = false

View file

@ -1,12 +1,14 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getAndUnpack
class Mp4Upload : ExtractorApi() { class Mp4Upload : ExtractorApi() {
override val name: String = "Mp4Upload" override val name = "Mp4Upload"
override val mainUrl: String = "https://www.mp4upload.com" override val mainUrl = "https://www.mp4upload.com"
private val srcRegex = Regex("""player\.src\("(.*?)"""") private val srcRegex = Regex("""player\.src\("(.*?)"""")
override val requiresReferer = true override val requiresReferer = true

View file

@ -1,8 +1,6 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.network.url
import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
@ -10,8 +8,8 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI import java.net.URI
class MultiQuality : ExtractorApi() { class MultiQuality : ExtractorApi() {
override val name: String = "MultiQuality" override val name = "MultiQuality"
override val mainUrl: String = "https://gogo-play.net" override val mainUrl = "https://gogo-play.net"
private val sourceRegex = Regex("""file:\s*['"](.*?)['"],label:\s*['"](.*?)['"]""") private val sourceRegex = Regex("""file:\s*['"](.*?)['"],label:\s*['"](.*?)['"]""")
private val m3u8Regex = Regex(""".*?(\d*).m3u8""") private val m3u8Regex = Regex(""".*?(\d*).m3u8""")
private val urlRegex = Regex("""(.*?)([^/]+$)""") private val urlRegex = Regex("""(.*?)([^/]+$)""")

View file

@ -3,7 +3,6 @@ package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.APIHolder.unixTimeMS import com.lagradost.cloudstream3.APIHolder.unixTimeMS
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
@ -11,12 +10,9 @@ import com.lagradost.cloudstream3.utils.getPostForm
import org.jsoup.Jsoup import org.jsoup.Jsoup
class SBPlay : ExtractorApi() { class SBPlay : ExtractorApi() {
override val mainUrl: String override val mainUrl = "https://sbplay.one"
get() = "https://sbplay.one" override val name = "SBPlay"
override val name: String override val requiresReferer = false
get() = "SBPlay"
override val requiresReferer: Boolean
get() = false
override fun getUrl(url: String, referer: String?): List<ExtractorLink> { override fun getUrl(url: String, referer: String?): List<ExtractorLink> {
val response = app.get(url, referer = referer).text val response = app.get(url, referer = referer).text
@ -42,16 +38,29 @@ class SBPlay : ExtractorApi() {
getPostForm(href, hrefResponse)?.let { form -> getPostForm(href, hrefResponse)?.let { form ->
val postDocument = Jsoup.parse(form) val postDocument = Jsoup.parse(form)
val downloadBtn = postDocument.selectFirst("a.downloadbtn")?.attr("href") val downloadBtn = postDocument.selectFirst("a.downloadbtn")?.attr("href")
if(downloadBtn.isNullOrEmpty()) { if (downloadBtn.isNullOrEmpty()) {
val hrefSpan2 = postDocument.selectFirst("span > a")?.attr("href") val hrefSpan2 = postDocument.selectFirst("span > a")?.attr("href")
if(hrefSpan2?.startsWith("https://") == true) { if (hrefSpan2?.startsWith("https://") == true) {
links.add(ExtractorLink(this.name, name, links.add(
hrefSpan2, "", Qualities.Unknown.value, false)) ExtractorLink(
this.name, name,
hrefSpan2, "", Qualities.Unknown.value, false
)
)
} else { } else {
// no link found!!! // no link found!!!
} }
} else { } else {
links.add(ExtractorLink(this.name, name, downloadBtn, "", Qualities.Unknown.value, false)) links.add(
ExtractorLink(
this.name,
name,
downloadBtn,
"",
Qualities.Unknown.value,
false
)
)
} }
} }
} else { } else {

View file

@ -1,15 +1,14 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getAndUnpack
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
class StreamSB : ExtractorApi() { class StreamSB : ExtractorApi() {
override val name: String = "StreamSB" override val name = "StreamSB"
override val mainUrl: String = "https://sbplay.org" override val mainUrl = "https://sbplay.org"
private val sourceRegex = Regex("""sources:[\W\w]*?file:\s*"(.*?)"""") private val sourceRegex = Regex("""sources:[\W\w]*?file:\s*"(.*?)"""")
//private val m3u8Regex = Regex(""".*?(\d*).m3u8""") //private val m3u8Regex = Regex(""".*?(\d*).m3u8""")

View file

@ -1,14 +1,13 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
class StreamTape : ExtractorApi() { class StreamTape : ExtractorApi() {
override val name: String = "StreamTape" override val name = "StreamTape"
override val mainUrl: String = "https://streamtape.com" override val mainUrl = "https://streamtape.com"
override val requiresReferer = false override val requiresReferer = false
private val linkRegex = private val linkRegex =

View file

@ -1,7 +1,6 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.JsUnpacker import com.lagradost.cloudstream3.utils.JsUnpacker
@ -9,12 +8,9 @@ import com.lagradost.cloudstream3.utils.Qualities
import java.net.URI import java.net.URI
class Streamhub : ExtractorApi() { class Streamhub : ExtractorApi() {
override val mainUrl: String override val mainUrl = "https://streamhub.to"
get() = "https://streamhub.to" override val name = "Streamhub"
override val name: String override val requiresReferer = false
get() = "Streamhub"
override val requiresReferer: Boolean
get() = false
override fun getExtractorUrl(id: String): String { override fun getExtractorUrl(id: String): String {
return "$mainUrl/e/$id" return "$mainUrl/e/$id"
@ -23,7 +19,7 @@ class Streamhub : ExtractorApi() {
override fun getUrl(url: String, referer: String?): List<ExtractorLink>? { override fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.get(url).text val response = app.get(url).text
Regex("eval((.|\\n)*?)</script>").find(response)?.groupValues?.get(1)?.let { jsEval -> Regex("eval((.|\\n)*?)</script>").find(response)?.groupValues?.get(1)?.let { jsEval ->
JsUnpacker("eval$jsEval" ).unpack()?.let { unPacked -> JsUnpacker("eval$jsEval").unpack()?.let { unPacked ->
Regex("sources:\\[\\{src:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link -> Regex("sources:\\[\\{src:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
return listOf( return listOf(
ExtractorLink( ExtractorLink(

View file

@ -3,13 +3,12 @@ package com.lagradost.cloudstream3.extractors
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.mapper import com.lagradost.cloudstream3.mapper
import com.lagradost.cloudstream3.network.text import com.lagradost.cloudstream3.utils.*
class WcoStream : ExtractorApi() { class WcoStream : ExtractorApi() {
override val name: String = "WcoStream" override val name = "WcoStream"
override val mainUrl: String = "https://vidstream.pro" override val mainUrl = "https://vidstream.pro"
override val requiresReferer = false override val requiresReferer = false
private val hlsHelper = M3u8Helper() private val hlsHelper = M3u8Helper()

View file

@ -9,8 +9,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
class XStreamCdn : ExtractorApi() { class XStreamCdn : ExtractorApi() {
override val name: String = "XStreamCdn" override val name = "XStreamCdn"
override val mainUrl: String = "https://embedsito.com" override val mainUrl = "https://embedsito.com"
override val requiresReferer = false override val requiresReferer = false
private data class ResponseData( private data class ResponseData(

View file

@ -20,15 +20,12 @@ class AllMoviesForYouProvider : MainAPI() {
} }
// Fetching movies will not work if this link is outdated. // Fetching movies will not work if this link is outdated.
override val mainUrl: String override val mainUrl = "https://allmoviesforyou.net"
get() = "https://allmoviesforyou.net" override val name = "AllMoviesForYou"
override val name: String override val supportedTypes = setOf(
get() = "AllMoviesForYou" TvType.Movie,
override val supportedTypes: Set<TvType> TvType.TvSeries
get() = setOf( )
TvType.Movie,
TvType.TvSeries
)
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?s=$query" val url = "$mainUrl/?s=$query"

View file

@ -5,25 +5,18 @@ import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.animeproviders.GogoanimeProvider.Companion.getStatus import com.lagradost.cloudstream3.animeproviders.GogoanimeProvider.Companion.getStatus
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.DataStore.toKotlinObject import com.lagradost.cloudstream3.utils.DataStore.toKotlinObject
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI import java.net.URI
class AsiaFlixProvider : MainAPI() { class AsiaFlixProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://asiaflix.app"
get() = "https://asiaflix.app" override val name = "AsiaFlix"
override val name: String override val hasQuickSearch = false
get() = "AsiaFlix" override val hasMainPage = true
override val hasQuickSearch: Boolean override val hasChromecastSupport = false
get() = false override val supportedTypes = setOf(TvType.TvSeries)
override val hasMainPage: Boolean
get() = true
override val hasChromecastSupport: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(TvType.TvSeries)
private val apiUrl = "https://api.asiaflix.app/api/v2" private val apiUrl = "https://api.asiaflix.app/api/v2"

View file

@ -6,12 +6,8 @@ import com.lagradost.cloudstream3.TvType
* make the app know what functions to call * make the app know what functions to call
*/ */
class AsianLoadProvider : VidstreamProviderTemplate() { class AsianLoadProvider : VidstreamProviderTemplate() {
override val name: String override val name = "AsianLoad"
get() = "AsianLoad" override val mainUrl = "https://asianembed.io"
override val mainUrl: String
get() = "https://asianembed.io"
override val homePageUrlList = listOf( override val homePageUrlList = listOf(
mainUrl, mainUrl,
"$mainUrl/recently-added-raw", "$mainUrl/recently-added-raw",
@ -21,6 +17,5 @@ class AsianLoadProvider : VidstreamProviderTemplate() {
"$mainUrl/ongoing-series" "$mainUrl/ongoing-series"
) )
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
get() = setOf(TvType.TvSeries, TvType.Movie)
} }

View file

@ -1,23 +1,18 @@
package com.lagradost.cloudstream3.movieproviders package com.lagradost.cloudstream3.movieproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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 org.jsoup.Jsoup import org.jsoup.Jsoup
class HDMProvider : MainAPI() { class HDMProvider : MainAPI() {
override val name: String override val name = "HD Movies"
get() = "HD Movies" override val mainUrl = "https://hdm.to"
override val mainUrl: String override val hasMainPage = true
get() = "https://hdm.to"
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(
get() = setOf( TvType.Movie,
TvType.Movie, )
)
override val hasMainPage: Boolean
get() = true
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/search/$query" val url = "$mainUrl/search/$query"
@ -72,7 +67,7 @@ class HDMProvider : MainAPI() {
return MovieLoadResponse( return MovieLoadResponse(
title, url, this.name, TvType.Movie, title, url, this.name, TvType.Movie,
"$mainUrl/src/player/?v=$data", poster, year, descript, null "$mainUrl/src/player/?v=$data", poster, year, descript, null
) )
} }

View file

@ -4,28 +4,21 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.APIHolder.unixTime import com.lagradost.cloudstream3.APIHolder.unixTime
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.extractors.M3u8Manifest import com.lagradost.cloudstream3.extractors.M3u8Manifest
import com.lagradost.cloudstream3.network.text import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
//BE AWARE THAT weboas.is is a clone of lookmovie //BE AWARE THAT weboas.is is a clone of lookmovie
class LookMovieProvider : MainAPI() { class LookMovieProvider : MainAPI() {
override val hasQuickSearch: Boolean override val hasQuickSearch = true
get() = true override val name = "LookMovie"
override val mainUrl = "https://lookmovie.io"
override val name: String override val supportedTypes = setOf(
get() = "LookMovie" TvType.Movie,
TvType.TvSeries,
override val mainUrl: String )
get() = "https://lookmovie.io"
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie,
TvType.TvSeries,
)
data class LookMovieSearchResult( data class LookMovieSearchResult(
@JsonProperty("backdrop") val backdrop: String?, @JsonProperty("backdrop") val backdrop: String?,

View file

@ -3,24 +3,17 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.Session
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class MeloMovieProvider : MainAPI() { class MeloMovieProvider : MainAPI() {
override val name: String override val name = "MeloMovie"
get() = "MeloMovie" override val mainUrl = "https://melomovie.com"
override val mainUrl: String override val instantLinkLoading = true
get() = "https://melomovie.com" override val hasQuickSearch = true
override val instantLinkLoading: Boolean override val hasChromecastSupport = false // MKV FILES CANT BE PLAYED ON A CHROMECAST
get() = true
override val hasQuickSearch: Boolean
get() = true
override val hasChromecastSupport: Boolean
get() = false // MKV FILES CANT BE PLAYED ON A CHROMECAST
data class MeloMovieSearchResult( data class MeloMovieSearchResult(
@JsonProperty("id") val id: Int, @JsonProperty("id") val id: Int,

View file

@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.WebViewResolver import com.lagradost.cloudstream3.network.WebViewResolver
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
@ -12,29 +11,16 @@ import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import java.net.URI import java.net.URI
class SflixProvider(private val providerUrl: String, private val providerName: String) : MainAPI() { class SflixProvider(providerUrl: String, providerName: String) : MainAPI() {
override val mainUrl: String override val mainUrl = providerUrl
get() = providerUrl override val name = providerName
override val name: String
get() = providerName
override val hasQuickSearch: Boolean override val hasQuickSearch = false
get() = false override val hasMainPage = true
override val hasChromecastSupport = true
override val hasMainPage: Boolean override val hasDownloadSupport = true
get() = true override val usesWebView = true
override val supportedTypes = setOf(
override val hasChromecastSupport: Boolean
get() = true
override val hasDownloadSupport: Boolean
get() = true
override val usesWebView: Boolean
get() = true
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie, TvType.Movie,
TvType.TvSeries, TvType.TvSeries,
) )

View file

@ -3,34 +3,21 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
class ThenosProvider : MainAPI() { class ThenosProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://www.thenos.org"
get() = "https://www.thenos.org" override val name = "Thenos"
override val name: String override val hasQuickSearch = true
get() = "Thenos" override val hasMainPage = true
override val hasChromecastSupport = false
override val hasQuickSearch: Boolean override val supportedTypes = setOf(
get() = true TvType.Movie,
TvType.TvSeries,
override val hasMainPage: Boolean )
get() = true
override val hasChromecastSupport: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie,
TvType.TvSeries,
)
override val vpnStatus: VPNStatus
get() = VPNStatus.None
override fun getMainPage(): HomePageResponse { override fun getMainPage(): HomePageResponse {
val map = mapOf( val map = mapOf(

View file

@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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.SubtitleHelper import com.lagradost.cloudstream3.utils.SubtitleHelper
@ -10,28 +9,17 @@ import org.jsoup.Jsoup
// referer = https://trailers.to, USERAGENT ALSO REQUIRED // referer = https://trailers.to, USERAGENT ALSO REQUIRED
class TrailersToProvider : MainAPI() { class TrailersToProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://trailers.to"
get() = "https://trailers.to" override val name = "Trailers.to"
override val name: String override val hasQuickSearch = true
get() = "Trailers.to" override val hasMainPage = true
override val hasChromecastSupport = false
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
)
override val hasQuickSearch: Boolean override val vpnStatus = VPNStatus.MightBeNeeded
get() = true
override val hasMainPage: Boolean
get() = true
override val hasChromecastSupport: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie,
TvType.TvSeries,
)
override val vpnStatus: VPNStatus
get() = VPNStatus.MightBeNeeded
override fun getMainPage(): HomePageResponse? { override fun getMainPage(): HomePageResponse? {
val response = app.get(mainUrl).text val response = app.get(mainUrl).text

View file

@ -2,41 +2,31 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.TvType
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.mapper
import com.lagradost.cloudstream3.metaproviders.TmdbLink import com.lagradost.cloudstream3.metaproviders.TmdbLink
import com.lagradost.cloudstream3.metaproviders.TmdbProvider import com.lagradost.cloudstream3.metaproviders.TmdbProvider
import com.lagradost.cloudstream3.network.text
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.SubtitleHelper import com.lagradost.cloudstream3.utils.SubtitleHelper
class TrailersTwoProvider : TmdbProvider() { class TrailersTwoProvider : TmdbProvider() {
val user = "cloudstream" val user = "cloudstream"
override val apiName = "Trailers.to"
override val name = "Trailers.to"
override val mainUrl = "https://trailers.to"
override val useMetaLoadResponse = true
override val instantLinkLoading = true
override val apiName: String override val supportedTypes = setOf(
get() = "Trailers.to" TvType.Movie,
TvType.TvSeries,
override val name: String TvType.AnimeMovie,
get() = "Trailers.to" TvType.Anime,
TvType.Cartoon
override val mainUrl: String )
get() = "https://trailers.to"
override val useMetaLoadResponse: Boolean
get() = true
override val instantLinkLoading: Boolean
get() = true
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie,
TvType.TvSeries,
TvType.AnimeMovie,
TvType.Anime,
TvType.Cartoon
)
override fun loadLinks( override fun loadLinks(
data: String, data: String,

View file

@ -3,23 +3,15 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.network.url
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
import java.util.ArrayList
class VMoveeProvider : MainAPI() { class VMoveeProvider : MainAPI() {
override val name: String override val name = "VMovee"
get() = "VMovee" override val mainUrl = "https://www.vmovee.watch"
override val mainUrl: String
get() = "https://www.vmovee.watch"
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(TvType.Movie)
get() = setOf(
TvType.Movie,
)
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?s=$query" val url = "$mainUrl/?s=$query"
@ -34,7 +26,7 @@ class VMoveeProvider : MainAPI() {
// val href = imgHolder.attr("href") // val href = imgHolder.attr("href")
val poster = imgHolder.selectFirst("> img").attr("data-lazy-src") val poster = imgHolder.selectFirst("> img").attr("data-lazy-src")
val isTV = imgHolder.selectFirst("> span").text() == "TV" val isTV = imgHolder.selectFirst("> span").text() == "TV"
if(isTV) continue // no TV support yet if (isTV) continue // no TV support yet
val titleHolder = details.selectFirst("> div.title > a") val titleHolder = details.selectFirst("> div.title > a")
val title = titleHolder.text() val title = titleHolder.text()
@ -93,7 +85,11 @@ class VMoveeProvider : MainAPI() {
val prefix = "https://reeoov.tube/v/" val prefix = "https://reeoov.tube/v/"
if (request.url.startsWith(prefix)) { if (request.url.startsWith(prefix)) {
val apiUrl = "https://reeoov.tube/api/source/${request.url.removePrefix(prefix)}" val apiUrl = "https://reeoov.tube/api/source/${request.url.removePrefix(prefix)}"
val apiResponse = app.post(apiUrl,headers = mapOf("Referer" to request.url),data = mapOf("r" to "https://www.vmovee.watch/", "d" to "reeoov.tube")).text val apiResponse = app.post(
apiUrl,
headers = mapOf("Referer" to request.url),
data = mapOf("r" to "https://www.vmovee.watch/", "d" to "reeoov.tube")
).text
val apiData = mapper.readValue<ReeoovAPI>(apiResponse) val apiData = mapper.readValue<ReeoovAPI>(apiResponse)
for (d in apiData.data) { for (d in apiData.data) {
callback.invoke( callback.invoke(

View file

@ -1,34 +1,20 @@
package com.lagradost.cloudstream3.movieproviders package com.lagradost.cloudstream3.movieproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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 org.jsoup.Jsoup import org.jsoup.Jsoup
// referer = https://vf-film.org, USERAGENT ALSO REQUIRED // referer = https://vf-film.org, USERAGENT ALSO REQUIRED
class VfFilmProvider : MainAPI() { class VfFilmProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://vf-film.me"
get() = "https://vf-film.me" override val name = "vf-film.me"
override val name: String override val lang = "fr"
get() = "vf-film.me" override val hasQuickSearch = false
override val hasMainPage = false
override val lang: String = "fr" override val hasChromecastSupport = false
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = false
override val hasChromecastSupport: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie,
)
override val supportedTypes = setOf(TvType.Movie)
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?s=$query" val url = "$mainUrl/?s=$query"
@ -53,7 +39,6 @@ class VfFilmProvider : MainAPI() {
return returnValue return returnValue
} }
override fun loadLinks( override fun loadLinks(
data: String, data: String,
isCasting: Boolean, isCasting: Boolean,
@ -74,7 +59,6 @@ class VfFilmProvider : MainAPI() {
return true return true
} }
private fun getDirect(original: String): String { // original data, https://vf-film.org/?trembed=1&trid=55313&trtype=1 for example private fun getDirect(original: String): String { // original data, https://vf-film.org/?trembed=1&trid=55313&trtype=1 for example
val response = app.get(original).text val response = app.get(original).text
val url = "iframe .*src=\"(.*?)\"".toRegex().find(response)?.groupValues?.get(1) val url = "iframe .*src=\"(.*?)\"".toRegex().find(response)?.groupValues?.get(1)
@ -86,7 +70,6 @@ class VfFilmProvider : MainAPI() {
return vudoUrl return vudoUrl
} }
override fun load(url: String): LoadResponse { override fun load(url: String): LoadResponse {
val response = app.get(url).text val response = app.get(url).text
val document = Jsoup.parse(response) val document = Jsoup.parse(response)

View file

@ -1,36 +1,21 @@
package com.lagradost.cloudstream3.movieproviders package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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 okio.Buffer
import org.jsoup.Jsoup import org.jsoup.Jsoup
// referer = https://vf-serie.org, USERAGENT ALSO REQUIRED // referer = https://vf-serie.org, USERAGENT ALSO REQUIRED
class VfSerieProvider : MainAPI() { class VfSerieProvider : MainAPI() {
override val mainUrl: String override val mainUrl = "https://vf-serie.org"
get() = "https://vf-serie.org" override val name = "vf-serie.org"
override val name: String override val lang = "fr"
get() = "vf-serie.org"
override val lang: String = "fr" override val hasQuickSearch = false
override val hasMainPage = false
override val hasQuickSearch: Boolean override val hasChromecastSupport = false
get() = false
override val hasMainPage: Boolean
get() = false
override val hasChromecastSupport: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.TvSeries,
)
override val supportedTypes = setOf(TvType.TvSeries)
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?s=$query" val url = "$mainUrl/?s=$query"
@ -57,17 +42,14 @@ class VfSerieProvider : MainAPI() {
return returnValue return returnValue
} }
private fun getDirect(original: String): String { // original data, https://vf-serie.org/?trembed=1&trid=80467&trtype=2 for example private fun getDirect(original: String): String { // original data, https://vf-serie.org/?trembed=1&trid=80467&trtype=2 for example
val response = app.get(original).text val response = app.get(original).text
val url = "iframe .*src=\\\"(.*?)\\\"".toRegex().find(response)?.groupValues?.get(1).toString() // https://vudeo.net/embed-7jdb1t5b2mvo.html for example val url = "iframe .*src=\\\"(.*?)\\\"".toRegex().find(response)?.groupValues?.get(1)
.toString() // https://vudeo.net/embed-7jdb1t5b2mvo.html for example
val vudoResponse = app.get(url).text val vudoResponse = app.get(url).text
val document = Jsoup.parse(vudoResponse) val document = Jsoup.parse(vudoResponse)
val vudoUrl = Regex("sources: \\[\"(.*?)\"\\]").find(document.html())?.groupValues?.get(1).toString() // direct mp4 link, https://m5.vudeo.net/2vp3xgpw2avjdohilpfbtyuxzzrqzuh4z5yxvztral5k3rjnba6f4byj3saa/v.mp4 for exemple return Regex("sources: \\[\"(.*?)\"\\]").find(document.html())?.groupValues?.get(1)
return vudoUrl .toString() // direct mp4 link, https://m5.vudeo.net/2vp3xgpw2avjdohilpfbtyuxzzrqzuh4z5yxvztral5k3rjnba6f4byj3saa/v.mp4 for exemple
} }
override fun loadLinks( override fun loadLinks(
@ -81,29 +63,30 @@ class VfSerieProvider : MainAPI() {
val response = app.get(data).text val response = app.get(data).text
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
val players = document.select("ul.TPlayerNv > li") val players = document.select("ul.TPlayerNv > li")
val trembed_url = document.selectFirst("div.TPlayerTb > iframe").attr("src") val trembedUrl = document.selectFirst("div.TPlayerTb > iframe").attr("src")
var number_player = Regex(".*trembed=(.*?)&").find(trembed_url)?.groupValues?.get(1)!!.toInt() // the starting trembed number of the first player website, some start at 0 other at 1 var numberPlayer = Regex(".*trembed=(.*?)&").find(trembedUrl)?.groupValues?.get(1)!!
.toInt() // the starting trembed number of the first player website, some start at 0 other at 1
var found = false var found = false
for (player in players) { for (player in players) {
if (player.selectFirst("> span").text() == "Vudeo") { if (player.selectFirst("> span").text() == "Vudeo") {
found = true found = true
break break
} else { } else {
number_player += 1 numberPlayer += 1
} }
} }
if (found == false) { if (!found) {
number_player = 1 numberPlayer = 1
} }
val i = number_player.toString() val i = numberPlayer.toString()
val trid = Regex("iframe .*trid=(.*?)&").find(document.html())?.groupValues?.get(1) val trid = Regex("iframe .*trid=(.*?)&").find(document.html())?.groupValues?.get(1)
val data = getDirect("$mainUrl/?trembed=$i&trid=$trid&trtype=2") val directData = getDirect("$mainUrl/?trembed=$i&trid=$trid&trtype=2")
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
this.name, this.name,
this.name, this.name,
data, directData,
"", "",
Qualities.P720.value, Qualities.P720.value,
false false
@ -112,26 +95,24 @@ class VfSerieProvider : MainAPI() {
return true return true
} }
override fun load(url: String): LoadResponse { override fun load(url: String): LoadResponse {
val response = app.get(url).text val response = app.get(url).text
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
val title = document?.selectFirst(".Title")?.text()?.replace("Regarder Serie ","")?.replace(" En Streaming", "") val title =
?: throw ErrorLoadingException("Service might be unavailable") document?.selectFirst(".Title")?.text()?.replace("Regarder Serie ", "")?.replace(" En Streaming", "")
?: throw ErrorLoadingException("Service might be unavailable")
val year = document.select("span.Date").text()?.toIntOrNull() val year = document.select("span.Date").text()?.toIntOrNull()
val rating = document.select("span.AAIco-star").text()?.toIntOrNull() val rating = document.select("span.AAIco-star").text()?.toIntOrNull()
val duration = document.select("span.Time").text()?.toIntOrNull() //val duration = document.select("span.Time").text()?.toIntOrNull()
val backgroundPoster = document.selectFirst("div.Image > figure > img").attr("src").replace("//image", "https://image") val backgroundPoster =
document.selectFirst("div.Image > figure > img").attr("src").replace("//image", "https://image")
val descript = document.selectFirst("div.Description > p").text() val descript = document.selectFirst("div.Description > p").text()
val list = ArrayList<Int>() val list = ArrayList<Int>()
// episode begin // episode begin
@ -150,7 +131,8 @@ class VfSerieProvider : MainAPI() {
if (episodes.isNotEmpty()) { if (episodes.isNotEmpty()) {
episodes.forEach { episode -> episodes.forEach { episode ->
val epNum = episode.selectFirst("> span.Num")?.text()?.toIntOrNull() val epNum = episode.selectFirst("> span.Num")?.text()?.toIntOrNull()
val poster = episode.selectFirst("> td.MvTbImg > a > img")?.attr("src")?.replace("//image", "https://image") val poster =
episode.selectFirst("> td.MvTbImg > a > img")?.attr("src")?.replace("//image", "https://image")
val aName = episode.selectFirst("> td.MvTbTtl > a") val aName = episode.selectFirst("> td.MvTbTtl > a")
val date = episode.selectFirst("> td.MvTbTtl > span")?.text()?.toString() val date = episode.selectFirst("> td.MvTbTtl > span")?.text()?.toString()
val name = aName.text() val name = aName.text()
@ -181,8 +163,5 @@ class VfSerieProvider : MainAPI() {
null, null,
rating rating
) )
} }
} }

View file

@ -7,12 +7,10 @@ import com.lagradost.cloudstream3.TvType
*/ */
class VidEmbedProvider : VidstreamProviderTemplate() { class VidEmbedProvider : VidstreamProviderTemplate() {
// mainUrl is good to have as a holder for the url to make future changes easier. // mainUrl is good to have as a holder for the url to make future changes easier.
override val mainUrl: String override val mainUrl = "https://vidembed.cc"
get() = "https://vidembed.cc"
// name is for how the provider will be named which is visible in the UI, no real rules for this. // name is for how the provider will be named which is visible in the UI, no real rules for this.
override val name: String override val name = "VidEmbed"
get() = "VidEmbed"
override val homePageUrlList: List<String> = listOf( override val homePageUrlList: List<String> = listOf(
mainUrl, mainUrl,
@ -24,6 +22,5 @@ class VidEmbedProvider : VidstreamProviderTemplate() {
// This is just extra metadata about what type of movies the provider has. // This is just extra metadata about what type of movies the provider has.
// Needed for search functionality. // Needed for search functionality.
override val supportedTypes: Set<TvType> override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
get() = setOf(TvType.TvSeries, TvType.Movie)
} }

View file

@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.movieproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.Vidstream import com.lagradost.cloudstream3.extractors.Vidstream
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
@ -27,12 +26,10 @@ open class VidstreamProviderTemplate : MainAPI() {
// gives results on the site instead of bringing you to another page. // gives results on the site instead of bringing you to another page.
// if hasQuickSearch is true and quickSearch() hasn't been overridden you will get errors. // if hasQuickSearch is true and quickSearch() hasn't been overridden you will get errors.
// VidEmbed actually has quick search on their site, but the function wasn't implemented. // VidEmbed actually has quick search on their site, but the function wasn't implemented.
override val hasQuickSearch: Boolean override val hasQuickSearch = false
get() = false
// If getMainPage() is functional, used to display the homepage in app, an optional, but highly encouraged endevour. // If getMainPage() is functional, used to display the homepage in app, an optional, but highly encouraged endevour.
override val hasMainPage: Boolean override val hasMainPage = true
get() = true
// Sometimes on sites the urls can be something like "/movie.html" which translates to "*full site url*/movie.html" in the browser // Sometimes on sites the urls can be something like "/movie.html" which translates to "*full site url*/movie.html" in the browser
private fun fixUrl(url: String): String { private fun fixUrl(url: String): String {

View file

@ -60,7 +60,7 @@ val Response.url: String
val Response.cookies: Map<String, String> val Response.cookies: Map<String, String>
get() { get() {
val cookieList = val cookieList =
this.headers.filter { it.first.toLowerCase(Locale.ROOT) == "set-cookie" } this.headers.filter { it.first.lowercase(Locale.ROOT) == "set-cookie" }
.getOrNull(0)?.second?.split(";") .getOrNull(0)?.second?.split(";")
return cookieList?.associate { return cookieList?.associate {
val split = it.split("=") val split = it.split("=")

View file

@ -26,18 +26,12 @@ import java.net.URL
import java.util.* import java.util.*
class AniListApi(index: Int) : AccountManager(index), SyncAPI { class AniListApi(index: Int) : AccountManager(index), SyncAPI {
override val name: String override val name = "AniList"
get() = "AniList" override val key = "6871"
override val key: String override val redirectUrl = "anilistlogin"
get() = "6871" override val idPrefix = "anilist"
override val redirectUrl: String override val mainUrl = "https://anilist.co"
get() = "anilistlogin" override val icon = R.drawable.ic_anilist_icon
override val idPrefix: String
get() = "anilist"
override val mainUrl: String
get() = "https://anilist.co"
override val icon: Int
get() = R.drawable.ic_anilist_icon
override fun loginInfo(context: Context): OAuth2API.LoginInfo? { override fun loginInfo(context: Context): OAuth2API.LoginInfo? {
// context.getUser(true)?. // context.getUser(true)?.
@ -144,7 +138,7 @@ class AniListApi(index: Int) : AccountManager(index), SyncAPI {
const val ANILIST_SHOULD_UPDATE_LIST: String = "anilist_should_update_list" const val ANILIST_SHOULD_UPDATE_LIST: String = "anilist_should_update_list"
private fun fixName(name: String): String { private fun fixName(name: String): String {
return name.toLowerCase(Locale.ROOT).replace(" ", "").replace("[^a-zA-Z0-9]".toRegex(), "") return name.lowercase(Locale.ROOT).replace(" ", "").replace("[^a-zA-Z0-9]".toRegex(), "")
} }
private fun searchShows(name: String): GetSearchRoot? { private fun searchShows(name: String): GetSearchRoot? {

View file

@ -5,8 +5,7 @@ import com.lagradost.cloudstream3.syncproviders.OAuth2API
//TODO dropbox sync //TODO dropbox sync
class Dropbox : OAuth2API { class Dropbox : OAuth2API {
override val name: String override val name = "Dropbox"
get() = "Dropbox"
override val key: String override val key: String
get() = "zlqsamadlwydvb2" get() = "zlqsamadlwydvb2"
override val redirectUrl: String override val redirectUrl: String

View file

@ -32,16 +32,11 @@ import java.util.*
const val MAL_MAX_SEARCH_LIMIT = 25 const val MAL_MAX_SEARCH_LIMIT = 25
class MALApi(index: Int) : AccountManager(index), SyncAPI { class MALApi(index: Int) : AccountManager(index), SyncAPI {
override val name: String override val name = "MAL"
get() = "MAL" override val key = "1714d6f2f4f7cc19644384f8c4629910"
override val key: String override val redirectUrl = "mallogin"
get() = "1714d6f2f4f7cc19644384f8c4629910" override val idPrefix = "mal"
override val redirectUrl: String override val mainUrl = "https://myanimelist.net"
get() = "mallogin"
override val idPrefix: String
get() = "mal"
override val mainUrl: String
get() = "https://myanimelist.net"
override val icon: Int override val icon: Int
get() = R.drawable.mal_logo get() = R.drawable.mal_logo

View file

@ -1,26 +1,20 @@
package com.lagradost.cloudstream3.torrentproviders package com.lagradost.cloudstream3.torrentproviders
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
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 org.jsoup.Jsoup import org.jsoup.Jsoup
class NyaaProvider : MainAPI() { class NyaaProvider : MainAPI() {
override val name: String override val name = "Nyaa"
get() = "Nyaa" override val hasChromecastSupport = false
override val hasChromecastSupport: Boolean
get() = false // override val hasDownloadSupport: Boolean
// override val hasDownloadSupport: Boolean
// get() = false // get() = false
override val mainUrl: String override val mainUrl = "https://nyaa.si"
get() = "https://nyaa.si" override val supportedTypes = setOf(TvType.Torrent)
override val supportedTypes: Set<TvType> override val vpnStatus = VPNStatus.Torrent
get() = setOf(TvType.Torrent) override val instantLinkLoading = true
override val vpnStatus: VPNStatus
get() = VPNStatus.Torrent
override val instantLinkLoading: Boolean
get() = true
override fun search(query: String): List<SearchResponse> { override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?f=0&c=0_0&q=$query&s=seeders&o=desc" val url = "$mainUrl/?f=0&c=0_0&q=$query&s=seeders&o=desc"
@ -28,10 +22,10 @@ class NyaaProvider : MainAPI() {
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
val returnValues = ArrayList<SearchResponse>() val returnValues = ArrayList<SearchResponse>()
val elements = document.select("table > tbody > tr") val elements = document.select("table > tbody > tr")
for (element in elements) { for (element in elements) {
val tds = element.select("> td") val tds = element.select("> td")
if(tds.size < 2) continue if (tds.size < 2) continue
val type = tds[0].select("> a").attr("title") val type = tds[0].select("> a").attr("title")
val titleHeader = tds[1].select("> a").last() val titleHeader = tds[1].select("> a").last()
val href = titleHeader.attr("href") val href = titleHeader.attr("href")
@ -52,7 +46,7 @@ class NyaaProvider : MainAPI() {
val magnet = downloadLinks[1].attr("href") val magnet = downloadLinks[1].attr("href")
val torrent = downloadLinks[0].attr("href") val torrent = downloadLinks[0].attr("href")
return TorrentLoadResponse(title, url, this.name, magnet, fixUrl(torrent) , description) return TorrentLoadResponse(title, url, this.name, magnet, fixUrl(torrent), description)
} }
override fun loadLinks( override fun loadLinks(

View file

@ -13,12 +13,10 @@ class APIRepository(val api: MainAPI) {
var dubStatusActive = HashSet<DubStatus>() var dubStatusActive = HashSet<DubStatus>()
val noneApi = object : MainAPI() { val noneApi = object : MainAPI() {
override val name: String override val name = "None"
get() = "None"
} }
val randomApi = object : MainAPI() { val randomApi = object : MainAPI() {
override val name: String override val name = "Random"
get() = "Random"
} }
val noneRepo = APIRepository(noneApi) val noneRepo = APIRepository(noneApi)

View file

@ -6,7 +6,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.APIHolder.getApiFromName import com.lagradost.cloudstream3.APIHolder.getApiFromNameNull
import com.lagradost.cloudstream3.APIHolder.getId import com.lagradost.cloudstream3.APIHolder.getId
import com.lagradost.cloudstream3.mvvm.Resource import com.lagradost.cloudstream3.mvvm.Resource
import com.lagradost.cloudstream3.mvvm.safeApiCall import com.lagradost.cloudstream3.mvvm.safeApiCall
@ -269,7 +269,11 @@ class ResultViewModel : ViewModel() {
_publicEpisodes.postValue(Resource.Loading()) _publicEpisodes.postValue(Resource.Loading())
_apiName.postValue(apiName) _apiName.postValue(apiName)
val api = getApiFromName(apiName) val api = getApiFromNameNull(apiName)
if (api == null) {
_resultResponse.postValue(Resource.Failure(false, null, null, "This provider does not exist"))
return@launch
}
repo = APIRepository(api) repo = APIRepository(api)
val data = repo?.load(url) val data = repo?.load(url)
@ -464,9 +468,9 @@ class ResultViewModel : ViewModel() {
var title: String var title: String
var count = 0 var count = 0
while (true) { while (true) {
title = "$langId${if (count == 0) "" else " ${count+1}"}" title = "$langId${if (count == 0) "" else " ${count + 1}"}"
count++ count++
if(!subs.containsKey(title)) { if (!subs.containsKey(title)) {
break break
} }
} }

View file

@ -1,10 +1,8 @@
package com.lagradost.cloudstream3.utils package com.lagradost.cloudstream3.utils
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import org.jsoup.Jsoup import org.jsoup.Jsoup
import java.util.* import java.util.*
import kotlin.collections.HashMap
object FillerEpisodeCheck { object FillerEpisodeCheck {
private const val MAIN_URL = "https://www.animefillerlist.com" private const val MAIN_URL = "https://www.animefillerlist.com"
@ -12,7 +10,7 @@ object FillerEpisodeCheck {
var list: HashMap<String, String>? = null var list: HashMap<String, String>? = null
private fun fixName(name: String): String { private fun fixName(name: String): String {
return name.toLowerCase(Locale.ROOT)/*.replace(" ", "")*/.replace("-", " ").replace("[^a-zA-Z0-9 ]".toRegex(), "") return name.lowercase(Locale.ROOT)/*.replace(" ", "")*/.replace("-", " ").replace("[^a-zA-Z0-9 ]".toRegex(), "")
} }
private fun getFillerList(): Boolean { private fun getFillerList(): Boolean {
@ -25,7 +23,7 @@ object FillerEpisodeCheck {
for (i in localHTMLList) { for (i in localHTMLList) {
val name = i.text() val name = i.text()
if (name.toLowerCase(Locale.ROOT).contains("manga only")) continue if (name.lowercase(Locale.ROOT).contains("manga only")) continue
val href = i.attr("href") val href = i.attr("href")
if (name.isNullOrEmpty() || href.isNullOrEmpty()) { if (name.isNullOrEmpty() || href.isNullOrEmpty()) {

View file

@ -74,7 +74,7 @@ object SubtitleHelper {
if (ISO_639_1Map.isEmpty()) { if (ISO_639_1Map.isEmpty()) {
initISO6391Map() initISO6391Map()
} }
val comparison = input.toLowerCase(Locale.ROOT) val comparison = input.lowercase(Locale.ROOT)
return ISO_639_1Map[comparison] return ISO_639_1Map[comparison]
} }
@ -82,7 +82,7 @@ object SubtitleHelper {
/**ISO_639_2_B or ISO_639_2_T or ISO_639_3-> lang*/ /**ISO_639_2_B or ISO_639_2_T or ISO_639_3-> lang*/
fun fromThreeLettersToLanguage(input: String): String? { fun fromThreeLettersToLanguage(input: String): String? {
if (input.length != 3) return null if (input.length != 3) return null
val comparison = input.toLowerCase(Locale.ROOT) val comparison = input.lowercase(Locale.ROOT)
for (lang in languages) { for (lang in languages) {
if (lang.ISO_639_2_B == comparison) { if (lang.ISO_639_2_B == comparison) {
return lang.languageName return lang.languageName

View file

@ -529,9 +529,7 @@ object VideoDownloadManager {
} }
} }
val isScopedStorage: Boolean val isScopedStorage = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
data class CreateNotificationMetadata( data class CreateNotificationMetadata(
val type: DownloadType, val type: DownloadType,