mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed nimegami
This commit is contained in:
parent
f2fbf9c2f7
commit
8396000a30
4 changed files with 8 additions and 15 deletions
|
@ -108,12 +108,7 @@ object NineTv {
|
|||
val res = app.get(url, headers = mapOf(
|
||||
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language" to "en-US,en;q=0.5",
|
||||
"Connection" to "keep-alive",
|
||||
"Referer" to (referer ?: ""),
|
||||
"Sec-Fetch-Dest" to "iframe",
|
||||
"Sec-Fetch-Mode" to "navigate",
|
||||
"Sec-Fetch-Site" to "same-origin",
|
||||
"Upgrade-Insecure-Requests" to "1"
|
||||
))
|
||||
val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1)
|
||||
val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 6
|
||||
version = 7
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.SubtitleFile
|
|||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||
import com.lagradost.cloudstream3.utils.Qualities
|
||||
|
||||
open class Mitedrive : ExtractorApi() {
|
||||
|
@ -20,10 +21,11 @@ open class Mitedrive : ExtractorApi() {
|
|||
) {
|
||||
val id = url.substringAfterLast("/")
|
||||
val video = app.post(
|
||||
"$mainUrl/api/generate",
|
||||
"https://api.mitedrive.com/api/view/$id",
|
||||
referer = "$mainUrl/",
|
||||
data = mapOf(
|
||||
"short_url" to id
|
||||
"csrf_token" to "ZXlKcGNDSTZJak0yTGpneExqWTFMakUyTWlJc0ltUmxkbWxqWlNJNklrMXZlbWxzYkdFdk5TNHdJQ2hYYVc1a2IzZHpJRTVVSURFd0xqQTdJRmRwYmpZME95QjROalE3SUhKMk9qRXdNUzR3S1NCSFpXTnJieTh5TURFd01ERXdNU0JHYVhKbFptOTRMekV3TVM0d0lpd2lZbkp2ZDNObGNpSTZJazF2ZW1sc2JHRWlMQ0pqYjI5cmFXVWlPaUlpTENKeVpXWmxjbkpsY2lJNklpSjk=",
|
||||
"slug" to id
|
||||
)
|
||||
).parsedSafe<Responses>()?.data?.url
|
||||
|
||||
|
@ -32,15 +34,16 @@ open class Mitedrive : ExtractorApi() {
|
|||
this.name,
|
||||
this.name,
|
||||
video ?: return,
|
||||
"",
|
||||
"$mainUrl/",
|
||||
Qualities.Unknown.value,
|
||||
INFER_TYPE,
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
data class Data(
|
||||
@JsonProperty("url") val url: String? = null,
|
||||
@JsonProperty("original_url") val url: String? = null,
|
||||
)
|
||||
|
||||
data class Responses(
|
||||
|
|
|
@ -250,12 +250,7 @@ object NineTv {
|
|||
val res = app.get(url, headers = mapOf(
|
||||
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language" to "en-US,en;q=0.5",
|
||||
"Connection" to "keep-alive",
|
||||
"Referer" to (referer ?: ""),
|
||||
"Sec-Fetch-Dest" to "iframe",
|
||||
"Sec-Fetch-Mode" to "navigate",
|
||||
"Sec-Fetch-Site" to "same-origin",
|
||||
"Upgrade-Insecure-Requests" to "1"
|
||||
))
|
||||
val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1)
|
||||
val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key")
|
||||
|
|
Loading…
Reference in a new issue