Skip to content

Commit

Permalink
fuck int
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark25 committed Jul 25, 2024
1 parent a4085aa commit c6094ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Animenix : DooPlay(
return players.flatMap { player ->
runCatching {
val link = getPlayerUrl(player)
getPlayerVideos(link, player, setOf("filemoon", "streamwish", "swdyu"))
getPlayerVideos(link)
}.getOrElse { emptyList() }
}
}
Expand All @@ -65,7 +65,7 @@ class Animenix : DooPlay(
private val filemoonExtractor by lazy { FilemoonExtractor(client) }
private val streamWishExtractor by lazy { StreamWishExtractor(headers = headers, client = client) }

private fun getPlayerVideos(link: String, element: Element, hosterSelection: Set<String>): List<Video> {
private fun getPlayerVideos(link: String): List<Video> {
return when {
link.contains("filemoon") -> filemoonExtractor.videosFromUrl(link)
link.contains("swdyu") -> streamWishExtractor.videosFromUrl(link)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ class CuevanaEu(override val name: String, override val baseUrl: String) : Confi
val response = client.newCall(GET(urlRequest, headers = headers)).execute().asJsoup()
val bodyText = response.select("body").text()
val json = json.decodeFromString<JsonObject>(bodyText)
val status = json["status"]!!.jsonPrimitive!!.content
val file = json["file"]!!.jsonPrimitive!!.content
val status = json["status"]!!.jsonPrimitive.content
val file = json["file"]!!.jsonPrimitive.content
if (status == "200") { videoList.add(Video(file, "$prefix Tomatomatela", file, headers = null)) }
} catch (_: Exception) { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class ProteaExtractor() {
val videoList = mutableListOf<Video>()
runCatching {
val document = Jsoup.connect(url).headers(headers.toMap()).ignoreContentType(true).method(Connection.Method.POST).execute()
if (document!!.body()!!.isNotEmpty()) {
if (document.body().isNotEmpty()) {
val responseString = document.body().removePrefix("[").removeSuffix("]")
val jObject = json.decodeFromString<JsonObject>(responseString)
val sources = jObject["source"]!!.jsonArray
sources!!.forEach { source ->
var item = source!!.jsonObject
sources.forEach { source ->
var item = source.jsonObject
var quality = "$qualityPrefix:${ item["label"]!!.jsonPrimitive.content }"
var urlVideo = item["file"]!!.jsonPrimitive!!.content.removePrefix("//")
var urlVideo = item["file"]!!.jsonPrimitive.content.removePrefix("//")
var newHeaders = Headers.Builder()
.set("authority", "www.nemonicplayer.xyz")
.set("accept", "*/*")
Expand Down

0 comments on commit c6094ec

Please sign in to comment.