mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix sora sources, fix #583 and more
This commit is contained in:
parent
d17d1e870a
commit
36d0a97580
9 changed files with 72 additions and 128 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 29
|
||||
version = 30
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.utils.*
|
|||
import org.jsoup.nodes.Element
|
||||
|
||||
class OploverzProvider : MainAPI() {
|
||||
override var mainUrl = "https://oploverz.guru"
|
||||
override var mainUrl = "https://oploverz.gold"
|
||||
override var name = "Oploverz"
|
||||
override val hasMainPage = true
|
||||
override var lang = "id"
|
||||
|
@ -20,7 +20,6 @@ class OploverzProvider : MainAPI() {
|
|||
)
|
||||
|
||||
companion object {
|
||||
const val acefile = "https://acefile.co"
|
||||
fun getType(t: String): TvType {
|
||||
return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA
|
||||
else if (t.contains("Movie", true)) TvType.AnimeMovie
|
||||
|
@ -170,14 +169,14 @@ class OploverzProvider : MainAPI() {
|
|||
headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||
).document.select("iframe").attr("src")
|
||||
|
||||
loadExtractor(fixedIframe(iframe), "$mainUrl/", subtitleCallback, callback)
|
||||
loadExtractor(fixUrl(iframe), "$mainUrl/", subtitleCallback, callback)
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
document.select("div#download tr").map { el ->
|
||||
document.select("div#download tr").apmap { el ->
|
||||
el.select("a").apmap {
|
||||
loadFixedExtractor(fixedIframe(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback)
|
||||
loadFixedExtractor(fixUrl(it.attr("href")), el.select("strong").text(), "$mainUrl/", subtitleCallback, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,12 +216,4 @@ class OploverzProvider : MainAPI() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun fixedIframe(url: String): String {
|
||||
val id = Regex("""(?:/f/|/file/)(\w+)""").find(url)?.groupValues?.getOrNull(1)
|
||||
return when {
|
||||
url.startsWith(acefile) -> "${acefile}/player/$id"
|
||||
else -> fixUrl(url)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue