Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ dependencies {

// Extensions & Other Libs
implementation(libs.jsoup) // HTML Parser
implementation(libs.ksoup) // HTML Parser
implementation(libs.rhino) // Run JavaScript
implementation(libs.safefile) // To Prevent the URI File Fu*kery
coreLibraryDesugaring(libs.desugar.jdk.libs.nio) // NIO Flavor Needed for NewPipeExtractor
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kotlinxCollectionsImmutable = "0.4.0"
kotlinxCoroutinesCore = "1.11.0"
kotlinxDatetime = "0.8.0"
kotlinxSerializationJson = "1.11.0"
ksoup = "0.2.6"
ktor = "3.5.0"
lifecycleKtx = "2.10.0"
material = "1.14.0"
Expand Down Expand Up @@ -96,6 +97,7 @@ kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collec
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
ksoup = { module = "com.fleeksoft.ksoup:ksoup", version.ref = "ksoup" }
ktor-http = { module = "io.ktor:ktor-http", version.ref = "ktor" }
lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleKtx" }
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleKtx" }
Expand Down
5 changes: 3 additions & 2 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ kotlin {

commonMain.dependencies {
implementation(libs.annotation) // Annotations
implementation(libs.nicehttp) // HTTP Lib
implementation(libs.jackson.module.kotlin) // JSON Parser
implementation(libs.jsoup) // HTML Parser
implementation(libs.kotlinx.atomicfu)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.datetime)
implementation(libs.kotlinx.serialization.json) // JSON Parser
implementation(libs.ksoup) // HTML Parser
implementation(libs.ktor.http)
implementation(libs.jsoup) // HTML Parser
implementation(libs.nicehttp) // HTTP Library
implementation(libs.rhino) // Run JavaScript
implementation(libs.tmdb.java) // TMDB API v3 Wrapper Made with RetroFit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lagradost.cloudstream3.extractors

import com.fleeksoft.ksoup.Ksoup
import com.lagradost.cloudstream3.APIHolder.unixTimeMS
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.mvvm.logError
Expand All @@ -8,7 +9,6 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getPostForm
import com.lagradost.cloudstream3.utils.newExtractorLink
import org.jsoup.Jsoup

//class SBPlay1 : SBPlay() {
// override var mainUrl = "https://sbplay1.com"
Expand All @@ -25,7 +25,7 @@ open class SBPlay : ExtractorApi() {

override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
val response = app.get(url, referer = referer).text
val document = Jsoup.parse(response)
val document = Ksoup.parse(response)

val links = ArrayList<ExtractorLink>()

Expand All @@ -44,11 +44,11 @@ open class SBPlay : ExtractorApi() {
"https://sbplay.one/?op=notifications&open=&_=$unixTimeMS",
referer = href
)
val hrefDocument = Jsoup.parse(hrefResponse)
val hrefDocument = Ksoup.parse(hrefResponse)
val hrefSpan = hrefDocument.selectFirst("span > a")
if (hrefSpan == null) {
getPostForm(href, hrefResponse)?.let { form ->
val postDocument = Jsoup.parse(form)
val postDocument = Ksoup.parse(form)
val downloadBtn =
postDocument.selectFirst("a.downloadbtn")?.attr("href")
if (downloadBtn.isNullOrEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package com.lagradost.cloudstream3.utils

import com.fasterxml.jackson.annotation.JsonIgnore
import com.fleeksoft.ksoup.Ksoup
import com.lagradost.cloudstream3.AudioFile
import com.lagradost.cloudstream3.IDownloadableMinimum
import com.lagradost.cloudstream3.Prerelease
Expand Down Expand Up @@ -317,7 +318,6 @@ import io.ktor.http.decodeURLPart
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.ensureActive
import org.jsoup.Jsoup
import kotlin.coroutines.cancellation.CancellationException
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid
Expand Down Expand Up @@ -1317,7 +1317,7 @@ fun httpsify(url: String): String {
}

suspend fun getPostForm(requestUrl: String, html: String): String? {
val document = Jsoup.parse(html)
val document = Ksoup.parse(html)
val inputs = document.select("Form > input")
if (inputs.size < 4) return null
var op: String? = null
Expand Down