mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Add Hindi movie link (#21)
* fixed PhimmoichillProvider * final fixed sources * fixed Kuramanime * added HorizontalImages * fixes NontonAnimeIDProvider mainPage Co-authored-by: hexated <hexated@gmail.com>
This commit is contained in:
parent
e9392ff7fd
commit
c5046346ea
8 changed files with 49 additions and 94 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -21,12 +21,6 @@ class KuramanimeProvider : MainAPI() {
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
|
||||||
else TvType.Anime
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getStatus(t: String): ShowStatus {
|
fun getStatus(t: String): ShowStatus {
|
||||||
return when (t) {
|
return when (t) {
|
||||||
"Selesai Tayang" -> ShowStatus.Completed
|
"Selesai Tayang" -> ShowStatus.Completed
|
||||||
|
@ -80,20 +74,11 @@ class KuramanimeProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val link = "$mainUrl/anime?search=$query&order_by=oldest"
|
val link = "$mainUrl/anime?search=$query&order_by=latest"
|
||||||
val document = app.get(link).document
|
val document = app.get(link).document
|
||||||
|
|
||||||
return document.select(".product__item").mapNotNull {
|
return document.select("div#animeList div.col-lg-4.col-md-6.col-sm-6").mapNotNull {
|
||||||
val title = it.selectFirst("div.product__item__text > h5")!!.text().trim()
|
it.toSearchResult()
|
||||||
val poster = it.selectFirst("a > div")!!.attr("data-setbg")
|
|
||||||
val tvType =
|
|
||||||
getType(it.selectFirst(".product__item__text > ul > li")!!.text().toString())
|
|
||||||
val href = fixUrl(it.selectFirst("a")!!.attr("href"))
|
|
||||||
|
|
||||||
newAnimeSearchResponse(title, href, tvType) {
|
|
||||||
this.posterUrl = poster
|
|
||||||
addDubStatus(dubExist = false, subExist = true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +149,10 @@ class KuramanimeProvider : MainAPI() {
|
||||||
name,
|
name,
|
||||||
url,
|
url,
|
||||||
referer = "$mainUrl/",
|
referer = "$mainUrl/",
|
||||||
quality = quality
|
quality = quality,
|
||||||
|
headers = mapOf(
|
||||||
|
"Range" to "bytes=0-"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -47,15 +47,15 @@ class NontonAnimeIDProvider : MainAPI() {
|
||||||
|
|
||||||
document.select("section#postbaru").forEach { block ->
|
document.select("section#postbaru").forEach { block ->
|
||||||
val header = block.selectFirst("h2")!!.text().trim()
|
val header = block.selectFirst("h2")!!.text().trim()
|
||||||
val animes = block.select("article.animeseries").map {
|
val animes = block.select("article.animeseries").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
if (animes.isNotEmpty()) homePageList.add(HomePageList(header, animes))
|
if (animes.isNotEmpty()) homePageList.add(HomePageList(header, animes))
|
||||||
}
|
}
|
||||||
|
|
||||||
document.select("aside#sidebar_right > div:nth-child(4)").forEach { block ->
|
document.select("aside#sidebar_right > div.side").forEach { block ->
|
||||||
val header = block.selectFirst("h3")!!.ownText().trim()
|
val header = block.selectFirst("h3")!!.ownText().trim()
|
||||||
val animes = block.select("li.fullwdth").map {
|
val animes = block.select("ul li.fullwdth").mapNotNull {
|
||||||
it.toSearchResultPopular()
|
it.toSearchResultPopular()
|
||||||
}
|
}
|
||||||
if (animes.isNotEmpty()) homePageList.add(HomePageList(header, animes))
|
if (animes.isNotEmpty()) homePageList.add(HomePageList(header, animes))
|
||||||
|
@ -91,9 +91,9 @@ class NontonAnimeIDProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Element.toSearchResult(): AnimeSearchResponse {
|
private fun Element.toSearchResult(): AnimeSearchResponse? {
|
||||||
val href = getProperAnimeLink(fixUrl(this.selectFirst("a")!!.attr("href")))
|
val href = getProperAnimeLink(fixUrl(this.selectFirst("a")!!.attr("href")))
|
||||||
val title = this.selectFirst("h3.title")!!.text()
|
val title = this.selectFirst("h3.title")?.text() ?: return null
|
||||||
val posterUrl = fixUrl(this.select("img").attr("data-src"))
|
val posterUrl = fixUrl(this.select("img").attr("data-src"))
|
||||||
|
|
||||||
return newAnimeSearchResponse(title, href, TvType.Anime) {
|
return newAnimeSearchResponse(title, href, TvType.Anime) {
|
||||||
|
@ -103,9 +103,9 @@ class NontonAnimeIDProvider : MainAPI() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Element.toSearchResultPopular(): AnimeSearchResponse {
|
private fun Element.toSearchResultPopular(): AnimeSearchResponse? {
|
||||||
val href = getProperAnimeLink(fixUrl(this.selectFirst("a")!!.attr("href")))
|
val href = getProperAnimeLink(fixUrl(this.selectFirst("a")!!.attr("href")))
|
||||||
val title = this.select("h4").text().trim()
|
val title = this.selectFirst("h4")?.text()?.trim() ?: return null
|
||||||
val posterUrl = fixUrl(this.select("img").attr("data-src"))
|
val posterUrl = fixUrl(this.select("img").attr("data-src"))
|
||||||
|
|
||||||
return newAnimeSearchResponse(title, href, TvType.Anime) {
|
return newAnimeSearchResponse(title, href, TvType.Anime) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.lagradost
|
package com.lagradost
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
|
@ -8,7 +7,6 @@ import com.lagradost.cloudstream3.mvvm.safeApiCall
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URLDecoder
|
import java.net.URLDecoder
|
||||||
import java.util.ArrayList
|
|
||||||
|
|
||||||
class PhimmoichillProvider : MainAPI() {
|
class PhimmoichillProvider : MainAPI() {
|
||||||
override var mainUrl = "https://phimmoichill.net"
|
override var mainUrl = "https://phimmoichill.net"
|
||||||
|
@ -41,7 +39,14 @@ class PhimmoichillProvider : MainAPI() {
|
||||||
val home = document.select("li.item").mapNotNull {
|
val home = document.select("li.item").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
return newHomePageResponse(request.name, home)
|
return newHomePageResponse(
|
||||||
|
list = HomePageList(
|
||||||
|
name = request.name,
|
||||||
|
list = home,
|
||||||
|
isHorizontalImages = true
|
||||||
|
),
|
||||||
|
hasNext = true
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun decode(input: String): String? = URLDecoder.decode(input, "utf-8")
|
private fun decode(input: String): String? = URLDecoder.decode(input, "utf-8")
|
||||||
|
@ -97,7 +102,9 @@ class PhimmoichillProvider : MainAPI() {
|
||||||
document.select("ul.entry-meta.block-film li:nth-child(7) span").text().toRatingInt()
|
document.select("ul.entry-meta.block-film li:nth-child(7) span").text().toRatingInt()
|
||||||
val actors = document.select("ul.entry-meta.block-film li:last-child a").map { it.text() }
|
val actors = document.select("ul.entry-meta.block-film li:last-child a").map { it.text() }
|
||||||
val recommendations = document.select("ul#list-film-realted li.item").map {
|
val recommendations = document.select("ul#list-film-realted li.item").map {
|
||||||
it.toSearchResult()
|
it.toSearchResult().apply {
|
||||||
|
this.posterUrl = decode(it.selectFirst("img")!!.attr("data-src").substringAfter("url="))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (tvType == TvType.TvSeries) {
|
return if (tvType == TvType.TvSeries) {
|
||||||
|
@ -145,81 +152,41 @@ class PhimmoichillProvider : MainAPI() {
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val document = app.get(data).document
|
val document = app.get(data).document
|
||||||
|
|
||||||
val key = document.select("div#content script").mapNotNull { script ->
|
val key = document.select("div#content script")
|
||||||
if (script.data().contains("filmInfo.episodeID =")) {
|
.find { it.data().contains("filmInfo.episodeID =") }?.data()?.let { script ->
|
||||||
val id = script.data().substringAfter("filmInfo.episodeID = parseInt('")
|
val id = script.substringAfter("filmInfo.episodeID = parseInt('")
|
||||||
.substringBefore("');")
|
|
||||||
app.post(
|
app.post(
|
||||||
// Not mainUrl
|
// Not mainUrl
|
||||||
url = "https://phimmoichills.net/pmplayer.php",
|
url = "https://phimmoichills.net/pmplayer.php",
|
||||||
data = mapOf("qcao" to id),
|
data = mapOf("qcao" to id, "sv" to "0"),
|
||||||
referer = data,
|
referer = data,
|
||||||
headers = mapOf(
|
headers = mapOf(
|
||||||
"X-Requested-With" to "XMLHttpRequest",
|
"X-Requested-With" to "XMLHttpRequest",
|
||||||
"Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8"
|
"Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
)
|
)
|
||||||
).text.also { println("HERERERR $it") }.substringAfterLast("iniPlayers(\"").substringBefore("\",")
|
).text.substringAfterLast("iniPlayers(\"")
|
||||||
} else {
|
.substringBefore("\",")
|
||||||
null
|
|
||||||
}
|
}
|
||||||
}.first()
|
|
||||||
|
|
||||||
listOf(
|
listOf(
|
||||||
Pair("https://so-trym.topphimmoi.org/hlspm/$key", "PMFAST"),
|
Pair("https://so-trym.topphimmoi.org/raw/$key/index.m3u8", "PMFAST"),
|
||||||
Pair("https://dash.megacdn.xyz/hlspm/$key", "PMHLS"),
|
Pair("https://dash.megacdn.xyz/raw/$key/index.m3u8", "PMHLS"),
|
||||||
Pair("https://dash.megacdn.xyz/dast/$key/index.m3u8", "PMBK")
|
Pair("https://dash.megacdn.xyz/dast/$key/index.m3u8", "PMBK")
|
||||||
).apmap { (link, source) ->
|
).apmap { (link, source) ->
|
||||||
safeApiCall {
|
safeApiCall {
|
||||||
if (source == "PMBK") {
|
callback.invoke(
|
||||||
callback.invoke(
|
ExtractorLink(
|
||||||
ExtractorLink(
|
source,
|
||||||
source,
|
source,
|
||||||
source,
|
link,
|
||||||
link,
|
referer = "$mainUrl/",
|
||||||
referer = "$mainUrl/",
|
quality = Qualities.P1080.value,
|
||||||
quality = Qualities.P1080.value,
|
isM3u8 = true,
|
||||||
isM3u8 = true
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
} else {
|
)
|
||||||
val playList = app.get(link, referer = "$mainUrl/")
|
|
||||||
.parsedSafe<ResponseM3u>()?.main?.segments?.map { segment ->
|
|
||||||
PlayListItem(
|
|
||||||
segment.link,
|
|
||||||
(segment.du.toFloat() * 1_000_000).toLong()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
callback.invoke(
|
|
||||||
ExtractorLinkPlayList(
|
|
||||||
source,
|
|
||||||
source,
|
|
||||||
playList ?: return@safeApiCall,
|
|
||||||
referer = "$mainUrl/",
|
|
||||||
quality = Qualities.P1080.value,
|
|
||||||
headers = mapOf(
|
|
||||||
// "If-None-Match" to "*",
|
|
||||||
"Origin" to mainUrl,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Segment(
|
|
||||||
@JsonProperty("du") val du: String,
|
|
||||||
@JsonProperty("link") val link: String,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class DataM3u(
|
|
||||||
@JsonProperty("segments") val segments: List<Segment>?,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class ResponseM3u(
|
|
||||||
@JsonProperty("2048p") val main: DataM3u?,
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -32,7 +32,7 @@ class UseeTv : MainAPI() {
|
||||||
}.mapNotNull {
|
}.mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
HomePageList(name, home)
|
HomePageList(name, home, true)
|
||||||
}.filter { it.list.isNotEmpty() }
|
}.filter { it.list.isNotEmpty() }
|
||||||
return HomePageResponse(home)
|
return HomePageResponse(home)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue