1
0

initial commit

This commit is contained in:
2025-10-17 12:10:57 -04:00
commit ac3416a1d1
3 changed files with 594 additions and 0 deletions

141
README.md Normal file
View File

@@ -0,0 +1,141 @@
# 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:<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 [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.