New guardare extractor (#1120)

* Added 3 new extractors and a new italian provider

* Added 3 new extractors and a new italian provider

* Added 3 new extractors and a new italian provider

* Added 4 new extractors and a new italian provider

* Added another italian provider Altadefinizione, and a new extractor Supervideo

* fix extractor Supervideo

* fix extractor Supervideo

* fix extractor Userload,
 fixed pr comments

* final fix to the extractor Userload

* fix to the Provider Cineblog,
Added Extractor Guardare

* fix to the Provider Cineblog,
Added Extractor Guardare
This commit is contained in:
antonydp 2022-06-02 22:16:35 +02:00 committed by GitHub
parent d879a8aaf3
commit 78262afdf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 4 deletions

View file

@ -87,7 +87,7 @@ object APIHolder {
TheFlixToProvider(), TheFlixToProvider(),
StreamingcommunityProvider(), StreamingcommunityProvider(),
TantifilmProvider(), TantifilmProvider(),
Cb01Provider(), CineblogProvider(),
AltadefinizioneProvider(), AltadefinizioneProvider(),
HDMovie5(), HDMovie5(),
RebahinProvider(), RebahinProvider(),

View file

@ -0,0 +1,36 @@
package com.lagradost.cloudstream3.extractors
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
open class GuardareStream : ExtractorApi() {
override var name = "Guardare"
override var mainUrl = "https://guardare.stream"
override val requiresReferer = false
data class GuardareJsonData (
@JsonProperty("data") val data : List<GuardareData>,
)
data class GuardareData (
@JsonProperty("file") val file : String,
@JsonProperty("label") val label : String,
@JsonProperty("type") val type : String
)
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.post(url.replace("/v/","/api/source/"), data = mapOf("d" to mainUrl)).text
val jsonvideodata = AppUtils.parseJson<GuardareJsonData>(response)
return jsonvideodata.data.map {
ExtractorLink(
it.file+".${it.type}",
this.name,
it.file+".${it.type}",
mainUrl,
it.label.filter{ it.isDigit() }.toInt(),
false
)
}
}
}

View file

@ -5,10 +5,10 @@ import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
class Cb01Provider : MainAPI() { class CineblogProvider : MainAPI() {
override val lang = "it" override val lang = "it"
override var mainUrl = "https://cb01.rip" override var mainUrl = "https://cb01.rip"
override var name = "Cineblog01" override var name = "CineBlog01"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
override val supportedTypes = setOf( override val supportedTypes = setOf(
@ -127,7 +127,7 @@ class Cb01Provider : MainAPI() {
val episodeList = ArrayList<Episode>() val episodeList = ArrayList<Episode>()
document.select("#seasons > div").reversed().map { element -> document.select("#seasons > div").reversed().map { element ->
val season = element.selectFirst("div.se-q > span.se-t")!!.text().toInt() val season = element.selectFirst("div.se-q > span.se-t")!!.text().toInt()
element.select("div.se-a > ul > li").map{ episode -> element.select("div.se-a > ul > li").filter { it.text()!="There are still no episodes this season" }.map{ episode ->
val href = episode.selectFirst("div.episodiotitle > a")!!.attr("href") val href = episode.selectFirst("div.episodiotitle > a")!!.attr("href")
val epNum =episode.selectFirst("div.numerando")!!.text().substringAfter("-").filter { it.isDigit() }.toIntOrNull() val epNum =episode.selectFirst("div.numerando")!!.text().substringAfter("-").filter { it.isDigit() }.toIntOrNull()
val epTitle = episode.selectFirst("div.episodiotitle > a")!!.text() val epTitle = episode.selectFirst("div.episodiotitle > a")!!.text()

View file

@ -186,6 +186,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
Tantifilm(), Tantifilm(),
Userload(), Userload(),
Supervideo(), Supervideo(),
GuardareStream(),
// StreamSB.kt works // StreamSB.kt works
// SBPlay(), // SBPlay(),