fix marin in anichi and added Nodrakorid

This commit is contained in:
hexated 2023-07-22 21:48:46 +07:00
parent 031aa780c9
commit bf9d2d5c31
7 changed files with 34 additions and 35 deletions

View file

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

View file

@ -6,6 +6,8 @@ import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.argamap import com.lagradost.cloudstream3.argamap
import com.lagradost.cloudstream3.extractors.helper.GogoHelper import com.lagradost.cloudstream3.extractors.helper.GogoHelper
import com.lagradost.cloudstream3.mvvm.safeApiCall 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.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
@ -146,20 +148,19 @@ object AnichiExtractors : Anichi() {
), ),
referer = "$marinHost/anime", referer = "$marinHost/anime",
).cookies.let { ).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, url,
headers = mapOf( headers = mapOf(
"Referer" to "$marinHost/", "Accept" to "text/html, application/xhtml+xml",
"Cookie" to "__ddg1=;__ddg2_=; XSRF-TOKEN=${cookies.first}; marin_session=${cookies.second};", "Cookie" to "__ddg1=;__ddg2_=;XSRF-TOKEN=${cookies.first};marin_session=${cookies.second};",
"x-inertia" to "true", "X-XSRF-TOKEN" to cookies.first
"x-inertia-version" to "5ee7503af8c9844b1e8d34466b727694", ),
"X-Requested-With" to "XMLHttpRequest", referer = "$marinHost/anime/$id"
"X-XSRF-TOKEN" to decode(cookies.first.toString()) ).document.selectFirst("div#app")?.attr("data-page")
) tryParseJson<MarinResponses>(json)?.props?.video?.data?.mirror?.map { video ->
).parsedSafe<MarinResponses>()?.props?.video?.data?.mirror?.map { video ->
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
"Marin", "Marin",

View file

@ -3,6 +3,7 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.XStreamCdn import com.lagradost.cloudstream3.extractors.XStreamCdn
import com.lagradost.cloudstream3.utils.AppUtils
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
@ -60,9 +61,7 @@ open class DramaidProvider : MainAPI() {
private fun Element.toSearchResult(): SearchResponse? { private fun Element.toSearchResult(): SearchResponse? {
val href = getProperDramaLink(this.selectFirst("a.tip")!!.attr("href")) val href = getProperDramaLink(this.selectFirst("a.tip")!!.attr("href"))
val title = this.selectFirst("h2[itemprop=headline]")?.text()?.trim() ?: return null val title = this.selectFirst("h2[itemprop=headline]")?.text()?.trim() ?: return null
val posterUrl = fixUrlNull( val posterUrl = fixUrlNull(this.select("img:last-child").attr("src"))
this.selectFirst("noscript img")?.attr("src") ?: this.selectFirst("img")?.attr("src")
)
return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) { return newTvSeriesSearchResponse(title, href, TvType.AsianDrama) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
@ -80,7 +79,7 @@ open class DramaidProvider : MainAPI() {
val document = app.get(url).document val document = app.get(url).document
val title = document.selectFirst("h1.entry-title")?.text()?.trim() ?: "" 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 tags = document.select(".genxed > a").map { it.text() }
val type = document.selectFirst(".info-content .spe span:contains(Tipe:)")?.ownText() val type = document.selectFirst(".info-content .spe span:contains(Tipe:)")?.ownText()
val year = Regex("\\d, ([0-9]*)").find( val year = Regex("\\d, ([0-9]*)").find(

View file

@ -5,7 +5,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.httpsify
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class DutaMovie : Gomov() { open class DutaMovie : Gomov() {
override var mainUrl = "https://dutamovie21.live" override var mainUrl = "https://dutamovie21.live"
override var name = "DutaMovie" override var name = "DutaMovie"

View file

@ -12,6 +12,7 @@ class GomovPlugin: Plugin() {
registerMainAPI(Gomov()) registerMainAPI(Gomov())
registerMainAPI(DutaMovie()) registerMainAPI(DutaMovie())
registerMainAPI(Ngefilm()) registerMainAPI(Ngefilm())
registerMainAPI(Nodrakorid())
registerExtractorAPI(Filelions()) registerExtractorAPI(Filelions())
registerExtractorAPI(Likessb()) registerExtractorAPI(Likessb())
registerExtractorAPI(DbGdriveplayer()) registerExtractorAPI(DbGdriveplayer())

View file

@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.mainPageOf
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class Ngefilm : Gomov() { class Ngefilm : DutaMovie() {
override var mainUrl = "https://ngefilm21.lol" override var mainUrl = "https://ngefilm21.lol"
override var name = "Ngefilm" 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", "/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
}
} }

View 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",
)
}