mirror of
https://github.com/yoyzo/arab
synced 2024-08-15 03:15:00 +00:00
commit
4fab61ecbd
1 changed files with 23 additions and 16 deletions
|
@ -15,7 +15,7 @@ class Movizland : MainAPI() {
|
||||||
override var name = "Movizland"
|
override var name = "Movizland"
|
||||||
override val usesWebView = false
|
override val usesWebView = false
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie, TvType.Anime, TvType.Cartoon)
|
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie, TvType.AsianDrama, TvType.Anime)
|
||||||
|
|
||||||
private fun String.getIntFromText(): Int? {
|
private fun String.getIntFromText(): Int? {
|
||||||
return Regex("""\d+""").find(this)?.groupValues?.firstOrNull()?.toIntOrNull()
|
return Regex("""\d+""").find(this)?.groupValues?.firstOrNull()?.toIntOrNull()
|
||||||
|
@ -91,21 +91,6 @@ class Movizland : MainAPI() {
|
||||||
return result.distinct().sortedBy { it.name }
|
return result.distinct().sortedBy { it.name }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
private fun Element.toEpisode(): Episode {
|
|
||||||
val a = select("div.EpisodeItem")
|
|
||||||
val url = a.select("a")?.attr("href")
|
|
||||||
val title = a.text()
|
|
||||||
//val thumbUrl = a.select("div.BlockImageItem img")?.attr("src")
|
|
||||||
val Epsnum = a.select("em").text()
|
|
||||||
return newEpisode(url) {
|
|
||||||
name = title
|
|
||||||
episode = Epsnum.getIntFromText()
|
|
||||||
//posterUrl = thumbUrl
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
private fun getSeasonFromString(tit: String): Int {
|
private fun getSeasonFromString(tit: String): Int {
|
||||||
if(tit.contains("الموسم الاول".toRegex())){ return 1 }
|
if(tit.contains("الموسم الاول".toRegex())){ return 1 }
|
||||||
else if(tit.contains("الموسم الحادي عشر".toRegex())){ return 11 }
|
else if(tit.contains("الموسم الحادي عشر".toRegex())){ return 11 }
|
||||||
|
@ -249,6 +234,28 @@ class Movizland : MainAPI() {
|
||||||
var sourceUrl = it.attr("data-srcout")
|
var sourceUrl = it.attr("data-srcout")
|
||||||
loadExtractor(sourceUrl, data, subtitleCallback, callback)
|
loadExtractor(sourceUrl, data, subtitleCallback, callback)
|
||||||
}
|
}
|
||||||
|
val regcode = """moshahda.net/embed-(\w+)""".toRegex()
|
||||||
|
val moshembed = doc.select("#EmbedScmain iframe").attr("data-srcout")
|
||||||
|
val code = regcode.find(moshembed)?.groupValues?.getOrNull(1)
|
||||||
|
val moshlink = "https://moshahda.net/embed-$code.html?"
|
||||||
|
val moshpage = app.get(moshlink).document
|
||||||
|
val moshpagehtml = moshpage.select("html > body > script").html()
|
||||||
|
val watchlink = moshpagehtml.substringAfter("""fileType: "m3u8", file: """").substringBefore('\"')
|
||||||
|
|
||||||
|
if(watchlink!=null) {
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
"Moshahda",
|
||||||
|
"Moshahda",
|
||||||
|
url = watchlink,
|
||||||
|
this.mainUrl,
|
||||||
|
quality = Qualities.Unknown.value,
|
||||||
|
isM3u8 = true,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
else { return false }
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue