forked from recloudstream/cloudstream
Fix uprot.net (#251)
Fix regex for upront.net it was giving the wrong url.
This commit is contained in:
parent
495d02d583
commit
6246d984a1
1 changed files with 2 additions and 2 deletions
|
@ -176,7 +176,7 @@ object ShortLink {
|
||||||
|
|
||||||
suspend fun unshortenUprot(uri: String): String {
|
suspend fun unshortenUprot(uri: String): String {
|
||||||
val page = app.get(uri).text
|
val page = app.get(uri).text
|
||||||
Regex("""<a[^>]+href="([^"]+)""").findAll(page)
|
Regex("""<a[^>]+href="([^"]+)".*Continue""").findAll(page)
|
||||||
.map { it.value.replace("""<a href="""", "") }
|
.map { it.value.replace("""<a href="""", "") }
|
||||||
.toList().forEach { link ->
|
.toList().forEach { link ->
|
||||||
if (link.contains("https://maxstream.video") || link.contains("https://uprot.net") && link != uri) {
|
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
|
val doc = app.get(uri).document
|
||||||
return doc.selectFirst("iframe")?.attr("src")?.trim()?: uri
|
return doc.selectFirst("iframe")?.attr("src")?.trim()?: uri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue