mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix marin in anichi and added Nodrakorid
This commit is contained in:
parent
031aa780c9
commit
bf9d2d5c31
7 changed files with 34 additions and 35 deletions
|
@ -1,7 +1,7 @@
|
|||
import org.jetbrains.kotlin.konan.properties.Properties
|
||||
|
||||
// use an integer for version numbers
|
||||
version = 6
|
||||
version = 7
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
|
|
|
@ -6,6 +6,8 @@ import com.lagradost.cloudstream3.app
|
|||
import com.lagradost.cloudstream3.argamap
|
||||
import com.lagradost.cloudstream3.extractors.helper.GogoHelper
|
||||
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
||||
import com.lagradost.cloudstream3.utils.AppUtils
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.Qualities
|
||||
import com.lagradost.cloudstream3.utils.SubtitleHelper
|
||||
|
@ -146,20 +148,19 @@ object AnichiExtractors : Anichi() {
|
|||
),
|
||||
referer = "$marinHost/anime",
|
||||
).cookies.let {
|
||||
it["XSRF-TOKEN"] to it["marin_session"]
|
||||
decode(it["XSRF-TOKEN"].toString()) to decode(it["marin_session"].toString())
|
||||
}
|
||||
|
||||
app.get(
|
||||
val json = app.get(
|
||||
url,
|
||||
headers = mapOf(
|
||||
"Referer" to "$marinHost/",
|
||||
"Cookie" to "__ddg1=;__ddg2_=; XSRF-TOKEN=${cookies.first}; marin_session=${cookies.second};",
|
||||
"x-inertia" to "true",
|
||||
"x-inertia-version" to "5ee7503af8c9844b1e8d34466b727694",
|
||||
"X-Requested-With" to "XMLHttpRequest",
|
||||
"X-XSRF-TOKEN" to decode(cookies.first.toString())
|
||||
)
|
||||
).parsedSafe<MarinResponses>()?.props?.video?.data?.mirror?.map { video ->
|
||||
"Accept" to "text/html, application/xhtml+xml",
|
||||
"Cookie" to "__ddg1=;__ddg2_=;XSRF-TOKEN=${cookies.first};marin_session=${cookies.second};",
|
||||
"X-XSRF-TOKEN" to cookies.first
|
||||
),
|
||||
referer = "$marinHost/anime/$id"
|
||||
).document.selectFirst("div#app")?.attr("data-page")
|
||||
tryParseJson<MarinResponses>(json)?.props?.video?.data?.mirror?.map { video ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"Marin",
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.hexated
|
|||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.extractors.XStreamCdn
|
||||
import com.lagradost.cloudstream3.utils.AppUtils
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||
|
@ -60,9 +61,7 @@ open class DramaidProvider : MainAPI() {
|
|||
private fun Element.toSearchResult(): SearchResponse? {
|
||||
val href = getProperDramaLink(this.selectFirst("a.tip")!!.attr("href"))
|
||||
val title = this.selectFirst("h2[itemprop=headline]")?.text()?.trim() ?: return null
|
||||
val posterUrl = fixUrlNull(
|
||||
this.selectFirst("noscript img")?.attr("src") ?: this.selectFirst("img")?.attr("src")
|
||||
)
|
||||
val posterUrl = fixUrlNull(this.select("img:last-child").attr("src"))
|
||||
|
||||
return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) {
|
||||
this.posterUrl = posterUrl
|
||||
|
@ -80,7 +79,7 @@ open class DramaidProvider : MainAPI() {
|
|||
val document = app.get(url).document
|
||||
|
||||
val title = document.selectFirst("h1.entry-title")?.text()?.trim() ?: ""
|
||||
val poster = fixUrlNull(document.selectFirst("div.thumb noscript img")?.attr("src") ?: document.selectFirst("div.thumb img")?.attr("src"))
|
||||
val poster = fixUrlNull(document.select("div.thumb img:last-child").attr("src"))
|
||||
val tags = document.select(".genxed > a").map { it.text() }
|
||||
val type = document.selectFirst(".info-content .spe span:contains(Tipe:)")?.ownText()
|
||||
val year = Regex("\\d, ([0-9]*)").find(
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
|
|||
import com.lagradost.cloudstream3.utils.httpsify
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
|
||||
class DutaMovie : Gomov() {
|
||||
open class DutaMovie : Gomov() {
|
||||
override var mainUrl = "https://dutamovie21.live"
|
||||
override var name = "DutaMovie"
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ class GomovPlugin: Plugin() {
|
|||
registerMainAPI(Gomov())
|
||||
registerMainAPI(DutaMovie())
|
||||
registerMainAPI(Ngefilm())
|
||||
registerMainAPI(Nodrakorid())
|
||||
registerExtractorAPI(Filelions())
|
||||
registerExtractorAPI(Likessb())
|
||||
registerExtractorAPI(DbGdriveplayer())
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.mainPageOf
|
|||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
|
||||
class Ngefilm : Gomov() {
|
||||
class Ngefilm : DutaMovie() {
|
||||
override var mainUrl = "https://ngefilm21.lol"
|
||||
override var name = "Ngefilm"
|
||||
|
||||
|
@ -19,22 +19,4 @@ class Ngefilm : Gomov() {
|
|||
"/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=&movieyear=&country=indonesia&quality=" to "Series Indonesia",
|
||||
)
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
|
||||
val document = app.get(data).document
|
||||
document.select("ul.muvipro-player-tabs li a").apmap { server ->
|
||||
val iframe = app.get(fixUrl(server.attr("href"))).document.selectFirst("div.gmr-embed-responsive iframe")
|
||||
?.attr("src")?.let { fixUrl(it) } ?: return@apmap
|
||||
loadExtractor(iframe, "$mainUrl/", subtitleCallback, callback)
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
}
|
16
Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt
Normal file
16
Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt
Normal file
|
@ -0,0 +1,16 @@
|
|||
package com.hexated
|
||||
|
||||
import com.lagradost.cloudstream3.mainPageOf
|
||||
|
||||
class Nodrakorid : DutaMovie() {
|
||||
override var mainUrl = "https://no-drak-or.xyz"
|
||||
override var name = "Nodrakorid"
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
"genre/movie/page/%d/" to "Film Terbaru",
|
||||
"genre/korean-movie/page/%d/" to "Film Korea",
|
||||
"genre/drama/page/%d/" to "Drama Korea",
|
||||
"genre/c-drama/c-drama-c-drama/page/%d/" to "Drama China",
|
||||
"genre/thai-drama/page/%d/" to "Drama Thailand",
|
||||
)
|
||||
}
|
Loading…
Reference in a new issue