uaflix: Added refer for player

This commit is contained in:
CakesTwix 2024-12-19 19:34:11 +02:00
parent f34f268690
commit 6846aa08b6
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 3
version = 4
dependencies {
implementation("com.google.code.gson:gson:2.9.0")

View file

@ -167,7 +167,7 @@ class UAFlixProvider : MainAPI() {
}
} else { // Player in site
val playerRawJson = app.get(playerUrl).document.select("script").html()
val playerRawJson = app.get(playerUrl, referer = "https://uafix.net").document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
@ -245,7 +245,7 @@ class UAFlixProvider : MainAPI() {
).last().let(callback)
return true
}
val playerRawJson = app.get(playerUrl).document.select("script").html()
val playerRawJson = app.get(playerUrl, referer = "https://uafix.net").document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
@ -263,7 +263,7 @@ class UAFlixProvider : MainAPI() {
}
val playerRawJson = app.get(dataList[2]).document.select("script").html()
val playerRawJson = app.get(dataList[2], referer = "https://uafix.net").document.select("script").html()
.substringAfterLast("file:\'")
.substringBefore("\',")
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs