ask4movie fix
This commit is contained in:
parent
5daf0cd5f0
commit
f1d16c4c95
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.lagradost
|
package com.lagradost
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.utils.Coroutines.main
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
@ -78,14 +77,7 @@ class Ask4MovieProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getIframe(html: String): String? {
|
private fun getIframe(html: String): String? {
|
||||||
val data = Regex("""<script src="data:text\/javascript;base64,([^"']*)""").findAll(html)
|
return Jsoup.parse(html).select("iframe").attr("data-src")
|
||||||
.lastOrNull()?.groupValues?.getOrNull(1) ?: return null
|
|
||||||
val decoded = base64Decode(data)
|
|
||||||
val iframeUrlRegex = Regex("""dir['"],['"]([^"']*)""")
|
|
||||||
|
|
||||||
val iframeEncoded = iframeUrlRegex.find(decoded)?.groupValues?.getOrNull(1) ?: return null
|
|
||||||
val iframe = base64Decode(iframeEncoded)
|
|
||||||
return Jsoup.parse(iframe).select("iframe").attr("src")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getEpisodes(iframe: String): List<Episode> {
|
private suspend fun getEpisodes(iframe: String): List<Episode> {
|
||||||
|
|
Loading…
Reference in New Issue