uaflix: Added refer for player
This commit is contained in:
parent
f34f268690
commit
6846aa08b6
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.google.code.gson:gson:2.9.0")
|
implementation("com.google.code.gson:gson:2.9.0")
|
||||||
|
|
|
@ -167,7 +167,7 @@ class UAFlixProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { // Player in site
|
} 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:\'")
|
.substringAfterLast("file:\'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ class UAFlixProvider : MainAPI() {
|
||||||
).last().let(callback)
|
).last().let(callback)
|
||||||
return true
|
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:\'")
|
.substringAfterLast("file:\'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
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:\'")
|
.substringAfterLast("file:\'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
tryParseJson<List<PlayerJson>>(playerRawJson)?.map { dubs -> // Dubs
|
||||||
|
|
Loading…
Reference in a new issue