1
0

Implement retries & Regex search

This commit is contained in:
2025-10-17 12:45:42 -04:00
parent a51d71f4de
commit ac69867548
2 changed files with 143 additions and 21 deletions

View File

@@ -5,8 +5,9 @@ A fast, interactive Python tool for searching channels across Xtream Codes IPTV
## 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 ETA
- 📊 **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
@@ -47,14 +48,34 @@ python xtream-search.py --api-url "http://your-server.com" --username "user" --p
Once in interactive mode, use these search commands:
- **`channel_name`** - Search live streams (default)
- **`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 streams
- **`vod:movie`** - Search only VOD content
- **`series:friends`** - Search only series
- **`all:news`** - Search all content types
- **`all:/sports|news/`** - Search all content types with regex
- **`debug`** - Show API information
- **`quit`** or **`exit`** - 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
```
@@ -66,7 +87,7 @@ Commands: live:<term> | vod:<term> | series:<term> | all:<term> | debug | quit
📡 Fetching live categories...
✅ Found 25 categories to search
🔍 Searching live categories: 100%|████████████| 25/25 [00:03<00:00]
🔍 Searching live categories: 100%|████████████| 25/25 [Elapsed: 00:03 | ETA: 00:00]
✅ Found 3 result(s) for 'cnn':
1. [Live] News Channels → CNN International
@@ -77,7 +98,7 @@ Commands: live:<term> | vod:<term> | series:<term> | all:<term> | debug | quit
📡 Fetching VOD categories...
✅ Found 15 VOD categories
🔍 Searching vod: 100%|████████████| 15/15 [00:02<00:00]
🔍 Searching vod: 100%|████████████| 15/15 [Elapsed: 00:02 | ETA: 00:00]
✅ Found 5 result(s) for 'action':
1. [VOD] Action Movies → Die Hard