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.
This repository is now maintained via Github Actions only, and I don't personally maintain it. It initially began as a proof of concept code for being able to generate an m3u from Tata Play servers. It was not very user friendly, as it was just done for curiosity. Shravan has rendered my research into a very user friendly method of generation, which you can take a look here. Saif has also done a brilliant job here. However, if you've come here and are reading this, kindly star the repository and go to any one of these
- A working brain
- Knowledge of basic python
- A working Tata Sky/ Play account
- Channels that you want to watch, already subscribed (I'm sorry, no freebies)
- An app capable of reading a m3u file
I know you would love to get your hands on how this works, but hold on and read before you proceed further
The methods are divided into
EasyandDifficultbased on how comfortable you are with the commandline. TheEasyguide is recommended if you have no working knowledge of Python or scripting in general
- Login with your SID, RMN and OTP/ Password(deprecated) first
- Once you login, your details are saved to your local storage so that you don't have to enter the details again and again
- Every 24 hours, the playlist expires, so the app gives you the next expiry time and you will have to generate your playlist again before that time
- The app can be found in the releases page
Minimum Supported Android Version : Android 5.0
- Make sure you have python up and running on your system. If you don't know how to do this then well, don't think of proceeding further
- You need
requeststo be installed. Do that by usingpip install requests
- Clone this to your directory using
git clone https://github.com/ForceGT/TSPrivateAPIor download thezipfile and then go inside thecode_samplesdirectory and open your terminal there - Change to the
code_samplesdirectory by usingcd code_samples - 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.jsonfile is created which contains important details of the user. TheaccessTokenhas to be updated from time to time. To do so run the login logic again. If you delete theuserDetails.jsonfile you will have to login again so please be careful -
You can generate m3u file by selecting option 3. This generates
allChannelPlaylist.m3ufile in the current directory.NOTE: Please run this only after logging in using Step 1 or 2 otherwise the script exits with an error -
You need to login just once usually, it will create a
userDetails.jsonfile once you login, and then you can just regenerate the playlist each day when you would like to use it. If you don't see theuserDetails.jsonfile anywhere, then you may have to login again
Find some good M3u players here
The issue with the playlist, is that it expires in 24 hours as the access tokens have a validity of 24 hours. So the straightforward way would be do the entire process (without login) again after the playlist expires but man is lazy and so there are two brilliant solutions so that you lazy bums don't have to re-generate after a day
- Take a look at Shravan's Idea
- Take a look at Saif's Idea
If you're interested in how this mechanism works, Refer to docs
This code is just a CASE STUDY on how the authentication mechanism and live streaming using IPTV works I am in no way responsible if you misuse the code and cause revenue loss to the concerned parties and owners of the portal
This code is protected under the MIT license