Fix uprot.net (#251)

Fix regex for upront.net it was giving the wrong url.
This commit is contained in:
contusionglory 2022-12-16 23:45:23 +00:00 committed by Deepak Patil
parent 133923b905
commit 833bbf5dab
No known key found for this signature in database
GPG key ID: 72C2703D0D120C3D

View file

@ -176,7 +176,7 @@ object ShortLink {
suspend fun unshortenUprot(uri: String): String {
val page = app.get(uri).text
Regex("""<a[^>]+href="([^"]+)""").findAll(page)
Regex("""<a[^>]+href="([^"]+)".*Continue""").findAll(page)
.map { it.value.replace("""<a href="""", "") }
.toList().forEach { link ->
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
}
}
}