A Python script to fetch IPTV server information and generate M3U playlists from Xtream Codes-based IPTV servers.
- Supports both
get.php(M3U playlist) andplayer_api.php(server info, channel list) endpoints - Asynchronous requests using
aiohttpandasyncio - Extracts and displays server info: max connections, active connections, trial status, expiry, total channels, etc.
- Saves M3U playlists with username and password in the filename
- Handles URLs with or without explicit port
git clone https://github.com/fairy-root/iptv-to-m3u.git
cd iptv-to-m3u- Install requirements:
pip install aiohttp
- Run the script:
python main.py
- Enter your IPTV URL when prompted (either
get.phporplayer_api.phpformat).
http://example.com/get.php?username=USER&password=PASS&type=m3u_plushttp://example.com/player_api.php?username=USER&password=PASS
- For
get.phpURLs: Saves the playlist as<host>_<username>_<password>.m3u - For
player_api.phpURLs: Displays server info and saves playlist if available
Your support is appreciated:
- USDt (TRC20):
TGCVbSSJbwL5nyXqMuKY839LJ5q5ygn2uS - BTC:
13GS1ixn2uQAmFQkte6qA5p1MQtMXre6MT - ETH (ERC20):
0xdbc7a7dafbb333773a5866ccf7a74da15ee654cc - LTC:
Ldb6SDxUMEdYQQfRhSA3zi4dCUtfUdsPou
- GitHub: FairyRoot
- Telegram: @FairyRoot
If you would like to contribute to this project, feel free to fork the repository and submit pull requests. Ensure that your code follows the existing structure, and test it thoroughly.
This project is licensed under the MIT License - see the LICENSE file for details.