Skip to content

Commit

Permalink
fixed nf mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
SaurabhKaperwan committed Nov 6, 2024
1 parent 76f6b94 commit 17d2931
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CineStream/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.jetbrains.kotlin.konan.properties.Properties

version = 26
version = 27

android {
defaultConfig {
Expand Down
8 changes: 0 additions & 8 deletions CineStream/src/main/kotlin/com/megix/CineStreamExtractors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -769,14 +769,6 @@ object CineStreamExtractors : CineStreamProvider() {
}
}

suspend fun NFBypass(mainUrl : String): String {
val document = app.get("$mainUrl/home").document
val addhash = document.selectFirst("body").attr("data-addhash").toString()
val verify = app.get("https://userverify.netmirror.app/verify?hash=${addhash}&t=${APIHolder.unixTime}") //just make request to verify
val requestBody = FormBody.Builder().add("verify", addhash).build()
return app.post("$mainUrl/verify2.php", requestBody = requestBody).cookies["t_hash_t"].toString()
}

suspend fun invokeVadaPav(
title: String,
year: Int? = null,
Expand Down
6 changes: 3 additions & 3 deletions CineStream/src/main/kotlin/com/megix/CineStreamProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ open class CineStreamProvider : MainAPI() {
val cyberflix_url = "https://cyberflix.elfhosted.com/c/catalogs"
val kitsu_url = "https://anime-kitsu.strem.fun"
//val anime_catalogs_url = "https://1fe84bc728af-stremio-anime-catalogs.baby-beamup.club"
val rotten_url = "https://7a82163c306e-rottentomatoes.baby-beamup.club/catalog"
val haglund_url = "https://arm.haglund.dev/api/v2"
val jikanAPI = "https://api.jikan.moe/v4"
val stremio_tmdb = "https://94c8cb9f702d-tmdb-addon.baby-beamup.club"
companion object {
const val malsyncAPI = "https://api.malsync.moe"
const val vegaMoviesAPI = "https://vegamovies.si"
Expand Down Expand Up @@ -96,8 +96,8 @@ open class CineStreamProvider : MainAPI() {
"$mainUrl/top/catalog/series/top" to "Top Series",
"$mainUrl/imdbRating/catalog/movie/imdbRating" to "Top IMDb Movies",
"$mainUrl/imdbRating/catalog/series/imdbRating" to "Top IMDb Series",
"$rotten_url/series/rtfresh_series" to "Rotten Tomatoes Best Series",
"$rotten_url/movie/rtfresh_movie" to "Rotten Tomatoes Best Movies",
"""$stremio_tmdb/{ "provide_imdbId": "true", "use_tmdb_prefix": "true", "include_adult": "true", "language": "en-US" }/catalog/movie/tmdb.trending/genre=Day""" to "TMDB Trending Movies",
"""$stremio_tmdb/{ "provide_imdbId": "true", "use_tmdb_prefix": "true", "include_adult": "true", "language": "en-US" }/catalog/series/tmdb.trending/genre=Day""" to "TMDB Trending Series",
"$cyberflix_url/catalog/Indian/indian.new.movie" to "New Indian Movie",
"$cyberflix_url/catalog/Indian/indian.new.series" to "New Indian Series",
"$cyberflix_url/catalog/Netflix/netflix.new.series" to "Netflix Series",
Expand Down
8 changes: 8 additions & 0 deletions CineStream/src/main/kotlin/com/megix/CineStreamUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import okhttp3.FormBody
import org.jsoup.nodes.Document
import java.net.*

suspend fun NFBypass(mainUrl : String): String {
val document = app.get("$mainUrl/home").document
val addhash = document.selectFirst("body").attr("data-addhash").toString()
val res = app.get("${mainUrl}/v.php?hash=${addhash}&t=${APIHolder.unixTime}") //make request for validation
val requestBody = FormBody.Builder().add("verify", addhash).build()
return app.post("$mainUrl/verify2.php", requestBody = requestBody).cookies["t_hash_t"].toString()
}

fun getBaseUrl(url: String): String {
return URI(url).let {
"${it.scheme}://${it.host}"
Expand Down
2 changes: 1 addition & 1 deletion NetflixMirrorProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 9
version = 10

cloudstream {
//language = "en"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class NetflixMirrorProvider : MainAPI() {
cookie_value = if(cookie_value.isEmpty()) bypass(mainUrl) else cookie_value
val cookies = mapOf(
"t_hash_t" to cookie_value,
"ott" to "nf",
"hd" to "on"
)
val document = app.get("$mainUrl/home", cookies = cookies).document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fun convertRuntimeToMinutes(runtime: String): Int {
suspend fun bypass(mainUrl : String): String {
val document = app.get("$mainUrl/home").document
val addhash = document.selectFirst("body").attr("data-addhash").toString()
val verify = app.get("https://userverify.netmirror.app/verify?hash=${addhash}&t=${APIHolder.unixTime}") //just make request to verify
val res = app.get("${mainUrl}/v.php?hash=${addhash}&t=${APIHolder.unixTime}") //make request for validation
val requestBody = FormBody.Builder().add("verify", addhash).build()
return app.post("$mainUrl/verify2.php", requestBody = requestBody).cookies["t_hash_t"].toString()
}

0 comments on commit 17d2931

Please sign in to comment.