2
1
Fork 1
mirror of https://github.com/yoyzo/arab synced 2024-08-15 03:15:00 +00:00

So much shit

This commit is contained in:
Zaw 2023-02-16 14:16:57 +03:00
parent a50fcc8cf5
commit 649a4deb27
33 changed files with 181 additions and 226 deletions

View file

@ -1,7 +1,6 @@
version = 6
version = 7
cloudstream {
description = ""
authors = listOf( "ImZaw" )
language = "ar"

View file

@ -7,6 +7,5 @@ import android.content.Context
class MyCimaPlugin: Plugin() {
override fun load(context: Context) {
registerMainAPI(MyCima())
registerExtractorAPI(MyVid())
}
}

View file

@ -55,7 +55,7 @@ class MyCima : MainAPI() {
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
val doc = app.get(request.data + page).document
val list = doc.select("div.Grid--MycimaPosts div.GridItem").mapNotNull { element ->
val list = doc.select("div.Grid--WecimaPosts div.GridItem").mapNotNull { element ->
element.toSearchResponse()
}
return newHomePageResponse(request.name, list)
@ -70,7 +70,7 @@ class MyCima : MainAPI() {
"$mainUrl/search/$q/list/anime/"
).apmap { url ->
val d = app.get(url).document
d.select("div.Grid--MycimaPosts div.GridItem").mapNotNull {
d.select("div.Grid--WecimaPosts div.GridItem").mapNotNull {
if (it.text().contains("اعلان")) return@mapNotNull null
it.toSearchResponse()?.let { it1 -> result.add(it1) }
}
@ -86,9 +86,9 @@ class MyCima : MainAPI() {
val doc = app.get(url).document
val isMovie = doc.select("ol li:nth-child(3)").text().contains("افلام")
val posterUrl =
doc.select("mycima.separated--top")?.attr("data-lazy-style")?.getImageURL()
doc.select("wecima.separated--top")?.attr("data-lazy-style")?.getImageURL()
?.ifEmpty { doc.select("meta[itemprop=\"thumbnailUrl\"]")?.attr("content") }
?.ifEmpty { doc.select("mycima.separated--top")?.attr("style")?.getImageURL() }
?.ifEmpty { doc.select("wecima.separated--top")?.attr("style")?.getImageURL() }
val year =
doc.select("div.Title--Content--Single-begin h1 a.unline")?.text()?.getIntFromText()
val title = doc.select("div.Title--Content--Single-begin h1").text()
@ -113,7 +113,7 @@ class MyCima : MainAPI() {
Actor(name, image)
}
val recommendations =
doc.select("div.Grid--MycimaPosts div.GridItem")?.mapNotNull { element ->
doc.select("div.Grid--WecimaPosts div.GridItem")?.mapNotNull { element ->
element.toSearchResponse()
}
@ -314,7 +314,7 @@ class MyCima : MainAPI() {
val url = it.select("btn").attr("data-url")
loadExtractor(url, data, subtitleCallback, callback)
}
doc.select("ul.List--Download--Mycima--Single:nth-child(2) li").apmap {
doc.select("ul.List--Download--Wecima--Single:nth-child(2) li").apmap {
it.select("a").map { linkElement ->
callback.invoke(
ExtractorLink(

View file

@ -1,32 +0,0 @@
package com.mycima
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.app
open class MyVid : ExtractorApi() {
override val name = "MyVid"
override val mainUrl = "https://myviid.com"
override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
val sources = mutableListOf<ExtractorLink>()
val text = app.get(url).document.select("body > script:nth-child(2)").html() ?: ""
val a = text.substringAfter("||||").substringBefore("'.split").split("|")
val link = "${a[7]}://${a[24]}.${a[6]}.${a[5]}/${a[83]}/v.${a[82]}"
if (link.isNotBlank()) {
sources.add(
ExtractorLink(
name = name,
source = name,
url = link,
isM3u8 = false,
quality = "${a[80]}".replace("p","").toInt() ?: Qualities.Unknown.value,
referer = "$mainUrl/"
)
)
}
return sources
}
}