From 6246d984a10d37d295a770614458a65abe6326cd Mon Sep 17 00:00:00 2001
From: contusionglory <102427829+contusionglory@users.noreply.github.com>
Date: Fri, 16 Dec 2022 23:45:23 +0000
Subject: [PATCH] Fix uprot.net (#251)
Fix regex for upront.net it was giving the wrong url.
---
.../java/com/lagradost/cloudstream3/utils/UnshortenUrl.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/UnshortenUrl.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/UnshortenUrl.kt
index a2e50762..46b232f6 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/utils/UnshortenUrl.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/utils/UnshortenUrl.kt
@@ -176,7 +176,7 @@ object ShortLink {
suspend fun unshortenUprot(uri: String): String {
val page = app.get(uri).text
- Regex("""]+href="([^"]+)""").findAll(page)
+ Regex("""]+href="([^"]+)".*Continue""").findAll(page)
.map { it.value.replace("""
if (link.contains("https://maxstream.video") || link.contains("https://uprot.net") && link != uri) {
@@ -193,4 +193,4 @@ object ShortLink {
val doc = app.get(uri).document
return doc.selectFirst("iframe")?.attr("src")?.trim()?: uri
}
-}
\ No newline at end of file
+}