Skip to content

A Python script to fetch IPTV server information and generate M3U playlists from Xtream Codes-based IPTV servers.

License

Notifications You must be signed in to change notification settings

fairy-root/iptv-to-m3u

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

IPTV To M3u

A Python script to fetch IPTV server information and generate M3U playlists from Xtream Codes-based IPTV servers.

Features

  • Supports both get.php (M3U playlist) and player_api.php (server info, channel list) endpoints
  • Asynchronous requests using aiohttp and asyncio
  • 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

Clone the Repository

git clone https://github.com/fairy-root/iptv-to-m3u.git
cd iptv-to-m3u

Usage

  1. Install requirements:
    pip install aiohttp
  2. Run the script:
    python main.py
  3. Enter your IPTV URL when prompted (either get.php or player_api.php format).

Example URLs

  • http://example.com/get.php?username=USER&password=PASS&type=m3u_plus
  • http://example.com/player_api.php?username=USER&password=PASS

Output

  • For get.php URLs: Saves the playlist as <host>_<username>_<password>.m3u
  • For player_api.php URLs: Displays server info and saves playlist if available

Donation

Your support is appreciated:

  • USDt (TRC20): TGCVbSSJbwL5nyXqMuKY839LJ5q5ygn2uS
  • BTC: 13GS1ixn2uQAmFQkte6qA5p1MQtMXre6MT
  • ETH (ERC20): 0xdbc7a7dafbb333773a5866ccf7a74da15ee654cc
  • LTC: Ldb6SDxUMEdYQQfRhSA3zi4dCUtfUdsPou

Author

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Python script to fetch IPTV server information and generate M3U playlists from Xtream Codes-based IPTV servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages