ac6986754816bdddc5cb6da748f1ddd5743c736f
Xtream Codes Channel Search
A fast, interactive Python tool for searching channels across Xtream Codes IPTV services. Features multithreaded searching with progress bars and a clean, user-friendly interface.
Features
- 🔍 Interactive Search Mode - Connect once, search multiple times
- 🎯 Regex Support - Use
/pattern/syntax for powerful pattern matching - ⚡ Multithreaded - Fast concurrent searches across categories
- 📊 Progress Bars - Real-time progress with smoothed ETA
- 🎯 Content Type Filtering - Search Live, VOD, Series separately or all together
- 🧹 Clean Output - Compact, readable results
- 🔧 Debug Mode - API connectivity testing and troubleshooting
Installation
- Clone or download this repository
- Install dependencies:
pip install -r requirements.txt
Usage
Interactive Mode (Recommended)
python xtream-search.py --api-url "http://your-server.com" --username "your_user" --password "your_pass"
One-time Search
python xtream-search.py --api-url "http://your-server.com" --username "your_user" --password "your_pass" --channel "cnn"
Advanced Options
# Search all content types (Live + VOD + Series)
python xtream-search.py --api-url "http://your-server.com" --username "user" --password "pass" --channel "movie" --all-types
# Increase thread count for faster searching
python xtream-search.py --api-url "http://your-server.com" --username "user" --password "pass" --max-workers 20
# Debug mode to test API connectivity
python xtream-search.py --api-url "http://your-server.com" --username "user" --password "pass" --debug
Interactive Search Commands
Once in interactive mode, use these search commands:
channel_name- Search live streams (default, substring match)/pattern/- Search using regex pattern (case-insensitive by default)/pattern/flags- Search with regex flags (i=case-insensitive, m=multiline, s=dotall)live:espn- Search only live streamsvod:movie- Search only VOD contentseries:friends- Search only seriesall:news- Search all content typesall:/sports|news/- Search all content types with regexdebug- Show API informationquitorexit- Exit program
Regex Search Examples
/^CNN/- Find channels starting with "CNN" (case-insensitive)/^CNN/i- Find channels starting with "CNN" (explicitly case-insensitive)/^cnn/- Find channels starting with "cnn" (case-insensitive by default)/HD$/- Find channels ending with "HD"/sports|news/i- Find channels containing "sports" OR "news" (case-insensitive)/\d{4}/- Find channels with 4 consecutive digits/^[A-Z]{3}$/- Find channels with exactly 3 uppercase letters
Supported Regex Flags
i- Case-insensitive matching (applied by default if no flags specified)m- Multiline mode (^ and $ match line boundaries)s- Dotall mode (. matches newlines)- Multiple flags can be combined:
/pattern/ims
Sample Output
Connected to: http://your-server.com
Commands: live:<term> | vod:<term> | series:<term> | all:<term> | debug | quit
--------------------------------------------------
🔍 Search: cnn
📡 Fetching live categories...
✅ Found 25 categories to search
🔍 Searching live categories: 100%|████████████| 25/25 [Elapsed: 00:03 | ETA: 00:00]
✅ Found 3 result(s) for 'cnn':
1. [Live] News Channels → CNN International
2. [Live] US News → CNN USA
3. [Live] Breaking News → CNN Breaking News
🔍 Search: vod:action
📡 Fetching VOD categories...
✅ Found 15 VOD categories
🔍 Searching vod: 100%|████████████| 15/15 [Elapsed: 00:02 | ETA: 00:00]
✅ Found 5 result(s) for 'action':
1. [VOD] Action Movies → Die Hard
2. [VOD] Action Movies → Mad Max
3. [VOD] Thriller → Action Jackson
4. [VOD] Adventures → Action Heroes
5. [VOD] Classics → Action Classics
Command Line Arguments
| Argument | Required | Description |
|---|---|---|
--api-url |
✅ | Xtream Codes server URL |
--username |
✅ | Your username |
--password |
✅ | Your password |
--channel |
❌ | Channel to search (one-time mode) |
--all-types |
❌ | Search Live + VOD + Series |
--interactive |
❌ | Force interactive mode |
--max-workers |
❌ | Number of threads (default: 10) |
--debug |
❌ | Show API debug information |
Performance Tuning
- Default threads (10): Good balance for most servers
- High performance (15-20 threads): Faster for powerful servers
- Conservative (5 threads): Better for slower connections or servers with rate limits
Requirements
- Python 3.6+
- requests >= 2.25.0
- tqdm >= 4.60.0
Troubleshooting
Connection Issues
# Test API connectivity
python xtream-search.py --api-url "http://your-server.com" --username "user" --password "pass" --debug
Slow Performance
# Reduce thread count if getting timeouts
python xtream-search.py --api-url "http://your-server.com" --username "user" --password "pass" --max-workers 5
No Results Found
- Check your search term spelling
- Try partial matches (e.g., "cnn" instead of "CNN International")
- Use
all:termto search across all content types - Verify your credentials with
--debug
Description
Languages
Python
100%