mirror of
https://github.com/recloudstream/cloudstream-extensions.git
synced 2024-08-15 03:03:54 +00:00
ask4movie fix
This commit is contained in:
parent
5daf0cd5f0
commit
f1d16c4c95
2 changed files with 2 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.lagradost
|
||||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.Coroutines.main
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
import org.jsoup.Jsoup
|
||||
|
@ -78,14 +77,7 @@ class Ask4MovieProvider : MainAPI() {
|
|||
}
|
||||
|
||||
private fun getIframe(html: String): String? {
|
||||
val data = Regex("""<script src="data:text\/javascript;base64,([^"']*)""").findAll(html)
|
||||
.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")
|
||||
return Jsoup.parse(html).select("iframe").attr("data-src")
|
||||
}
|
||||
|
||||
private suspend fun getEpisodes(iframe: String): List<Episode> {
|
||||
|
|
Loading…
Reference in a new issue