From 400c80afcd4c5646ce5c61a69a37f8c2d9009c68 Mon Sep 17 00:00:00 2001 From: Zaw <42999156+ImZaw@users.noreply.github.com> Date: Fri, 28 Oct 2022 00:50:50 +0300 Subject: [PATCH] oops prints --- .../src/main/kotlin/com/egybest/EgyBestProvider.kt | 8 +++++++- .../src/main/kotlin/com/shahid4u/Shahid4uProvider.kt | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/EgyBestProvider/src/main/kotlin/com/egybest/EgyBestProvider.kt b/EgyBestProvider/src/main/kotlin/com/egybest/EgyBestProvider.kt index 0093cab..03325ae 100644 --- a/EgyBestProvider/src/main/kotlin/com/egybest/EgyBestProvider.kt +++ b/EgyBestProvider/src/main/kotlin/com/egybest/EgyBestProvider.kt @@ -215,6 +215,8 @@ class EgyBest : MainAPI() { val baseURL = data.split("/")[0] + "//" + data.split("/")[2] val client = Requests().baseClient val session = Session(client) + println(baseURL) + println(data) val doc = session.get(data).document val vidstreamURL = baseURL + doc.select("iframe.auto-size").attr("src") @@ -247,17 +249,21 @@ class EgyBest : MainAPI() { val javascriptResult = jsCode.runJS("result").split(",") val verificationPath = javascriptResult[0] val encodedAdPath = javascriptResult[1] + println(javascriptResult) val encodedString = encodedAdPath + "=".repeat(encodedAdPath.length % 4) val decodedPath = String(Base64.getDecoder().decode(encodedString)) + println("String( $encodedString ) -> Decoded( $decodedPath )") val adLink = "$baseURL/$decodedPath" + println(adLink) val verificationLink = "$baseURL/tvc.php?verify=$verificationPath" session.get(adLink) session.post(verificationLink, data=mapOf(verificationToken to "ok")) val vidstreamResponse = session.get(vidstreamURL).document val mediaLink = baseURL + vidstreamResponse.select("source").attr("src") - this@EgyBest.pssid = session.baseClient.cookieJar.loadForRequest(data.toHttpUrl())[0].toString().split(";")[0].split("=")[1] + println("mediaLink: $mediaLink") + println("Cookies: ${session.baseClient.cookieJar.loadForRequest(data.toHttpUrl())}") M3u8Helper.generateM3u8( this.name, mediaLink, diff --git a/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uProvider.kt b/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uProvider.kt index ed48620..d5c1e33 100644 --- a/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uProvider.kt +++ b/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uProvider.kt @@ -46,7 +46,6 @@ class Shahid4u : MainAPI() { val doc = app.get(request.data + page).document val list = doc.select("div.content-box") .mapNotNull { element -> - println(element.select("a.fullClick").attr("title")) element.toSearchResponse() } return newHomePageResponse(request.name, list)