Fixes to Streamingcommunity and Filman.cc

This commit is contained in:
Blatzar 2022-07-09 15:24:12 +02:00
parent 3457c04b79
commit 6c477f9e1a
4 changed files with 14 additions and 6 deletions

View file

@ -114,7 +114,7 @@
<data android:scheme="https" android:host="secretlink.xyz" android:pathPrefix="/"/> <data android:scheme="https" android:host="secretlink.xyz" android:pathPrefix="/"/>
<data android:scheme="https" android:host="hdm.to" android:pathPrefix="/"/> <data android:scheme="https" android:host="hdm.to" android:pathPrefix="/"/>
<data android:scheme="https" android:host="theflix.to" android:pathPrefix="/"/> <data android:scheme="https" android:host="theflix.to" android:pathPrefix="/"/>
<data android:scheme="https" android:host="streamingcommunity.top" android:pathPrefix="/"/> <data android:scheme="https" android:host="streamingcommunity.org" android:pathPrefix="/"/>
<data android:scheme="https" android:host="www.tantifilm.rodeo" android:pathPrefix="/"/> <data android:scheme="https" android:host="www.tantifilm.rodeo" android:pathPrefix="/"/>
<data android:scheme="https" android:host="v2.apimdb.net" android:pathPrefix="/"/> <data android:scheme="https" android:host="v2.apimdb.net" android:pathPrefix="/"/>
<data android:scheme="https" android:host="www.wcostream.com" android:pathPrefix="/"/> <data android:scheme="https" android:host="www.wcostream.com" android:pathPrefix="/"/>

View file

@ -3,6 +3,8 @@ package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.Jsoup import org.jsoup.Jsoup
@ -86,10 +88,16 @@ class FilmanProvider : MainAPI() {
override suspend fun load(url: String): LoadResponse { override suspend fun load(url: String): LoadResponse {
val response = app.get(url).text val response = app.get(url).text
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
val documentTitle = document.select("title").text().trim()
if (documentTitle.startsWith("Logowanie")){
throw RuntimeException("This page seems to be locked behind a login-wall on the website, unable to scrape it. If it is not please report it.")
}
var title = document.select("span[itemprop=title]").text() var title = document.select("span[itemprop=title]").text()
val data = document.select("#links").outerHtml() val data = document.select("#links").outerHtml()
val posterUrl = document.select("#single-poster > img").attr("src") val posterUrl = document.select("#single-poster > img").attr("src")
val year = document.select(".info > ul li")[1].text().toIntOrNull() val year = document.select(".info > ul li").getOrNull(0)?.text()?.toIntOrNull()
val plot = document.select(".description").text() val plot = document.select(".description").text()
val episodesElements = document.select("#episode-list a[href]") val episodesElements = document.select("#episode-list a[href]")
if (episodesElements.isEmpty()) { if (episodesElements.isEmpty()) {
@ -132,7 +140,7 @@ class FilmanProvider : MainAPI() {
document?.select(".link-to-video")?.apmap { item -> document?.select(".link-to-video")?.apmap { item ->
val decoded = base64Decode(item.select("a").attr("data-iframe")) val decoded = base64Decode(item.select("a").attr("data-iframe"))
val link = mapper.readValue<LinkElement>(decoded).src val link = tryParseJson<LinkElement>(decoded)?.src ?: return@apmap
loadExtractor(link, null, callback) loadExtractor(link, null, callback)
} }
return true return true

View file

@ -128,7 +128,7 @@ data class TrailerElement(
class StreamingcommunityProvider : MainAPI() { class StreamingcommunityProvider : MainAPI() {
override var lang = "it" override var lang = "it"
override var mainUrl = "https://streamingcommunity.business" override var mainUrl = "https://streamingcommunity.org"
override var name = "Streamingcommunity" override var name = "Streamingcommunity"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
@ -177,7 +177,7 @@ class StreamingcommunityProvider : MainAPI() {
override suspend fun getMainPage(): HomePageResponse { override suspend fun getMainPage(): HomePageResponse {
val items = ArrayList<HomePageList>() val items = ArrayList<HomePageList>()
val document = app.get(mainUrl).document val document = app.get(mainUrl).document
document.select("slider-title").subList(2, 6).map { it -> document.select("slider-title").subList(0, 6).map { it ->
if (it.attr("slider-name") != "In arrivo") { if (it.attr("slider-name") != "In arrivo") {
val films = it.attr("titles-json") val films = it.attr("titles-json")
val lista = mutableListOf<MovieSearchResponse>() val lista = mutableListOf<MovieSearchResponse>()

View file

@ -455,7 +455,7 @@
"language": "it", "language": "it",
"name": "Streamingcommunity", "name": "Streamingcommunity",
"status": 1, "status": 1,
"url": "https://streamingcommunity.business" "url": "https://streamingcommunity.org"
}, },
"TantifilmProvider": { "TantifilmProvider": {
"language": "it", "language": "it",