Skip to content

Commit

Permalink
Fixed jiocinema bug of not getting the url because of not appropriate…
Browse files Browse the repository at this point in the history
… authtoken

 Changes to be committed:
	modified:   README.md
	renamed:    jiocinema.go -> src/jiocinema/jiocinema.go
	renamed:    jiosaavn.go -> src/jiosaavn/jiosaavn.go
  • Loading branch information
sorencto committed Jun 26, 2024
1 parent a8eef96 commit bf1c203
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
this is a repository to bypass jio restrictions and stream
# jiosaavn
Get the song url of jiosaavn using `lite.duckduckgo.com` after your 100% jio data quota exhausted and use jiosaavn.go build it using go and use it as ```./jiosaavn --url <url of song jiosaavn here>``` or you can also use ```go build jiosaavn.go --url <url of song jiosaavn here>``` and the url the script will generate will be used to stream music even after data quota exhausted.
if it not works in your computer
add ```2600:140f:1c00::1740:8cd3 aac.saavncdn.com``` in ```/etc/hosts```
It will work on mobile
If it not works in your computer
add ```2405:200:1609:1731::312c:8a8b aac.saavncdn.com``` in ```/etc/hosts```

# jiocinema
Get the id of movie or any show
![image](https://github.com/lsnnt/jio-tricks/assets/85880458/555ac951-a3eb-4f12-b1ee-a3373f36beaf)
like for this url id is "3776321"
![image_showing_which_is_id](https://i.imgur.com/aJB0cab.png)
like for this url id is "3979150"
After getting id you can build `jiocinema.go` and run ```./jiocinema --id <id_here>``` or you can run ```go run jiocinema.go --id <id_here>``` the link the script will generate should be used with vlc media player to stream movies & all free videos avaliable in jiocinema
For paid videos streaming you can contact me at nnt@nnnt.shop i will respond how to do

Expand Down
47 changes: 46 additions & 1 deletion jiocinema.go → src/jiocinema/jiocinema.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,52 @@ import (
"net/http"
"strings"
"flag"
"encoding/json"
)
type UserData struct {
AuthToken string `json:"authToken"`
// Add other fields if needed
}
func getguestauthtoken() string{
client := &http.Client{}
var data = strings.NewReader(`{"appName":"RJIL_JioCinema","deviceType":"pc","os":"web","deviceId":"aabf1b9a-3ae8-43a0-b0f0-b3062ea4bea4","freshLaunch":true,"adId":"aabf1b9a-3ae8-43a0-b0f0-b3062ea4bea4","appVersion":"24.06.25.1-d22894a9"}`)
req, err := http.NewRequest("POST", "https://auth-jiocinema.voot.com/tokenservice/apis/v4/guest", data)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json, text/plain, */*")
req.Header.Set("accept-language", "en-GB,en;q=0.8")
req.Header.Set("content-type", "application/json")
req.Header.Set("origin", "https://www.jiocinema.com")
req.Header.Set("priority", "u=1, i")
req.Header.Set("referer", "https://www.jiocinema.com/")
req.Header.Set("sec-ch-ua", `"Not/A)Brand";v="8", "Chromium";v="126", "Brave";v="126"`)
req.Header.Set("sec-ch-ua-mobile", "?0")
req.Header.Set("sec-ch-ua-platform", `"Linux"`)
req.Header.Set("sec-fetch-dest", "empty")
req.Header.Set("sec-fetch-mode", "cors")
req.Header.Set("sec-fetch-site", "cross-site")
req.Header.Set("sec-gpc", "1")
req.Header.Set("user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
var dataa UserData
if err := json.Unmarshal([]byte(bodyText), &dataa); err != nil {
log.Fatal(err)
}

// Access and print the authToken field
// fmt.Println("AuthToken:", dataa.AuthToken)
return dataa.AuthToken
}
func main() {
client := &http.Client{}
var id string
Expand All @@ -27,7 +71,7 @@ func main() {
}
req.Header.Set("accept", "application/json, text/plain, */*")
req.Header.Set("accept-language", "en-GB,en;q=0.7")
req.Header.Set("accesstoken", "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImF1dGhUb2tlbklkIjoiMzI2YjY3YTQtNjlh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J1ZX19fSwiZXhwZXJpbWVudEtleSI6eyJjb25maWdLZXkiOiI2ZjI5NTg0OS0xZjRhLTRmNWMtOTE5My0xZmQ4MTdmZGFkNTYiLCJncm91cElkIjozODE3fSwicHJvZmlsZURldGFpbHMiOnsicHJvZmlsZVR5cGUiOiJjaGlsZCIsImNvbnRlbnRBZ2VSYXRpbmciOiJVL0EgNysifSwidmVyc2lvbiI6MjAyNDAzMDQwfSwiZXhwIjoxNzE3MzEwNzc0LCJpYXQiOjE3MTczMDM1NzR9.SDxPBDPTLLno9JkrrfbeWeMuHO8nn2k9OSpv5bISVKg10Oy3vS3FIKgIqNPHxe5vMM3ZdqMu8jHQ291Ca9IGLw")
req.Header.Set("accesstoken", getguestauthtoken()) // populate authtoken here
req.Header.Set("appname", "RJIL_JioCinema")
req.Header.Set("cache-control", "no-cache")
req.Header.Set("content-type", "application/json")
Expand Down Expand Up @@ -61,4 +105,5 @@ func main() {
dashurl := strings.Split(string(bodyText), `,{"macros":[],"url":"`)[1]
dashurl = strings.Split(dashurl, `","`)[0]
fmt.Println(dashurl)
fmt.Println("\n\n use the above url in vlc media player and enjoy watching after FUP data limit ehausted")
}
File renamed without changes.

0 comments on commit bf1c203

Please sign in to comment.