Generate direct m3u playlist for all the channels subscribed in the Tata Sky portal

Overview

Tata Sky IPTV Script generator

A script to generate the m3u playlist containing direct streamable file (.mpd or MPEG-DASH or DASH) based on the channels that the user has subscribed on the Tata Sky portal. You just have to login that's it

Login

The figure shows how the API authenticates any user

Using OTP

Password mechanism also works kinda similar

Explanation of different files used in the code_samples directory

allChannels.py - This generates a file allChannels.json containing all the channels available on the TataSky platform irrespective of whether the user has subscribed or not. The file has already been included in the repository

constants.py - This is a list of urls, headers, payloads that might be used anywhere in the other files

jwttoken.py -

  • This contains the logic need for generation of the jwt . This is different from the user access Token generated by the backend upon user login. This is needed to get a license to play each channel url / mpeg dash stream /mpd file The token generated here is appended to the license_url of each channel using ls_session key You can find how it is done in the detailed manner in the file itself
  • This can be used independently , just specify the channelId for which you need to get the token and you are good to go The script calls this repeatedly for all channels in the user subscribed/entitlement list

main.py - This contains the logic for the menu generation for the user. It might be updated constantly utils.py - This contains the logic for the m3u generation. This will be integrated soon in the main file



TODO

  • Add Support for Kodi 19.0 ( See #1 for more info)
  • Figure out easy way to solve the issue of playlist need to be updated daily

How to use

  • Clone this to your directory using git clone https://github.com/ForceGT/TSPrivateAPI
  • Change to the code_samples directory by using cd code_samples
  • Get all the needed requirements for the script from the requirements.txt file using pip install -r requirements.txt
  • Simply run main.py (the main script) using the following code
  python main.py
  • You will get options to login using the different methods, upon successful login a userDetails.json file is created which contains important details of the user. The accessToken has to be updated from time to time. To do so run the login logic again. If you delete the userDetails.json file you will have to login again so please be careful

  • You can generate m3u file by selecting option 3. This generates allChannelPlaylist.m3u file in the current directory NOTE: Please run this only after logging in using Step 1 or 2 otherwise the script exits with an error

Playing in Android TV

  • You can use Kodi with the PVR Simple IPTV Plugin [doesn't work yet]. The generated m3u file already is in the standard format that can be read by the plugin (WIP)
  • You can use Tivimate app to play the m3u playlist too

Playing in Android

  • You can use Kodi to play the m3u file(WIP)
  • You can play individual channel using Exostreamer Playing individual link : Just open the m3u file generated above in any text editor of your choice and search for your channel. Once you found it, get the channel url(the one that ends with .mpd and starts with http) and your license url(The license url is the value of the key #KODIPROP:inputstream.adaptive.license_key= paramater) Paste the channelurl(mentioned above) in the text field and click on the DRM button to enter your license url and then click on play. The app automatically remembers this next time if you use it

Playing in a browser (tried with Chrome)

To play a single link/ particular channel

  • Open the generated m3u file, and look for the channel you want to play. Get the channel url (ends with .mpd) and paste it in the browser
  • The extension automatically asks for the license url. You should then look for the license url. The license url is the value of the key #KODIPROP:inputstream.adaptive.license_key= paramater. Copy the entire url and paste it in the browser NOTE: The ls_session should be copied carefully otherwise the license is not granted

Good points to know

  • The generated m3u file has to be updated daily.If you generated it at 11:00pm today it will expire by 11:00pm tomorrow.You don't need to relogin, just generate the playlist again using command number 3 in the script.

  • If it fails to get jwt for a specific channelId then you must do it manually. Note down the channelId and then use the jwttoken.py to generate token for that file and manually edit the m3u file using any text editor How to edit: First run the jwttoken.py python file using python jwttoken.py Enter the channelId for which you need a token The Token you obtain after running the `above file will be printed in the console. Copy this token and open the m3u file and edit the value inputstream.adapative.license_url=https://tatasky.irdetto.***** and append to it ```ls_session```.If your url is ```https://tatasky.****``` then after appending the ```ls_session```, it should now be ```https://tatasky.irdetto.com/****ContentId=4999999&ls_session=Your_Token_Here```

  • You don't need to have a Tata Sky dish, you just need to have a working subscriber id / registered no and/or otp/password (Total 4 ways of logging in using the script) and you should have the channel you want to watch subscribed for the above script to work

  • You need to have basic python knowledge for this

Comments
  • Explicitly specify inputstreamaddon and manifest type=mpd while generating the playlist

    Explicitly specify inputstreamaddon and manifest type=mpd while generating the playlist

    By default, kodi is unable to interpret the mpd format. With these, kodi is able to interpret the mpd format and is also sending the requests to license_key url.

    However, afterwards, the license_key url is giving a different error, as described here: https://github.com/xbmc/inputstream.adaptive/issues/378 I have not gotten past this point.

    opened by anishsane 7
  • Some channels not working

    Some channels not working

    Suddenly some channels stopped working Set Max (SD), Sony Wah, Disney as I got only this cannels not working, Tatasky source is okay as I found those are playing on Tatasky Watch and other unofficial playlists.

    opened by animeshrock 5
  • Language

    Language

    First of all - Amazing work Congratulations and many thanks The only problem is that while watching channels under "Knowledge" section, we can't change language, I was watching NatGeo Wild and I guess it was running Telugu. Can we fix this ?

    Regards

    opened by drtiwarir 4
  • Any Chances of adding other OTT

    Any Chances of adding other OTT

    any chances of you adding other ott live tv channel list ? it will be great to generate voot, zee5, sony live tv from one app !

    Thanks for the script and app, its really helpful !

    enhancement 
    opened by deepaksp 4
  • VLC showing blank screen (even though progress bar is moving)

    VLC showing blank screen (even though progress bar is moving)

    So, I cloned your repo, generated my userdetails, generated my channel playlist. But VLC shows a blank screen (even though progress bar is moving)

    image

    Any ideas as to why?

    opened by theincognito-inc 4
  • Delay in channels

    Delay in channels

    There is a one minute delay while watching the live channels. It is a concern while watching sports. Can we do something to reduce this delay to 30 seconds?

    opened by saifshaikh1805 3
  • Look-up subscriber ID from RMN using tata sky API

    Look-up subscriber ID from RMN using tata sky API

    We often remember our phone number, but not our subscriber ID. So, we need to look up the SID from tata sky app or from the STB. Tata sky provides an API to look up the subscriber ID from RMN. Use that to populate the default subscriber ID. If more than 1 SIDs present for the same RMN, provide a list instead.

    opened by anishsane 2
  • Genre/Section Issue

    Genre/Section Issue

    Can you add more specific Genre/section like Hindi Movies, Hindi Entertainment, Knowledge and Lifestyle, Marathi etc, and put that particular channels in that Genre/section same as we see in Tata Sky set up box.

    opened by ajayuclever 2
  • M3U is not generating

    M3U is not generating

    Hi,

    Getting following error while trying to generate M3U file in both OTP as well as password method of login. Please advice. Thanks!

    Could not generate JWT for channelId: 80 Didn't get license for channel: Id: 80 Name:SONY MAX HD Continuing...Please get license manually for channel : SONY MAX HD Response: {"code":"TKERR007","message":"Invalid epids"} Could not generate JWT for channelId: 72 Didn't get license for channel: Id: 72 Name:REPUBLIC TV Continuing...Please get license manually for channel : REPUBLIC TV Response: {"code":"TKERR007","message":"Invalid epids"}Response: {"code":"TKERR007","message":"Invalid epids"}

    opened by vgmuthu 2
  • Categorization of the Channels into the Playlist

    Categorization of the Channels into the Playlist

    Hey @ForceGT, That's really a great work by you, I'm hoping that we can expect all the channels being categorized in the playlist. It really makes hassle free.

    opened by Shra1V32 2
  • How can i register it please?

    How can i register it please?

    When I visit https://www.tataplay.com/, the following information appears:

    403 ERROR The request could not be satisfied. The Amazon CloudFront distribution is configured to block access from your country. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

    Generated by cloudfront (CloudFront) Request ID: bUdtB-D77qMavB8KkroxWL3eR7vrv631BHmXSXlTI1ECwl9gANp29w==

    opened by 239144498 1
Releases(v3.1)
  • v3.1(May 28, 2022)

  • v3.0(May 28, 2022)

    • Added better notifications
    • Added 401 Error Resolution, please re-login if you see it
    • New Added auto fetching of Subscriber ID from Mobile Number, you just enter your mobile number and the app will fetch the details automatically
    • New Added settings when clicking on top right icon
      • EPG: You can now set your own epg before generation
    • New Made Playlist generation upto 1.5X faster
    • Removed password option from login, and OTP is the only way possible in the backend

    Note: This is an EOL Update, use the script for generation going forward

    Source code(tar.gz)
    Source code(zip)
    app_3.0.apk(5.03 MB)
  • PlaylistRefresh-TV(Jan 19, 2022)

    • You can simply use the android app on your mobile phone or TV, log in and then generate an m3u
    • Note that you have to generate a new playlist before the exploit time, that is mentioned in the app or just one day for simplicity
    • The app can smartly detect if you have a playlist already in the mentioned directory,(the location of the file can be found inside the app), and it overwrites the content if you generate it again and again
    • You can point Tivimate to the location mentioned in the app, and just update once whenever you want to watch the playlist, should work fine
    • There may be issues navigating through the text fields in TV, Try with the left key to navigate down, works for me, will fix when I have time Minimum Supported Version: Android 5.0
    Source code(tar.gz)
    Source code(zip)
    app.apk(4.49 MB)
Owner
Gaurav Thakkar
CSE Student, Mobile App Developer (Android/IOS/Flutter) , Cybersecurity Enthusiast, Spends time writing random scripts sometimes
Gaurav Thakkar
Shellkg-py - A temporary Repository to rewrite of shellpkg in python

Shellkg-py - A temporary Repository to rewrite of shellpkg in python

2 Jan 26, 2022
A discord program that will send a message to nearly every user in a discord server

Discord Mass DM Scrapes users from a discord server to promote/mass dm Report Bug · Request Feature Features Asynchronous Easy to use Free Auto scrape

dropout 56 Jan 02, 2023
The EscapePod Python SDK for Cyb3rVector's EscapePod Extension Proxy

EscapePod Extension SDK for Python by cyb3rdog This is the EscapePod Python SDK for Cyb3rVector's EscapePod Extension Proxy. With this SDK, you can: m

cyb3rdog 3 Mar 07, 2022
Hcl.py is an Amino client for Python

Hcl.py Hcl.py Hcl.py is an Amino client for Python. It provides to access aminoapps Web, app and socket servers. Developed BY Kapidev And Upgraded BY

Oustex 3 Dec 02, 2021
BioThings API framework - Making high-performance API for biological annotation data

BioThings SDK Quick Summary BioThings SDK provides a Python-based toolkit to build high-performance data APIs (or web services) from a single data sou

BioThings 39 Jan 04, 2023
qualysclient - a python SDK for interacting with the Qualys API

qualysclient - a python SDK for interacting with the Qualys API

5 Oct 28, 2022
Touca SDK for Python

Touca SDK For Python Touca helps you understand the true impact of your day to day code changes on the behavior and performance of your overall softwa

Touca 12 May 18, 2022
An advanced crypto trading bot written in Python

Jesse Jesse is an advanced crypto trading framework which aims to simplify researching and defining trading strategies. Why Jesse? In short, Jesse is

Jesse 4.4k Jan 09, 2023
Snipe fair coin launches. Contact @dannsniper on telegram for whitelist

Pancakeswap-sniper Pancakeswap Sniper bot Full version of Pancakeswap sniping bot used to snipe during fair coin launches. With advanced options and a

36 Nov 01, 2021
This is RequestTrackerBot and it used for tracking request made by user in a group

This is a Request Tracker Bot repo, It is for those who upload content like movies, anime, etc. It can be used for tracking request of content that your members asked for.

Abhijeet 27 Dec 29, 2022
This project checks the weather in the next 12 hours and sends an SMS to your phone number if it's going to rain to remind you to take your umbrella.

RainAlert-Request-Twilio This project checks the weather in the next 12 hours and sends an SMS to your phone number if it's going to rain to remind yo

9 Apr 15, 2022
Deploy your apps on any Cloud provider in just a few seconds

The simplest way to deploy your apps in the Cloud Deploy your apps on any Cloud providers in just a few seconds ⚡ Qovery Engine is an open-source abst

Qovery 1.9k Dec 26, 2022
(@Tablada32BOT is my bot in twitter) This is a simple bot, its main and only function is to reply to tweets where they mention their bot with their @

Remember If you are going to host your twitter bot on a page where they can read your code, I recommend that you create an .env file and put your twit

3 Jun 04, 2021
Allows you to easily share bookmarks from Raindrop.io in Telegram chats.

Allows you to easily share bookmarks from Raindrop.io in Telegram chats. As well as save links/photos/longreads from Telegram right into Raindrop.io. Join us, we have a nice 'reader mode' :)

Oleh 36 Dec 19, 2022
ETL python utilizando API do Spotify

Processo de ETL com Python e Airflow usando API do Spotify Sobre Projeto de ETL(Extract, Transform e Load) utilizando Python com API do Spotify e Airf

Leonardo 10 Mar 16, 2022
Discord Blogger Integration Using Blogger API

It's a very simple discord bot created in python using blogger api in order to search and send your website articles in your discord chat in form of an embedded message. It's pretty useful for people

Owen Singh 8 Oct 28, 2022
simple discord token grabber with webhook hiding feature.

Token Grabber A simple Discord token grabber with base64 webhook encoding, it uses pastebin as a database to get webhook, so next time u dont get your

0 Dec 01, 2021
Twitter bot that finds new friends in Twitter.

PythonTwitterBot Twitter Bot Thats Find New Friends pip install textblob pip install tweepy pip install googletrans check requirements.txt file Env

IbukiYoshida 4 Aug 11, 2021
Discord bot that manages expiration of roles with subscriptions!

Discord bot that manages expiration of roles with subscriptions!

Chakeaw__ 3 Apr 28, 2022
Bot per controllare la disponibilità di appuntamenti per la vaccinazione Covid-19 in Veneto

VaxBot9000 Prerequisites Python 3.9 Poetry latest version of geckodriver Firefox Setup poetry install Copy config.sample.toml to config.toml and edit

Augusto Zanellato 5 Jun 13, 2021