cloudstream-extensions-mult.../FrenchStreamProvider/src/main/kotlin/com/lagradost/VidoExtractor.kt

47 lines
1.6 KiB
Kotlin
Raw Normal View History

add VostfreeProvider (#16) * add VostfreeProvider * autoformat the code and add the changes requested * remove com.lagradost.cloudstream3.animeproviders line * optimized the getMainPage * Add Sarlay's provider * fix the research function and reshape the load * Add NekosamaProvider * add fuzzy for computing string distance * correct the name of class * fix and improve the search function * rename nekosama class * Remove no french provider * NekosamaProvider working version * Revert "Remove no french provider" This reverts commit b177de518dd429010b8b8ddc569940d9d11cc6d7. * use of apmap when necessary * Nekosama add more results items from search * Load function of vostfree optimized * "" * resolve conflict * Add WiflixProvider * Change title and use apmap * No vostfree reference * Add tags and complete season * precise dub ou sub * Update FrenchStream * not anime movie * Fix load movie for vostfree * Add vido extractor for frenchStream * fix reference vido * doodstream work for Wiflix * Udate vidoExtractor to take in account Wiflix ! Optimized FrenchStream to take directly the redirected link * In Frenchstream dood is in reality streamlare * Get MesFilmsProvider directly at Sarlay repository * Requested changes are done * Add showStatus to NekoSamaProvider * show news episodes for neko-sama * Requested changes done * Add year for episodes * French Stream change his mainUrl * Improve research for wiflix * add year of episodes and show the latest episode for vostfree * Add more provider for Wiflix * open the good extractor * Fix Extractor * change authors Co-authored-by: Eddy <kingkama976@gmail.com>
2022-09-26 15:20:08 +00:00
package com.lagradost
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getAndUnpack
class VidoExtractor : ExtractorApi() {
override var name = "Vido"
override var mainUrl = "https://vido.lol"
private val srcRegex = Regex("""layer\(\{sources\:\["(.*)"\]""")
override val requiresReferer = true
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val methode = if (url.contains("embed")) {
app.get(url) // french stream
} else {
val code = url.substringAfterLast("/")
val data = mapOf(
"op" to "embed",
"file_code" to code,
"&auto" to "1"
)
app.post("https://vido.lol/dl", referer = url, data = data) // wiflix
}
with(methode) {
getAndUnpack(this.text).let { unpackedText ->
//val quality = unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
return listOf(
ExtractorLink(
name,
name,
link,
url,
Qualities.Unknown.value,
true,
)
)
}
}
}
return null
}
}