fixed long loading times in vf-series.org (#240)

This commit is contained in:
Sarlay 2021-11-13 16:49:31 +01:00 committed by GitHub
parent 471e25c65e
commit 3c9e8c44a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,7 +84,8 @@ class VfSerieProvider : MainAPI() {
val response = get(data).text val response = get(data).text
val document = Jsoup.parse(response) val document = Jsoup.parse(response)
val players = document.select("ul.TPlayerNv > li") val players = document.select("ul.TPlayerNv > li")
var number_player = Regex(".*trembed=(.*?)&").find(document.html())?.groupValues?.get(1)!!.toInt() // the starting trembed number of the first player website, some start at 0 other at 1 val trembed_url = document.selectFirst("div.TPlayerTb > iframe").attr("src")
var number_player = Regex(".*trembed=(.*?)&").find(trembed_url)?.groupValues?.get(1)!!.toInt() // the starting trembed number of the first player website, some start at 0 other at 1
var found = false var found = false
for (player in players) { for (player in players) {
if (player.selectFirst("> span").text() == "Vudeo") { if (player.selectFirst("> span").text() == "Vudeo") {