Added drive whenever its available in app

This commit is contained in:
Zaw 2022-09-11 23:11:22 +03:00
parent 36cf192cf5
commit 9aadb89b5c
2 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,4 @@
version = 1
version = 2
cloudstream {
description = ""

View file

@ -125,12 +125,13 @@ class GateAnime : MainAPI() {
println("URL: $data")
val doc = app.get(data).document
doc.select(
"li:contains(Fembed), li:contains(خيارات 1), li:contains(Uptostream), li:contains(Dood), li:contains(Uqload)"
"li:contains(Fembed), li:contains(خيارات 1), li:contains(Uptostream), li:contains(Dood), li:contains(Uqload), li:contains(Drive)"
).apmap {
val id = it.attr("data-tplayernv")
val iframeLink = doc.select("div#$id").html().replace(".*src=\"|\".*|#038;|amp;".toRegex(), "").replace("<noscript>.*".toRegex(),"")
var sourceUrl = app.get(iframeLink).document.select("iframe").attr("src")
if(sourceUrl.contains("ok.ru")) sourceUrl = "https:" + sourceUrl
if(sourceUrl.contains("ok.ru")) sourceUrl = "https:$sourceUrl"
if(sourceUrl.contains("drive.google.com")) sourceUrl = "https://gdriveplayer.to/embed2.php?link=$sourceUrl"
loadExtractor(sourceUrl, data, subtitleCallback, callback)
}
return true