update and refactor stuff (#516)

This commit is contained in:
IndusAryan 2024-01-14 17:48:06 +05:30 committed by GitHub
parent 832656852a
commit bb6ca96489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 27 additions and 57 deletions

View file

@ -1,11 +1,8 @@
version = 1
version = 2
cloudstream {
language = "hi"
// All of these properties are optional, you can safely remove them
description = "YOU HAVE SKIP ADS on the SITE each 24 hours, Hindi dubbed cartoons"
description = "SKIP ADS on the SITE every 24 hours to Play, has Hindi Dubbed Cartoons"
authors = listOf("anon")
/**

View file

@ -3,19 +3,11 @@ package com.anon
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
// import com.lagradost.cloudstream3.utils.ExtractorApi
// import com.lagradost.cloudstream3.utils.extractorApis
@CloudstreamPlugin
class AnimeDekhoPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AnimeDekhoProvider())
//addExtractor(MultiQualityXYZ())
}
// private fun addExtractor(element: ExtractorApi) {
// element.sourcePlugin = __filename
// extractorApis.add(0, element)
// }
}

View file

@ -28,18 +28,17 @@ import okhttp3.RequestBody.Companion.toRequestBody
import com.lagradost.cloudstream3.extractors.helper.AesHelper.cryptoAESHandler
class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of MainAPI
override var mainUrl = "https://animedekho.com/"
class AnimeDekhoProvider : MainAPI() {
override var mainUrl = "https://animedekho.com"
override var name = "Anime Dekho"
override val hasMainPage = true
override var lang = "hi"
override val hasDownloadSupport = true
override val supportedTypes = setOf(
TvType.TvSeries,
TvType.Cartoon,
TvType.Anime,
TvType.AnimeMovie,
TvType.Movie
)
@ -53,15 +52,12 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
val link = "$mainUrl${request.data}"
val document = app.get(link).document
//Log.d("TAGNAME", "$document")
val home = document.select("article").mapNotNull {
it.toSearchResult()
}
return newHomePageResponse(request.name, home)
}
private fun Element.toSearchResult(): AnimeSearchResponse? {
//val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null)
val href = this.selectFirst("a.lnk-blk")?.attr("href") ?: "null"
@ -128,7 +124,6 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M
callback: (ExtractorLink) -> Unit
): Boolean {
var vidlink = ""
if(data.contains("https://vidxstream.xyz")){
@ -142,7 +137,6 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M
var term = Regex("""\bterm-(\d+)\b""").find(name)?.value!!?.replace("term-","")
vidlink = app.get("https://animedekho.com/?trembed=0&trid="+term)
.document?.selectFirst("iframe")?.attr("src") ?: "null"
}
@ -151,7 +145,6 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M
val body = app.get(vidlink).text
val master = Regex("""JScript[\w+]?\s*=\s*'([^']+)""").find(body)!!.groupValues?.get(1)
val decrypt = cryptoAESHandler(master ?: return false, "4MmH9EsZrq0WEekn".toByteArray(), false)?.replace("\\", "") ?: "ERROR"
@ -172,27 +165,17 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M
"user-agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
)
callback.invoke(
ExtractorLink(
source = "Toon",
name = "Toon",
url = vidfinal!!,
referer = "https://vidxstream.xyz/",
quality = Qualities.Unknown.value,
isM3u8 = true,
headers = headers,
)
)
callback.invoke(ExtractorLink
(
source = "Toon",
name = "Toon",
url = vidfinal!!,
referer = "https://vidxstream.xyz/",
quality = Qualities.Unknown.value,
isM3u8 = true,
headers = headers,
)
)
return true
}
}

View file

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

View file

@ -18,6 +18,4 @@ class Animesaga : Movierulzhd() {
"tvshows" to "TV-Shows",
"genre/hindi-dub" to "Hindi Dub",
)
}

View file

@ -12,14 +12,14 @@ import org.jsoup.Jsoup
class Hdmovie2 : Movierulzhd() {
override var mainUrl = "https://hdmovie2.foo"
override var mainUrl = "https://hdmovie2.ist"
override var name = "Hdmovie2"
override val mainPage = mainPageOf(
"trending" to "Trending",
"movies" to "Movies",
"genre/tv-series" to "TV-Series",
"genre/tv-series" to "TV Shows",
"genre/netflix" to "Netflix",
"genre/zee5-tv-series" to "Zee5 TV Series",
"genre/zee5-tv-series" to "Zee5",
)
override suspend fun loadLinks(

View file

@ -11,7 +11,7 @@ import java.net.URI
open class Movierulzhd : MainAPI() {
override var mainUrl = "https://movierulzhd.host"
override var mainUrl = "https://movierulzhd.fit"
var directUrl = ""
override var name = "Movierulzhd"
override val hasMainPage = true

View file

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers
version = 216
version = 217
android {
defaultConfig {

View file

@ -125,7 +125,7 @@ open class SoraStream : TmdbProvider() {
const val gMoviesAPI = "https://gdrivemovies.xyz"
const val hdmovies4uAPI = "https://hdmovies4u.dad"
const val vegaMoviesAPI = "https://vegamovies.dad"
const val dotmoviesAPI = "https://dotmovies.bet"
const val dotmoviesAPI = "https://dotmovies.rsvp"
const val tvMoviesAPI = "https://www.tvseriesnmovies.com"
const val moviezAddAPI = "https://ww3.moviezaddiction.click"
const val bollyMazaAPI = "https://ww3.bollymaza.click"