Running the scripts
- 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