DEMO
tv.mp4
This project automates the process of generating IPTV playlists (playlist.txt
and main.txt
) by fetching channel data from an IPTV server.
The IPTV Playlist Generator fetches channel information from an IPTV server and creates two playlists:
playlist.txt
: Contains all available channels.main.txt
: Contains selected channels based on provided stream IDs.
- Automatic Handshake and Token Retrieval: Performs a handshake to retrieve the bearer token for authentication.
- Channel Fetching: Fetches all channels from the IPTV server.
- Playlist Generation: Creates
playlist.txt
with all channels andmain.txt
with selected channels. - Scheduled Updates: Automatically updates the playlists every hour.
Ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/rajat-ankel/iptv-playlist-generator.git cd iptv-playlist-generator
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
To start the playlist generation and scheduling, simply run:
python main.py