This commit is contained in:
Shif 2023-05-03 17:47:05 +07:00
parent 366236c7e4
commit dfe2ef0a2b
2 changed files with 4 additions and 7 deletions

View file

@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
class Gofile : ExtractorApi() {
open class Gofile : ExtractorApi() {
override val name = "Gofile"
override val mainUrl = "https://gofile.io"
override val requiresReferer = false
@ -19,10 +19,7 @@ class Gofile : ExtractorApi() {
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val id =
Regex("(?://|\\.)(gofile\\.io)/(?:\\?c=|d/)([\\da-zA-Z]+)").find(url)?.groupValues?.get(
2
)
val id = Regex("/(?:\\?c=|d/)([\\da-zA-Z]+)").find(url)?.groupValues?.get(1)
val token = app.get("$mainApi/createAccount").parsedSafe<Account>()?.data?.get("token")
app.get("$mainApi/getContent?contentId=$id&token=$token&websiteToken=12345")
.parsedSafe<Source>()?.data?.contents?.forEach {

View file

@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.httpsify
class Krakenfiles : ExtractorApi() {
open class Krakenfiles : ExtractorApi() {
override val name = "Krakenfiles"
override val mainUrl = "https://krakenfiles.com"
override val requiresReferer = false
@ -18,7 +18,7 @@ class Krakenfiles : ExtractorApi() {
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val id = Regex("(?://|\\.)(krakenfiles\\.com)/(?:view|embed-video)?/([\\da-zA-Z]+)").find(url)?.groupValues?.get(2)
val id = Regex("/(?:view|embed-video)/([\\da-zA-Z]+)").find(url)?.groupValues?.get(1)
val doc = app.get("$mainUrl/embed-video/$id").document
val link = doc.selectFirst("source")?.attr("src")