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
targetSdkVersion 31
versionCode 34
versionName "2.3.3"
versionCode 35
versionName "2.4.3"
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -32,7 +32,6 @@ object APIHolder {
//ShiroProvider(), // v2 fucked me
//AnimePaheProvider(), //ddos guard
AnimeFlickProvider(),
KawaiifuProvider(),
TenshiProvider(),
WcoProvider(),
@ -49,10 +48,10 @@ object APIHolder {
VfSerieProvider(),
AsianLoadProvider(),
SflixProvider("https://sflix.to","Sflix"),
SflixProvider("https://dopebox.to","Dopebox"),
SflixProvider("https://sflix.to", "Sflix"),
SflixProvider("https://dopebox.to", "Dopebox"),
// TmdbProvider(),
//TmdbProvider(),
TrailersTwoProvider(),
@ -66,16 +65,25 @@ object APIHolder {
AsiaFlixProvider(),
)
private val backwardsCompatibleProviders = arrayListOf(
KawaiifuProvider(), // removed due to cloudflare
)
fun getApiFromName(apiName: String?): MainAPI {
return getApiFromNameNull(apiName) ?: apis[defProvider]
}
fun getApiFromNameNull(apiName: String?): MainAPI? {
if (apiName == null) return null
for (api in apis) {
if (apiName == api.name)
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)
return api
}
@ -278,6 +286,7 @@ fun imdbUrlToIdNullable(url: String?): String? {
enum class ProviderType {
// When data is fetched from a 3rd party site like imdb
MetaProvider,
// When all data is from the site
DirectProvider,
}
@ -460,8 +469,8 @@ data class AnimeLoadResponse(
override var recommendations: List<SearchResponse>? = null,
) : LoadResponse
fun AnimeLoadResponse.addEpisodes(status : DubStatus, episodes : List<AnimeEpisode>?) {
if(episodes == null) return
fun AnimeLoadResponse.addEpisodes(status: DubStatus, episodes: List<AnimeEpisode>?) {
if (episodes == null) return
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.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName
@ -16,14 +15,10 @@ import java.util.*
class AllAnimeProvider : MainAPI() {
override val mainUrl: String
get() = "https://allanime.site"
override val name: String
get() = "AllAnime"
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = false
override val mainUrl = "https://allanime.site"
override val name = "AllAnime"
override val hasQuickSearch = false
override val hasMainPage = false
private val hlsHelper = M3u8Helper()
@ -35,8 +30,7 @@ class AllAnimeProvider : MainAPI() {
}
}
override val supportedTypes: Set<TvType>
get() = setOf(TvType.Anime, TvType.AnimeMovie)
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie)
private data class Data(
@JsonProperty("shows") val shows: Shows

View file

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

View file

@ -4,10 +4,9 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
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.getQualityFromName
import okhttp3.Response
import org.jsoup.Jsoup
import java.util.*
import kotlin.math.pow
@ -44,17 +43,12 @@ 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}.*${'$'})""")
}
override val mainUrl: String
get() = MAIN_URL
override val name: String
get() = "AnimePahe"
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val mainUrl = MAIN_URL
override val name = "AnimePahe"
override val hasQuickSearch = false
override val hasMainPage = true
override val supportedTypes: Set<TvType>
get() = setOf(
override val supportedTypes = setOf(
TvType.AnimeMovie,
TvType.Anime,
TvType.ONA

View file

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

View file

@ -1,8 +1,6 @@
package com.lagradost.cloudstream3.animeproviders
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.extractorApis
import com.lagradost.cloudstream3.utils.getQualityFromName
@ -28,17 +26,12 @@ class GogoanimeProvider : MainAPI() {
val qualityRegex = Regex("(\\d+)P")
}
override val mainUrl: String
get() = "https://gogoanime.vc"
override val name: String
get() = "GogoAnime"
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val mainUrl = "https://gogoanime.vc"
override val name = "GogoAnime"
override val hasQuickSearch = false
override val hasMainPage = true
override val supportedTypes: Set<TvType>
get() = setOf(
override val supportedTypes = setOf(
TvType.AnimeMovie,
TvType.Anime,
TvType.ONA

View file

@ -1,25 +1,18 @@
package com.lagradost.cloudstream3.animeproviders
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup
import java.util.*
class KawaiifuProvider : MainAPI() {
override val mainUrl: String
get() = "https://kawaiifu.com"
override val name: String
get() = "Kawaiifu"
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 mainUrl = "https://kawaiifu.com"
override val name = "Kawaiifu"
override val hasQuickSearch = false
override val hasMainPage = true
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
override fun getMainPage(): HomePageResponse {
val items = ArrayList<HomePageList>()
@ -96,10 +89,10 @@ class KawaiifuProvider : MainAPI() {
val description = soup.select(".sub-desc p")
.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 episodesLink = soup.selectFirst("a[href*=\".html-episode\"]").attr("href") ?: throw ErrorLoadingException("Error getting episode list")
val episodes = Jsoup.parse(
app.get(
soup.selectFirst("a[href*=\".html-episode\"]").attr("href")
).text
app.get(episodesLink).text
).selectFirst(".list-ep").select("li").map {
AnimeEpisode(
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.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup
@ -24,18 +23,13 @@ class TenshiProvider : MainAPI() {
}
}
override val mainUrl: String
get() = "https://tenshi.moe"
override val name: String
get() = "Tenshi.moe"
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val mainUrl = "https://tenshi.moe"
override val name = "Tenshi.moe"
override val hasQuickSearch = false
override val hasMainPage = true
override val supportedTypes: Set<TvType>
get() = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.ONA)
/*private fun loadToken(): Boolean {
return try {
@ -56,7 +50,11 @@ class TenshiProvider : MainAPI() {
try {
if (section.attr("id") == "toplist-tabs") {
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 {
AnimeSearchResponse(
it.selectFirst(".thumb-title").text(),
@ -133,7 +131,7 @@ class TenshiProvider : MainAPI() {
@SuppressLint("SimpleDateFormat")
private fun dateParser(dateString: String?): String? {
if(dateString == null) return null
if (dateString == null) return null
try {
val format = SimpleDateFormat("dd 'of' MMM',' yyyy")
val newFormat = SimpleDateFormat("dd-MM-yyyy")
@ -267,14 +265,14 @@ class TenshiProvider : MainAPI() {
val synonyms =
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
japName = japaneseTitle
posterUrl = poster
this.year = year.toIntOrNull()
addEpisodes(DubStatus.Subbed,episodes)
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
tags = genre
this.synonyms = synonyms

View file

@ -3,7 +3,6 @@ package com.lagradost.cloudstream3.animeproviders
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import org.jsoup.Jsoup
@ -13,13 +12,10 @@ import java.util.*
class WatchCartoonOnlineProvider : MainAPI() {
override val name: String
get() = "WatchCartoonOnline"
override val mainUrl: String
get() = "https://www.wcostream.com"
override val name = "WatchCartoonOnline"
override val mainUrl = "https://www.wcostream.com"
override val supportedTypes: Set<TvType>
get() = setOf(
override val supportedTypes = setOf(
TvType.Cartoon,
TvType.Anime,
TvType.AnimeMovie,
@ -75,8 +71,8 @@ class WatchCartoonOnlineProvider : MainAPI() {
data = mapOf("catara" to query, "konuara" to "episodes")
).text
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) {
val titleHeader = item.selectFirst("a")

View file

@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.animeproviders
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.WcoStream
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import org.json.JSONObject
import org.jsoup.Jsoup
@ -19,17 +18,12 @@ class WcoProvider : MainAPI() {
}
}
override val mainUrl: String
get() = "https://wcostream.cc"
override val name: String
get() = "WCO Stream"
override val hasQuickSearch: Boolean
get() = true
override val hasMainPage: Boolean
get() = true
override val mainUrl = "https://wcostream.cc"
override val name = "WCO Stream"
override val hasQuickSearch = true
override val hasMainPage = true
override val supportedTypes: Set<TvType>
get() = setOf(
override val supportedTypes = setOf(
TvType.AnimeMovie,
TvType.Anime,
TvType.ONA
@ -46,9 +40,11 @@ class WcoProvider : MainAPI() {
val items = ArrayList<HomePageList>()
for (i in urls) {
try {
val response = JSONObject(app.get(
val response = JSONObject(
app.get(
i.first,
).text).getString("html") // I won't make a dataclass for this shit
).text
).getString("html") // I won't make a dataclass for this shit
val document = Jsoup.parse(response)
val results = document.select("div.flw-item").map {
val filmPoster = it.selectFirst("> div.film-poster")
@ -61,14 +57,14 @@ class WcoProvider : MainAPI() {
val poster = filmPoster.selectFirst("> img").attr("data-src")
val set: EnumSet<DubStatus> =
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))
} catch (e: Exception) {
e.printStackTrace()
}
}
if(items.size <= 0) throw ErrorLoadingException()
if (items.size <= 0) throw ErrorLoadingException()
return HomePageResponse(items)
}
@ -135,10 +131,12 @@ class WcoProvider : MainAPI() {
override fun quickSearch(query: String): List<SearchResponse> {
val returnValue: ArrayList<SearchResponse> = ArrayList()
val response = JSONObject(app.post(
val response = JSONObject(
app.post(
"https://wcostream.cc/ajax/search",
data = mapOf("keyword" to query)
).text).getString("html") // I won't make a dataclass for this shit
).text
).getString("html") // I won't make a dataclass for this shit
val document = Jsoup.parse(response)
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")
.map { it?.text()?.trim().toString() }
return newAnimeLoadResponse(canonicalTitle,url,getType(type ?: "")) {
return newAnimeLoadResponse(canonicalTitle, url, getType(type ?: "")) {
japName = japaneseTitle
engName = canonicalTitle
posterUrl = poster
this.year = year
addEpisodes(if(isDubbed) DubStatus.Dubbed else DubStatus.Subbed,episodes)
addEpisodes(if (isDubbed) DubStatus.Dubbed else DubStatus.Subbed, episodes)
showStatus = status
plot = synopsis
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.toSubtitleFile
import com.lagradost.cloudstream3.network.WebViewResolver
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
@ -15,28 +14,15 @@ import java.net.URI
import java.util.*
class ZoroProvider : MainAPI() {
override val mainUrl: String
get() = "https://zoro.to"
override val name: String
get() = "Zoro"
override val mainUrl = "https://zoro.to"
override val name = "Zoro"
override val hasQuickSearch = false
override val hasMainPage = true
override val hasChromecastSupport = true
override val hasDownloadSupport = true
override val usesWebView = true
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
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(
override val supportedTypes = setOf(
TvType.Anime,
TvType.AnimeMovie,
TvType.ONA

View file

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,6 @@
package com.lagradost.cloudstream3.extractors
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.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
@ -10,8 +8,8 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI
class MultiQuality : ExtractorApi() {
override val name: String = "MultiQuality"
override val mainUrl: String = "https://gogo-play.net"
override val name = "MultiQuality"
override val mainUrl = "https://gogo-play.net"
private val sourceRegex = Regex("""file:\s*['"](.*?)['"],label:\s*['"](.*?)['"]""")
private val m3u8Regex = Regex(""".*?(\d*).m3u8""")
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.app
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
@ -11,12 +10,9 @@ import com.lagradost.cloudstream3.utils.getPostForm
import org.jsoup.Jsoup
class SBPlay : ExtractorApi() {
override val mainUrl: String
get() = "https://sbplay.one"
override val name: String
get() = "SBPlay"
override val requiresReferer: Boolean
get() = false
override val mainUrl = "https://sbplay.one"
override val name = "SBPlay"
override val requiresReferer = false
override fun getUrl(url: String, referer: String?): List<ExtractorLink> {
val response = app.get(url, referer = referer).text
@ -42,16 +38,29 @@ class SBPlay : ExtractorApi() {
getPostForm(href, hrefResponse)?.let { form ->
val postDocument = Jsoup.parse(form)
val downloadBtn = postDocument.selectFirst("a.downloadbtn")?.attr("href")
if(downloadBtn.isNullOrEmpty()) {
if (downloadBtn.isNullOrEmpty()) {
val hrefSpan2 = postDocument.selectFirst("span > a")?.attr("href")
if(hrefSpan2?.startsWith("https://") == true) {
links.add(ExtractorLink(this.name, name,
hrefSpan2, "", Qualities.Unknown.value, false))
if (hrefSpan2?.startsWith("https://") == true) {
links.add(
ExtractorLink(
this.name, name,
hrefSpan2, "", Qualities.Unknown.value, false
)
)
} else {
// no link found!!!
}
} else {
links.add(ExtractorLink(this.name, name, downloadBtn, "", Qualities.Unknown.value, false))
links.add(
ExtractorLink(
this.name,
name,
downloadBtn,
"",
Qualities.Unknown.value,
false
)
)
}
}
} else {

View file

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

View file

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

View file

@ -1,7 +1,6 @@
package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.JsUnpacker
@ -9,12 +8,9 @@ import com.lagradost.cloudstream3.utils.Qualities
import java.net.URI
class Streamhub : ExtractorApi() {
override val mainUrl: String
get() = "https://streamhub.to"
override val name: String
get() = "Streamhub"
override val requiresReferer: Boolean
get() = false
override val mainUrl = "https://streamhub.to"
override val name = "Streamhub"
override val requiresReferer = false
override fun getExtractorUrl(id: String): String {
return "$mainUrl/e/$id"
@ -23,7 +19,7 @@ class Streamhub : ExtractorApi() {
override fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.get(url).text
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 ->
return listOf(
ExtractorLink(

View file

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

View file

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

View file

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

View file

@ -5,25 +5,18 @@ import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
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.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI
class AsiaFlixProvider : MainAPI() {
override val mainUrl: String
get() = "https://asiaflix.app"
override val name: String
get() = "AsiaFlix"
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
get() = true
override val hasChromecastSupport: Boolean
get() = false
override val supportedTypes: Set<TvType>
get() = setOf(TvType.TvSeries)
override val mainUrl = "https://asiaflix.app"
override val name = "AsiaFlix"
override val hasQuickSearch = false
override val hasMainPage = true
override val hasChromecastSupport = false
override val supportedTypes = setOf(TvType.TvSeries)
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
*/
class AsianLoadProvider : VidstreamProviderTemplate() {
override val name: String
get() = "AsianLoad"
override val mainUrl: String
get() = "https://asianembed.io"
override val name = "AsianLoad"
override val mainUrl = "https://asianembed.io"
override val homePageUrlList = listOf(
mainUrl,
"$mainUrl/recently-added-raw",
@ -21,6 +17,5 @@ class AsianLoadProvider : VidstreamProviderTemplate() {
"$mainUrl/ongoing-series"
)
override val supportedTypes: Set<TvType>
get() = setOf(TvType.TvSeries, TvType.Movie)
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)
}

View file

@ -1,23 +1,18 @@
package com.lagradost.cloudstream3.movieproviders
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import org.jsoup.Jsoup
class HDMProvider : MainAPI() {
override val name: String
get() = "HD Movies"
override val mainUrl: String
get() = "https://hdm.to"
override val name = "HD Movies"
override val mainUrl = "https://hdm.to"
override val hasMainPage = true
override val supportedTypes: Set<TvType>
get() = setOf(
override val supportedTypes = setOf(
TvType.Movie,
)
override val hasMainPage: Boolean
get() = true
override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/search/$query"

View file

@ -4,25 +4,18 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.APIHolder.unixTime
import com.lagradost.cloudstream3.utils.ExtractorLink
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 org.jsoup.Jsoup
//BE AWARE THAT weboas.is is a clone of lookmovie
class LookMovieProvider : MainAPI() {
override val hasQuickSearch: Boolean
get() = true
override val hasQuickSearch = true
override val name = "LookMovie"
override val mainUrl = "https://lookmovie.io"
override val name: String
get() = "LookMovie"
override val mainUrl: String
get() = "https://lookmovie.io"
override val supportedTypes: Set<TvType>
get() = setOf(
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
)

View file

@ -3,24 +3,17 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
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.getQualityFromName
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
class MeloMovieProvider : MainAPI() {
override val name: String
get() = "MeloMovie"
override val mainUrl: String
get() = "https://melomovie.com"
override val instantLinkLoading: Boolean
get() = true
override val hasQuickSearch: Boolean
get() = true
override val hasChromecastSupport: Boolean
get() = false // MKV FILES CANT BE PLAYED ON A CHROMECAST
override val name = "MeloMovie"
override val mainUrl = "https://melomovie.com"
override val instantLinkLoading = true
override val hasQuickSearch = true
override val hasChromecastSupport = false // MKV FILES CANT BE PLAYED ON A CHROMECAST
data class MeloMovieSearchResult(
@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.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.WebViewResolver
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName
@ -12,29 +11,16 @@ import org.jsoup.Jsoup
import org.jsoup.nodes.Element
import java.net.URI
class SflixProvider(private val providerUrl: String, private val providerName: String) : MainAPI() {
override val mainUrl: String
get() = providerUrl
override val name: String
get() = providerName
class SflixProvider(providerUrl: String, providerName: String) : MainAPI() {
override val mainUrl = providerUrl
override val name = providerName
override val hasQuickSearch: Boolean
get() = false
override val hasMainPage: Boolean
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(
override val hasQuickSearch = false
override val hasMainPage = true
override val hasChromecastSupport = true
override val hasDownloadSupport = true
override val usesWebView = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
)

View file

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

View file

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

View file

@ -2,35 +2,25 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty
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.TmdbProvider
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.SubtitleHelper
class TrailersTwoProvider : TmdbProvider() {
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
get() = "Trailers.to"
override val name: String
get() = "Trailers.to"
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(
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
TvType.AnimeMovie,

View file

@ -3,23 +3,15 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
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.getQualityFromName
import org.jsoup.Jsoup
import java.util.ArrayList
class VMoveeProvider : MainAPI() {
override val name: String
get() = "VMovee"
override val mainUrl: String
get() = "https://www.vmovee.watch"
override val name = "VMovee"
override val mainUrl = "https://www.vmovee.watch"
override val supportedTypes: Set<TvType>
get() = setOf(
TvType.Movie,
)
override val supportedTypes = setOf(TvType.Movie)
override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?s=$query"
@ -34,7 +26,7 @@ class VMoveeProvider : MainAPI() {
// val href = imgHolder.attr("href")
val poster = imgHolder.selectFirst("> img").attr("data-lazy-src")
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 title = titleHolder.text()
@ -93,7 +85,11 @@ class VMoveeProvider : MainAPI() {
val prefix = "https://reeoov.tube/v/"
if (request.url.startsWith(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)
for (d in apiData.data) {
callback.invoke(

View file

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

View file

@ -1,36 +1,21 @@
package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import okio.Buffer
import org.jsoup.Jsoup
// referer = https://vf-serie.org, USERAGENT ALSO REQUIRED
class VfSerieProvider : MainAPI() {
override val mainUrl: String
get() = "https://vf-serie.org"
override val name: String
get() = "vf-serie.org"
override val mainUrl = "https://vf-serie.org"
override val name = "vf-serie.org"
override val lang = "fr"
override val lang: String = "fr"
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.TvSeries,
)
override val hasQuickSearch = false
override val hasMainPage = false
override val hasChromecastSupport = false
override val supportedTypes = setOf(TvType.TvSeries)
override fun search(query: String): List<SearchResponse> {
val url = "$mainUrl/?s=$query"
@ -57,17 +42,14 @@ class VfSerieProvider : MainAPI() {
return returnValue
}
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 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 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 vudoUrl
return Regex("sources: \\[\"(.*?)\"\\]").find(document.html())?.groupValues?.get(1)
.toString() // direct mp4 link, https://m5.vudeo.net/2vp3xgpw2avjdohilpfbtyuxzzrqzuh4z5yxvztral5k3rjnba6f4byj3saa/v.mp4 for exemple
}
override fun loadLinks(
@ -81,29 +63,30 @@ class VfSerieProvider : MainAPI() {
val response = app.get(data).text
val document = Jsoup.parse(response)
val players = document.select("ul.TPlayerNv > li")
val trembed_url = 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
val trembedUrl = document.selectFirst("div.TPlayerTb > iframe").attr("src")
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
for (player in players) {
if (player.selectFirst("> span").text() == "Vudeo") {
found = true
break
} else {
number_player += 1
numberPlayer += 1
}
}
if (found == false) {
number_player = 1
if (!found) {
numberPlayer = 1
}
val i = number_player.toString()
val i = numberPlayer.toString()
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(
ExtractorLink(
this.name,
this.name,
data,
directData,
"",
Qualities.P720.value,
false
@ -112,26 +95,24 @@ class VfSerieProvider : MainAPI() {
return true
}
override fun load(url: String): LoadResponse {
val response = app.get(url).text
val document = Jsoup.parse(response)
val title = document?.selectFirst(".Title")?.text()?.replace("Regarder Serie ","")?.replace(" En Streaming", "")
val title =
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 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 list = ArrayList<Int>()
// episode begin
@ -150,7 +131,8 @@ class VfSerieProvider : MainAPI() {
if (episodes.isNotEmpty()) {
episodes.forEach { episode ->
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 date = episode.selectFirst("> td.MvTbTtl > span")?.text()?.toString()
val name = aName.text()
@ -181,8 +163,5 @@ class VfSerieProvider : MainAPI() {
null,
rating
)
}
}

View file

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

View file

@ -2,7 +2,6 @@ package com.lagradost.cloudstream3.movieproviders
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.Vidstream
import com.lagradost.cloudstream3.network.text
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup
@ -27,12 +26,10 @@ open class VidstreamProviderTemplate : MainAPI() {
// 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.
// VidEmbed actually has quick search on their site, but the function wasn't implemented.
override val hasQuickSearch: Boolean
get() = false
override val hasQuickSearch = false
// If getMainPage() is functional, used to display the homepage in app, an optional, but highly encouraged endevour.
override val hasMainPage: Boolean
get() = true
override val hasMainPage = true
// 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 {

View file

@ -60,7 +60,7 @@ val Response.url: String
val Response.cookies: Map<String, String>
get() {
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(";")
return cookieList?.associate {
val split = it.split("=")

View file

@ -26,18 +26,12 @@ import java.net.URL
import java.util.*
class AniListApi(index: Int) : AccountManager(index), SyncAPI {
override val name: String
get() = "AniList"
override val key: String
get() = "6871"
override val redirectUrl: String
get() = "anilistlogin"
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 val name = "AniList"
override val key = "6871"
override val redirectUrl = "anilistlogin"
override val idPrefix = "anilist"
override val mainUrl = "https://anilist.co"
override val icon = R.drawable.ic_anilist_icon
override fun loginInfo(context: Context): OAuth2API.LoginInfo? {
// 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"
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? {

View file

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

View file

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

View file

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

View file

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

View file

@ -6,7 +6,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
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.mvvm.Resource
import com.lagradost.cloudstream3.mvvm.safeApiCall
@ -269,7 +269,11 @@ class ResultViewModel : ViewModel() {
_publicEpisodes.postValue(Resource.Loading())
_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)
val data = repo?.load(url)
@ -464,9 +468,9 @@ class ResultViewModel : ViewModel() {
var title: String
var count = 0
while (true) {
title = "$langId${if (count == 0) "" else " ${count+1}"}"
title = "$langId${if (count == 0) "" else " ${count + 1}"}"
count++
if(!subs.containsKey(title)) {
if (!subs.containsKey(title)) {
break
}
}

View file

@ -1,10 +1,8 @@
package com.lagradost.cloudstream3.utils
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.network.text
import org.jsoup.Jsoup
import java.util.*
import kotlin.collections.HashMap
object FillerEpisodeCheck {
private const val MAIN_URL = "https://www.animefillerlist.com"
@ -12,7 +10,7 @@ object FillerEpisodeCheck {
var list: HashMap<String, String>? = null
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 {
@ -25,7 +23,7 @@ object FillerEpisodeCheck {
for (i in localHTMLList) {
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")
if (name.isNullOrEmpty() || href.isNullOrEmpty()) {

View file

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

View file

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