A simple Typer-based CLI to download and filter IPTV M3U playlists.
-
Install
uvif not already installed:pip install uv
-
Create a
.envfile in the same directory with your IPTV credentials:USER=your_username PWD=your_password
No need to install dependencies — uv handles everything via the shebang.
uv run iptv.py downloadDownloads the playlist to playlist.m3u.
uv run iptv.py filter-streams --tokens "action" "sports"Filters entries containing both "action" and "sports" in their title. Saves output to filtered.m3u.
You can optionally specify input/output files:
uv run iptv.py filter-streams --tokens "news" --input-file custom.m3u --output-file news_only.m3u- The
playlist.m3ufilename is used by default for both download and filter. - Filtering is case-insensitive.