# 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 - โšก **Multithreaded** - Fast concurrent searches across categories - ๐Ÿ“Š **Progress Bars** - Real-time progress with 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 1. Clone or download this repository 2. Install dependencies: ```bash pip install -r requirements.txt ``` ## Usage ### Interactive Mode (Recommended) ```bash python xtream-search.py --api-url "http://your-server.com" --username "your_user" --password "your_pass" ``` ### One-time Search ```bash python xtream-search.py --api-url "http://your-server.com" --username "your_user" --password "your_pass" --channel "cnn" ``` ### Advanced Options ```bash # 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) - **`live:espn`** - Search only live streams - **`vod:movie`** - Search only VOD content - **`series:friends`** - Search only series - **`all:news`** - Search all content types - **`debug`** - Show API information - **`quit`** or **`exit`** - Exit program ## Sample Output ``` Connected to: http://your-server.com Commands: live: | vod: | series: | all: | debug | quit -------------------------------------------------- ๐Ÿ” Search: cnn ๐Ÿ“ก Fetching live categories... โœ… Found 25 categories to search ๐Ÿ” Searching live categories: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 25/25 [00:03<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 [00:02<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 ```bash # Test API connectivity python xtream-search.py --api-url "http://your-server.com" --username "user" --password "pass" --debug ``` ### Slow Performance ```bash # 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:term` to search across all content types - Verify your credentials with `--debug` ## License MIT License - feel free to modify and distribute. ## Contributing Pull requests welcome! Please ensure code follows the existing style and includes appropriate error handling.