Generate direct m3u playlist for all the channels subscribed in the Tata Sky portal
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
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
Easy
andDifficult
based on how comfortable you are with the commandline. TheEasy
guide is recommended if you have no working knowledge of Python or scripting in general
Minimum Supported Android Version : Android 5.0
requests
to be installed. Do that by using pip install requests
git clone https://github.com/ForceGT/TSPrivateAPI
or download the zip
file and then go inside the code_samples
directory and open your terminal therecode_samples
directory by using cd code_samples
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
You need to login just once usually, it will create a userDetails.json
file 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 the userDetails.json
file 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
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