mirror of
https://github.com/yoyzo/arab
synced 2024-08-15 03:15:00 +00:00
some fixes for some providers
egybest still broken
This commit is contained in:
parent
c7bd8bf973
commit
c007fefc1a
7 changed files with 68 additions and 38 deletions
|
@ -1,4 +1,4 @@
|
|||
version = 1
|
||||
version = 2
|
||||
|
||||
cloudstream {
|
||||
description = ""
|
||||
|
|
|
@ -4,6 +4,8 @@ package com.animeblkom
|
|||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.Qualities
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
class AnimeBlkom : MainAPI() {
|
||||
|
@ -111,11 +113,46 @@ class AnimeBlkom : MainAPI() {
|
|||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
val doc = app.get(data).document
|
||||
doc.select(".panel .panel-body a").forEach {
|
||||
doc.select("div.item a[data-src]").map {
|
||||
it.attr("data-src").let { url ->
|
||||
if(url.startsWith("https://animetitans.net/")) {
|
||||
val iframe = app.get(url).document
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
this.name,
|
||||
"Animetitans " + it.text(),
|
||||
iframe.select("script").last()?.data()?.substringAfter("source: \"")?.substringBefore("\"").toString(),
|
||||
this.mainUrl,
|
||||
Qualities.Unknown.value,
|
||||
isM3u8 = true
|
||||
)
|
||||
)
|
||||
} else if(it.text() == "Blkom") {
|
||||
val iframe = app.get(url).document
|
||||
iframe.select("source").forEach { source ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
this.name,
|
||||
it.text(),
|
||||
source.attr("src"),
|
||||
this.mainUrl,
|
||||
source.attr("res").toInt()
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
var sourceUrl = url
|
||||
if(it.text().contains("Google")) sourceUrl = "http://gdriveplayer.to/embed2.php?link=$url"
|
||||
loadExtractor(sourceUrl, mainUrl, subtitleCallback, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
doc.select(".panel .panel-body a").apmap {
|
||||
println(it.text())
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
this.name,
|
||||
it.attr("title") + " " + it.select("small").text(),
|
||||
it.attr("title") + " " + it.select("small").text() + " Download Source",
|
||||
it.attr("href"),
|
||||
this.mainUrl,
|
||||
it.text().replace("p.*| ".toRegex(),"").toInt(),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version = 1
|
||||
version = 2
|
||||
|
||||
cloudstream {
|
||||
description = ""
|
||||
|
|
|
@ -116,7 +116,7 @@ class Animeiat : MainAPI() {
|
|||
)
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val loadSession = Requests()
|
||||
val request = loadSession.get(url).text
|
||||
val request = loadSession.get(url.replace(pageUrl, mainUrl)).text
|
||||
val json = parseJson<Load>(request)
|
||||
val episodes = arrayListOf<Episode>()
|
||||
(1..parseJson<Episodes>(loadSession.get("$url/episodes").text).meta.lastPage!!).map { pageNumber ->
|
||||
|
@ -134,7 +134,7 @@ class Animeiat : MainAPI() {
|
|||
}
|
||||
}
|
||||
return newAnimeLoadResponse(json.data?.animeName.toString(), "$pageUrl/watch/"+json.data?.slug, if(json.data?.type == "movie") TvType.AnimeMovie else if(json.data?.type == "tv") TvType.Anime else TvType.OVA) {
|
||||
japName = json.data?.otherNames?.split("\n")?.get(1)
|
||||
japName = json.data?.otherNames?.replace("\\n.*".toRegex(), "")
|
||||
engName = json.data?.animeName
|
||||
posterUrl = "https://api.animeiat.co/storage/" + json.data?.posterPath
|
||||
this.year = json.data?.year?.name?.toIntOrNull()
|
||||
|
|
|
@ -37,7 +37,7 @@ fun String.runJS(variableName: String): String {
|
|||
|
||||
class EgyBest : MainAPI() {
|
||||
override var lang = "ar"
|
||||
override var mainUrl = "https://www.egy.best"
|
||||
override var mainUrl = "https://egybest.org"
|
||||
override var name = "EgyBest"
|
||||
var pssid = ""
|
||||
override val usesWebView = false
|
||||
|
@ -60,7 +60,7 @@ class EgyBest : MainAPI() {
|
|||
// If you need to differentiate use the url.
|
||||
return MovieSearchResponse(
|
||||
title,
|
||||
url,
|
||||
mainUrl + url,
|
||||
this@EgyBest.name,
|
||||
tvType,
|
||||
posterUrl,
|
||||
|
@ -102,9 +102,8 @@ class EgyBest : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val q = query.replace(" ","%20")
|
||||
val result = arrayListOf<SearchResponse>()
|
||||
listOf("$mainUrl/explore/?q=$q").apmap { url ->
|
||||
listOf("$mainUrl/explore/?q=$query").apmap { url ->
|
||||
val d = app.get(url).document
|
||||
d.select("div.movies a").not("a.auto.load.btn.b").mapNotNull {
|
||||
it.toSearchResponse()?.let { it1 -> result.add(it1) }
|
||||
|
@ -118,7 +117,7 @@ class EgyBest : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val doc = app.get(mainUrl + url).document
|
||||
val doc = app.get(url).document
|
||||
val isMovie = Regex(".*/movie/.*|.*/masrahiya/.*").matches(url)
|
||||
val posterUrl = doc.select("div.movie_img a img")?.attr("src")
|
||||
val year = doc.select("div.movie_title h1 a")?.text()?.toIntOrNull()
|
||||
|
@ -172,7 +171,7 @@ class EgyBest : MainAPI() {
|
|||
val ep = Regex("ep-(.....)").find(element.select(".ep_title a").attr("href"))?.groupValues?.getOrNull(1)?.getIntFromText()
|
||||
episodes.add(
|
||||
Episode(
|
||||
element.select(".ep_title a").attr("href"),
|
||||
mainUrl + element.select(".ep_title a").attr("href"),
|
||||
name = element.select("td.ep_title").html().replace(".*</span>|</a>".toRegex(), ""),
|
||||
season,
|
||||
ep,
|
||||
|
@ -185,7 +184,7 @@ class EgyBest : MainAPI() {
|
|||
val ep = Regex("ep-(.....)").find(eit.attr("href"))?.groupValues?.getOrNull(1)?.getIntFromText()
|
||||
episodes.add(
|
||||
Episode(
|
||||
eit.attr("href"),
|
||||
mainUrl + eit.attr("href"),
|
||||
eit.select("span.title").text(),
|
||||
season,
|
||||
ep,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version = 1
|
||||
version = 2
|
||||
|
||||
cloudstream {
|
||||
description = ""
|
||||
description = "Not recommended for series."
|
||||
authors = listOf( "Spoonge" )
|
||||
|
||||
language = "ar"
|
||||
|
|
|
@ -46,7 +46,9 @@ class Movizland : MainAPI() {
|
|||
private fun Element.toSearchResponse(): SearchResponse? {
|
||||
val url = select(".BlockItem")
|
||||
val title = url.select(".BlockTitle").text().cleanTitle()
|
||||
val posterUrl = if (url.select(".BlockTitle").text().contains("فيلم")) {select(".BlockImageItem img")?.attr("src")} else {select(".BlockImageItem > img:nth-child(3)")?.attr("src")}
|
||||
val posterUrl = select(".BlockImageItem img")?.attr("src")?.ifEmpty {
|
||||
select(".BlockImageItem img")[1].attr("src")
|
||||
}
|
||||
val year = select(".InfoEndBlock li").last()?.text()?.getIntFromText()
|
||||
var quality = select(".RestInformation li").last()?.text()?.replace(" |-|1080p|720p".toRegex(), "")
|
||||
?.replace("WEB DL","WEBDL")?.replace("BluRay","BLURAY")
|
||||
|
@ -76,19 +78,11 @@ class Movizland : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val q = query.replace(" ".toRegex(), "%20")
|
||||
val result = arrayListOf<SearchResponse>()
|
||||
listOf(
|
||||
"$mainUrl/category/movies/?s=$q",
|
||||
"$mainUrl/series/?searching=$q"
|
||||
).apmap { url ->
|
||||
val d = app.get(url).document
|
||||
d.select("div.BlockItem").mapNotNull {
|
||||
//if (!it.text().contains("فيلم||موسم")) return@mapNotNull null
|
||||
it.toSearchResponse()?.let { it1 -> result.add(it1) }
|
||||
}
|
||||
val d = app.get("$mainUrl/?s=$query").document
|
||||
return d.select("div.BlockItem").mapNotNull {
|
||||
if(it.select(".BlockTitle").text().contains("الحلقة")) return@mapNotNull null;
|
||||
it.toSearchResponse()
|
||||
}
|
||||
return result.distinct().sortedBy { it.name }
|
||||
}
|
||||
|
||||
private fun getSeasonFromString(tit: String): Int {
|
||||
|
@ -119,10 +113,12 @@ class Movizland : MainAPI() {
|
|||
override suspend fun load(url: String): LoadResponse {
|
||||
var doc = app.get(url).document
|
||||
val sdetails = doc.select(".SingleDetails")
|
||||
val posterUrl = sdetails.select("img")?.attr("data-src")
|
||||
val posterUrl = sdetails.select(".Poster img").attr("data-src").ifEmpty {
|
||||
sdetails.select(".BlockItem").last()?.select(".Poster img")?.attr("src")
|
||||
}
|
||||
val year = sdetails.select("li:has(.fa-clock) a").text()?.getIntFromText()
|
||||
val title = doc.select("h2.postTitle").text().cleanTitle()
|
||||
val isMovie = if(doc.select("h2.postTitle").text().contains("عرض|فيلم".toRegex())) true else false
|
||||
val isMovie = doc.select("h2.postTitle").text().contains("عرض|فيلم".toRegex())
|
||||
val synopsis = doc.select("section.story").text()
|
||||
val trailer = doc.select("div.InnerTrailer iframe").attr("data-src")
|
||||
val tags = sdetails.select("li:has(.fa-film) a").map{ it.text() }
|
||||
|
@ -147,14 +143,12 @@ class Movizland : MainAPI() {
|
|||
val refererUrl = doc.select("body > header > div > div.Logo > a").attr("href")
|
||||
if(doc.select(".BlockItem a").attr("href").contains("/series/")){//seasons
|
||||
doc.select(".BlockItem").map { seas ->
|
||||
seas.select("a").attr("href") }.apmap{
|
||||
val Sedoc = app.get(it).document
|
||||
val pagEl = Sedoc.select(".pagination > div > ul > li.active > a").isNotEmpty()
|
||||
val pagSt = if(pagEl) true else false
|
||||
if(pagSt){
|
||||
Sedoc.select(".pagination > div > ul > li:nth-child(n):not(:last-child) a").map{ eppages ->
|
||||
eppages.attr("href") }.apmap{
|
||||
val epidoc = app.get(it).document
|
||||
seas.select("a").attr("href") }.apmap{ pageIt ->
|
||||
val Sedoc = app.get(pageIt).document
|
||||
val pagEl = Sedoc.select(".pagination > div > ul > li").isNotEmpty()
|
||||
if(pagEl) {
|
||||
Sedoc.select(".pagination > div > ul > li:nth-child(n):not(:last-child) a").apmap {
|
||||
val epidoc = app.get(it.attr("href")).document
|
||||
epidoc.select("div.BlockItem").map{ element ->
|
||||
episodes.add(
|
||||
Episode(
|
||||
|
|
Loading…
Reference in a new issue